Open CASCADE Technology  7.2.0
Public Member Functions | Protected Member Functions

BRepOffset_MakeSimpleOffset Class Reference

This class represents simple offset algorithm itself. It builds simple offset without intersection. Solid can be created using SetBuildSolidFlag method (set flag to true). By default shell will be constructed. More...

#include <BRepOffset_MakeSimpleOffset.hxx>

Public Member Functions

 BRepOffset_MakeSimpleOffset ()
 Constructor. Does nothing. More...
 
 BRepOffset_MakeSimpleOffset (const TopoDS_Shape &theInputShape, const Standard_Real theOffsetValue)
 Constructor. More...
 
void Initialize (const TopoDS_Shape &theInputShape, const Standard_Real theOffsetValue)
 Initialies shape for modifications. More...
 
void Perform ()
 Computes offset shape. More...
 
TCollection_AsciiString GetErrorMessage () const
 Gets error message. More...
 
BRepOffsetSimple_Status GetError () const
 Gets error code. More...
 
Standard_Boolean GetBuildSolidFlag () const
 Gets solid building flag. More...
 
void SetBuildSolidFlag (const Standard_Boolean theBuildFlag)
 Sets solid building flag. More...
 
Standard_Real GetOffsetValue () const
 Gets offset value. More...
 
void SetOffsetValue (const Standard_Real theOffsetValue)
 Sets offset value. More...
 
Standard_Real GetTolerance () const
 Gets tolerance (used for handling singularities). More...
 
void SetTolerance (const Standard_Real theValue)
 Sets tolerance (used for handling singularities). More...
 
Standard_Boolean IsDone () const
 Gets done state. More...
 
const TopoDS_ShapeGetResultShape () const
 Returns result shape. More...
 
Standard_Real GetSafeOffset (const Standard_Real theExpectedToler)
 Computes max safe offset value for the given tolerance. More...
 
const TopoDS_Shape Generated (const TopoDS_Shape &theShape) const
 Returnes result shape for the given one (if exists). More...
 
const TopoDS_Shape Modified (const TopoDS_Shape &theShape) const
 Returnes modified shape for the given one (if exists). More...
 

Protected Member Functions

void ComputeMaxAngle ()
 Computes max angle in faces junction. More...
 
void Clear ()
 Clears previous result. More...
 

Detailed Description

This class represents simple offset algorithm itself. It builds simple offset without intersection. Solid can be created using SetBuildSolidFlag method (set flag to true). By default shell will be constructed.

Algorithm:

  1. Build source-image maps for vertices, edges and faces.BRepTools_Modification class will be used to store this information. An image of a shared edge can be constructed from the corresponding edge of the first iterated face.
  2. Run BRepTools_Modifier to obtain offset shape. Limitations: According to the algorithm nature result depends on the smoothness of input data. Smooth (G1-continuity) input shape will lead to the good result.

The possible drawback of the simple algorithm is that it leads, in general case, to tolerance increasing. The tolerances have to grow in order to cover the gaps between the neighbor faces in the output. It should be noted that the actual tolerance growth depends on the offset distance and the quality of joints between the input faces. Anyway the good input shell (smooth connections between adjacent faces) will lead to good result.

Constructor & Destructor Documentation

◆ BRepOffset_MakeSimpleOffset() [1/2]

BRepOffset_MakeSimpleOffset::BRepOffset_MakeSimpleOffset ( )

Constructor. Does nothing.

◆ BRepOffset_MakeSimpleOffset() [2/2]

BRepOffset_MakeSimpleOffset::BRepOffset_MakeSimpleOffset ( const TopoDS_Shape theInputShape,
const Standard_Real  theOffsetValue 
)

Constructor.

Member Function Documentation

◆ Clear()

void BRepOffset_MakeSimpleOffset::Clear ( )
protected

Clears previous result.

◆ ComputeMaxAngle()

void BRepOffset_MakeSimpleOffset::ComputeMaxAngle ( )
protected

Computes max angle in faces junction.

◆ Generated()

const TopoDS_Shape BRepOffset_MakeSimpleOffset::Generated ( const TopoDS_Shape theShape) const

Returnes result shape for the given one (if exists).

◆ GetBuildSolidFlag()

Standard_Boolean BRepOffset_MakeSimpleOffset::GetBuildSolidFlag ( ) const
inline

Gets solid building flag.

◆ GetError()

BRepOffsetSimple_Status BRepOffset_MakeSimpleOffset::GetError ( ) const
inline

Gets error code.

◆ GetErrorMessage()

TCollection_AsciiString BRepOffset_MakeSimpleOffset::GetErrorMessage ( ) const

Gets error message.

◆ GetOffsetValue()

Standard_Real BRepOffset_MakeSimpleOffset::GetOffsetValue ( ) const
inline

Gets offset value.

◆ GetResultShape()

const TopoDS_Shape& BRepOffset_MakeSimpleOffset::GetResultShape ( ) const
inline

Returns result shape.

◆ GetSafeOffset()

Standard_Real BRepOffset_MakeSimpleOffset::GetSafeOffset ( const Standard_Real  theExpectedToler)

Computes max safe offset value for the given tolerance.

◆ GetTolerance()

Standard_Real BRepOffset_MakeSimpleOffset::GetTolerance ( ) const
inline

Gets tolerance (used for handling singularities).

◆ Initialize()

void BRepOffset_MakeSimpleOffset::Initialize ( const TopoDS_Shape theInputShape,
const Standard_Real  theOffsetValue 
)

Initialies shape for modifications.

◆ IsDone()

Standard_Boolean BRepOffset_MakeSimpleOffset::IsDone ( ) const
inline

Gets done state.

◆ Modified()

const TopoDS_Shape BRepOffset_MakeSimpleOffset::Modified ( const TopoDS_Shape theShape) const

Returnes modified shape for the given one (if exists).

◆ Perform()

void BRepOffset_MakeSimpleOffset::Perform ( )

Computes offset shape.

◆ SetBuildSolidFlag()

void BRepOffset_MakeSimpleOffset::SetBuildSolidFlag ( const Standard_Boolean  theBuildFlag)
inline

Sets solid building flag.

◆ SetOffsetValue()

void BRepOffset_MakeSimpleOffset::SetOffsetValue ( const Standard_Real  theOffsetValue)
inline

Sets offset value.

◆ SetTolerance()

void BRepOffset_MakeSimpleOffset::SetTolerance ( const Standard_Real  theValue)
inline

Sets tolerance (used for handling singularities).


The documentation for this class was generated from the following file: