Open CASCADE Technology  7.3.1.dev
Public Member Functions | Protected Types | Protected Attributes
BRepOffsetAPI_MakeOffsetShape Class Reference

Describes functions to build a shell out of a shape. The result is an unlooped shape parallel to the source shape. A MakeOffsetShape object provides a framework for: More...

#include <BRepOffsetAPI_MakeOffsetShape.hxx>

Inheritance diagram for BRepOffsetAPI_MakeOffsetShape:
Inheritance graph
[legend]

Public Member Functions

 BRepOffsetAPI_MakeOffsetShape ()
 Constructor does nothing. More...
 
 BRepOffsetAPI_MakeOffsetShape (const TopoDS_Shape &S, const Standard_Real Offset, const Standard_Real Tol, const BRepOffset_Mode Mode=BRepOffset_Skin, const Standard_Boolean Intersection=Standard_False, const Standard_Boolean SelfInter=Standard_False, const GeomAbs_JoinType Join=GeomAbs_Arc, const Standard_Boolean RemoveIntEdges=Standard_False)
 Deprecated constructor. Please avoid usage of this constructor. More...
 
void PerformBySimple (const TopoDS_Shape &theS, const Standard_Real theOffsetValue)
 Constructs offset shape for the given one using simple algorithm without intersections computation. More...
 
void PerformByJoin (const TopoDS_Shape &S, const Standard_Real Offset, const Standard_Real Tol, const BRepOffset_Mode Mode=BRepOffset_Skin, const Standard_Boolean Intersection=Standard_False, const Standard_Boolean SelfInter=Standard_False, const GeomAbs_JoinType Join=GeomAbs_Arc, const Standard_Boolean RemoveIntEdges=Standard_False)
 Constructs a shape parallel to the shape S, where. More...
 
virtual const BRepOffset_MakeOffsetMakeOffset () const
 Returns instance of the unrelying intersection / arc algorithm. More...
 
virtual void Build () override
 Does nothing. More...
 
virtual const TopTools_ListOfShapeGenerated (const TopoDS_Shape &S) override
 Returns the list of shapes generated from the shape <S>. More...
 
const TopTools_ListOfShapeGeneratedEdge (const TopoDS_Shape &S)
 Returns the list of edges generated from the shape <S>. More...
 
GeomAbs_JoinType GetJoinType () const
 Returns offset join type. More...
 
- Public Member Functions inherited from BRepBuilderAPI_MakeShape
virtual const TopoDS_ShapeShape ()
 Returns a shape built by the shape construction algorithm. Raises exception StdFail_NotDone if the shape was not built. More...
 
 operator TopoDS_Shape ()
 
virtual const TopTools_ListOfShapeModified (const TopoDS_Shape &S)
 Returns the list of shapes modified from the shape <S>. More...
 
virtual Standard_Boolean IsDeleted (const TopoDS_Shape &S)
 Returns true if the shape S has been deleted. More...
 
- Public Member Functions inherited from BRepBuilderAPI_Command
virtual ~BRepBuilderAPI_Command ()
 
virtual Standard_Boolean IsDone () const
 
void Check () const
 Raises NotDone if done is false. More...
 

Protected Types

enum  OffsetAlgo_Type { OffsetAlgo_NONE, OffsetAlgo_JOIN, OffsetAlgo_SIMPLE }
 

Protected Attributes

OffsetAlgo_Type myLastUsedAlgo
 
BRepOffset_MakeOffset myOffsetShape
 
BRepOffset_MakeSimpleOffset mySimpleOffsetShape
 
- Protected Attributes inherited from BRepBuilderAPI_MakeShape
TopoDS_Shape myShape
 
TopTools_ListOfShape myGenerated
 

Additional Inherited Members

- Protected Member Functions inherited from BRepBuilderAPI_MakeShape
 BRepBuilderAPI_MakeShape ()
 
- Protected Member Functions inherited from BRepBuilderAPI_Command
 BRepBuilderAPI_Command ()
 Set done to False. More...
 
void Done ()
 Set done to true. More...
 
void NotDone ()
 Set done to false. More...
 

Detailed Description

Describes functions to build a shell out of a shape. The result is an unlooped shape parallel to the source shape. A MakeOffsetShape object provides a framework for:

Member Enumeration Documentation

◆ OffsetAlgo_Type

Enumerator
OffsetAlgo_NONE 
OffsetAlgo_JOIN 
OffsetAlgo_SIMPLE 

Constructor & Destructor Documentation

◆ BRepOffsetAPI_MakeOffsetShape() [1/2]

BRepOffsetAPI_MakeOffsetShape::BRepOffsetAPI_MakeOffsetShape ( )

Constructor does nothing.

◆ BRepOffsetAPI_MakeOffsetShape() [2/2]

BRepOffsetAPI_MakeOffsetShape::BRepOffsetAPI_MakeOffsetShape ( const TopoDS_Shape S,
const Standard_Real  Offset,
const Standard_Real  Tol,
const BRepOffset_Mode  Mode = BRepOffset_Skin,
const Standard_Boolean  Intersection = Standard_False,
const Standard_Boolean  SelfInter = Standard_False,
const GeomAbs_JoinType  Join = GeomAbs_Arc,
const Standard_Boolean  RemoveIntEdges = Standard_False 
)

Deprecated constructor. Please avoid usage of this constructor.

Deprecated:
("Deprecated constructor. Please use constructor without parameters and one of perform methods.")

Member Function Documentation

◆ Build()

virtual void BRepOffsetAPI_MakeOffsetShape::Build ( )
overridevirtual

Does nothing.

Reimplemented from BRepBuilderAPI_MakeShape.

Reimplemented in BRepOffsetAPI_MakeThickSolid.

◆ Generated()

virtual const TopTools_ListOfShape& BRepOffsetAPI_MakeOffsetShape::Generated ( const TopoDS_Shape S)
overridevirtual

Returns the list of shapes generated from the shape <S>.

Reimplemented from BRepBuilderAPI_MakeShape.

◆ GeneratedEdge()

const TopTools_ListOfShape& BRepOffsetAPI_MakeOffsetShape::GeneratedEdge ( const TopoDS_Shape S)

Returns the list of edges generated from the shape <S>.

◆ GetJoinType()

GeomAbs_JoinType BRepOffsetAPI_MakeOffsetShape::GetJoinType ( ) const

Returns offset join type.

◆ MakeOffset()

virtual const BRepOffset_MakeOffset& BRepOffsetAPI_MakeOffsetShape::MakeOffset ( ) const
virtual

Returns instance of the unrelying intersection / arc algorithm.

◆ PerformByJoin()

void BRepOffsetAPI_MakeOffsetShape::PerformByJoin ( const TopoDS_Shape S,
const Standard_Real  Offset,
const Standard_Real  Tol,
const BRepOffset_Mode  Mode = BRepOffset_Skin,
const Standard_Boolean  Intersection = Standard_False,
const Standard_Boolean  SelfInter = Standard_False,
const GeomAbs_JoinType  Join = GeomAbs_Arc,
const Standard_Boolean  RemoveIntEdges = Standard_False 
)

Constructs a shape parallel to the shape S, where.

  • S may be a face, a shell, a solid or a compound of these shape kinds;
  • Offset is the offset value. The offset shape is constructed:
  • outside S, if Offset is positive,
  • inside S, if Offset is negative;
  • Tol defines the coincidence tolerance criterion for generated shapes;
  • Mode defines the construction type of parallels applied to the free edges of shape S; currently, only one construction type is implemented, namely the one where the free edges do not generate parallels; this corresponds to the default value BRepOffset_Skin;
  • Intersection specifies how the algorithm must work in order to limit the parallels to two adjacent shapes:
  • if Intersection is false (default value), the intersection is calculated with the parallels to the two adjacent shapes,
  • if Intersection is true, the intersection is calculated by taking all generated parallels into account; this computation method is more general as it avoids some self-intersections generated in the offset shape from features of small dimensions on shape S, however this method has not been completely implemented and therefore is not recommended for use;
  • SelfInter tells the algorithm whether a computation to eliminate self-intersections must be applied to the resulting shape; however, as this functionality is not yet implemented, it is recommended to use the default value (false);
  • Join defines how to fill the holes that may appear between parallels to the two adjacent faces. It may take values GeomAbs_Arc or GeomAbs_Intersection:
  • if Join is equal to GeomAbs_Arc, then pipes are generated between two free edges of two adjacent parallels, and spheres are generated on "images" of vertices; it is the default value,
  • if Join is equal to GeomAbs_Intersection, then the parallels to the two adjacent faces are enlarged and intersected, so that there are no free edges on parallels to faces. RemoveIntEdges flag defines whether to remove the INTERNAL edges from the result or not. Warnings
  1. All the faces of the shape S should be based on the surfaces with continuity at least C1.
  2. The offset value should be sufficiently small to avoid self-intersections in resulting shape. Otherwise these self-intersections may appear inside an offset face if its initial surface is not plane or sphere or cylinder, also some non-adjacent offset faces may intersect each other. Also, some offset surfaces may "turn inside out".
  3. The algorithm may fail if the shape S contains vertices where more than 3 edges converge.
  4. Since 3d-offset algorithm involves intersection of surfaces, it is under limitations of surface intersection algorithm.
  5. A result cannot be generated if the underlying geometry of S is BSpline with continuity C0. Exceptions Geom_UndefinedDerivative if the underlying geometry of S is BSpline with continuity C0.

◆ PerformBySimple()

void BRepOffsetAPI_MakeOffsetShape::PerformBySimple ( const TopoDS_Shape theS,
const Standard_Real  theOffsetValue 
)

Constructs offset shape for the given one using simple algorithm without intersections computation.

Field Documentation

◆ myLastUsedAlgo

OffsetAlgo_Type BRepOffsetAPI_MakeOffsetShape::myLastUsedAlgo
protected

◆ myOffsetShape

BRepOffset_MakeOffset BRepOffsetAPI_MakeOffsetShape::myOffsetShape
protected

◆ mySimpleOffsetShape

BRepOffset_MakeSimpleOffset BRepOffsetAPI_MakeOffsetShape::mySimpleOffsetShape
protected

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