BRepOffset
OCCT package BRepOffset: BRepOffset_Analyse, BRepOffset_Error, BRepOffset_Inter2d, BRepOffset_Inter3d, and 8 more bound classes.
BRepOffset_Analyse
Analyses the shape to find the parts of edges connecting the convex, concave or tangent faces.
Constructors(2)
- constructor(theS: TopoDS_Shape, theAngle: number): BRepOffset_AnalyseParameters (2)
theStheAngle
Instance methods(20)
- Perform(theS: TopoDS_Shape, theAngle: number, theRange?: Message_ProgressRange): voidParameters (3)
theStheAngletheRange
- IsDone(): boolean
- Parameters (1)
theE
- Edges(theV: TopoDS_Vertex, theType: ChFiDS_TypeOfConcavity, theL: NCollection_List_TopoDS_Shape): voidParameters (3)
theVtheTypetheL
- Edges(theF: TopoDS_Face, theType: ChFiDS_TypeOfConcavity, theL: NCollection_List_TopoDS_Shape): voidParameters (3)
theFtheTypetheL
- TangentEdges(theEdge: TopoDS_Edge, theVertex: TopoDS_Vertex, theEdges: NCollection_List_TopoDS_Shape): voidParameters (3)
theEdgetheVertextheEdges
- HasAncestor(theS: TopoDS_Shape): booleanParameters (1)
theS
- Parameters (1)
theS
- Explode(theL: NCollection_List_TopoDS_Shape, theType: ChFiDS_TypeOfConcavity): voidParameters (2)
theLtheType
- Explode(theL: NCollection_List_TopoDS_Shape, theType1: ChFiDS_TypeOfConcavity, theType2: ChFiDS_TypeOfConcavity): voidParameters (3)
theLtheType1theType2
- AddFaces(theFace: TopoDS_Face, theCo: TopoDS_Compound, theMap: NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher, theType: ChFiDS_TypeOfConcavity): voidParameters (4)
theFacetheCotheMaptheType
- AddFaces(theFace: TopoDS_Face, theCo: TopoDS_Compound, theMap: NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher, theType1: ChFiDS_TypeOfConcavity, theType2: ChFiDS_TypeOfConcavity): voidParameters (5)
theFacetheCotheMaptheType1theType2
- SetOffsetValue(theOffset: number): voidParameters (1)
theOffset
- Parameters (1)
theMap
- Generated(theS: TopoDS_Shape): TopoDS_ShapeParameters (1)
theS
- HasGenerated(theS: TopoDS_Shape): booleanParameters (1)
theS
- EdgeReplacement(theFace: TopoDS_Face, theEdge: TopoDS_Edge): TopoDS_EdgeParameters (2)
theFacetheEdge
- Descendants(theS: TopoDS_Shape, theUpdate?: boolean): NCollection_List_TopoDS_ShapeParameters (2)
theStheUpdate
- Clear(): void
BRepOffset_Error
Properties(11)
BRepOffset_Inter2d
Computes the intersections between edges on a face stores result is SD as AsDes from BRepOffset.
Constructors(1)
Static methods(5)
- Compute(AsDes: BRepAlgo_AsDes, F: TopoDS_Face, NewEdges: NCollection_IndexedMap_TopoDS_Shape_TopTools_ShapeMapHasher, Tol: number, theEdgeIntEdges: NCollection_DataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher, theDMVV: NCollection_IndexedDataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher, theRange: Message_ProgressRange): void
Computes the intersections between the edges stored is AsDes as descendants of <F> . Intersections is computed between two edges if one of them is bound in NewEdges. When all faces of the shape are treated the intersection vertices have to be fused using the FuseVertices method. theDMVV contains the vertices that should be fused.
Parameters (7)AsDesFNewEdgesToltheEdgeIntEdgestheDMVV—Mutated in place; read the updated value from this argument after the call.theRange
- ConnexIntByInt(FI: TopoDS_Face, OFI: BRepOffset_Offset, MES: NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher, Build: NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher, theAsDes: BRepAlgo_AsDes, AsDes2d: BRepAlgo_AsDes, Offset: number, Tol: number, Analyse: BRepOffset_Analyse, FacesWithVerts: NCollection_IndexedMap_TopoDS_Shape_TopTools_ShapeMapHasher, theImageVV: BRepAlgo_Image, theEdgeIntEdges: NCollection_DataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher, theDMVV: NCollection_IndexedDataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher, theRange: Message_ProgressRange): boolean
Computes the intersection between the offset edges of the <FI>. All intersection vertices will be stored in AsDes2d. When all faces of the shape are treated the intersection vertices have to be fused using the FuseVertices method. theDMVV contains the vertices that should be fused.
Parameters (14)FIOFI—Mutated in place; read the updated value from this argument after the call.MES—Mutated in place; read the updated value from this argument after the call.BuildtheAsDesAsDes2dOffsetTolAnalyseFacesWithVerts—Mutated in place; read the updated value from this argument after the call.theImageVV—Mutated in place; read the updated value from this argument after the call.theEdgeIntEdges—Mutated in place; read the updated value from this argument after the call.theDMVV—Mutated in place; read the updated value from this argument after the call.theRange
- ConnexIntByIntInVert(FI: TopoDS_Face, OFI: BRepOffset_Offset, MES: NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher, Build: NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher, AsDes: BRepAlgo_AsDes, AsDes2d: BRepAlgo_AsDes, Tol: number, Analyse: BRepOffset_Analyse, theDMVV: NCollection_IndexedDataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher, theRange: Message_ProgressRange): void
Computes the intersection between the offset edges generated from vertices and stored into AsDes as descendants of the <FI>. All intersection vertices will be stored in AsDes2d. When all faces of the shape are treated the intersection vertices have to be fused using the FuseVertices method. theDMVV contains the vertices that should be fused.
Parameters (10)FIOFI—Mutated in place; read the updated value from this argument after the call.MES—Mutated in place; read the updated value from this argument after the call.BuildAsDesAsDes2dTolAnalysetheDMVV—Mutated in place; read the updated value from this argument after the call.theRange
- FuseVertices(theDMVV: NCollection_IndexedDataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher, theAsDes: BRepAlgo_AsDes, theImageVV: BRepAlgo_Image): boolean
Fuses the chains of vertices in the theDMVV and updates AsDes by replacing the old vertices with the new ones.
Parameters (3)theDMVVtheAsDestheImageVV—Mutated in place; read the updated value from this argument after the call.
- ExtentEdge(E: TopoDS_Edge, NE: TopoDS_Edge, theOffset: number): boolean
extents the edge
Parameters (3)ENE—Mutated in place; read the updated value from this argument after the call.theOffset
BRepOffset_Inter3d
Computes the connection of the offset and not offset faces according to the connection type required. Store the result in AsDes tool.
Constructors(1)
- constructor(AsDes: BRepAlgo_AsDes, Side: TopAbs_State, Tol: number): BRepOffset_Inter3d
Constructor.
Parameters (3)AsDesSideTol
Instance methods(11)
- CompletInt(SetOfFaces: NCollection_List_TopoDS_Shape, InitOffsetFace: BRepAlgo_Image, theRange: Message_ProgressRange): voidParameters (3)
SetOfFacesInitOffsetFacetheRange
- FaceInter(F1: TopoDS_Face, F2: TopoDS_Face, InitOffsetFace: BRepAlgo_Image): void
Computes intersection of pair of faces.
Parameters (3)F1F2InitOffsetFace
- ConnexIntByArc(SetOfFaces: NCollection_List_TopoDS_Shape, ShapeInit: TopoDS_Shape, Analyse: BRepOffset_Analyse, InitOffsetFace: BRepAlgo_Image, theRange: Message_ProgressRange): void
Computes connections of the offset faces that have to be connected by arcs.
Parameters (5)SetOfFacesShapeInitAnalyseInitOffsetFacetheRange
- ConnexIntByInt(SI: TopoDS_Shape, MapSF: NCollection_DataMap_TopoDS_Shape_BRepOffset_Offset_TopTools_ShapeMapHasher, A: BRepOffset_Analyse, MES: NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher, Build: NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher, Failed: NCollection_List_TopoDS_Shape, theRange: Message_ProgressRange, bIsPlanar: boolean): void
Computes intersection of the offset faces that have to be connected by sharp edges, i.e. it computes intersection between extended offset faces.
Parameters (8)SIMapSFAMES—Mutated in place; read the updated value from this argument after the call.Build—Mutated in place; read the updated value from this argument after the call.Failed—Mutated in place; read the updated value from this argument after the call.theRangebIsPlanar
- ContextIntByInt(ContextFaces: NCollection_IndexedMap_TopoDS_Shape_TopTools_ShapeMapHasher, ExtentContext: boolean, MapSF: NCollection_DataMap_TopoDS_Shape_BRepOffset_Offset_TopTools_ShapeMapHasher, A: BRepOffset_Analyse, MES: NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher, Build: NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher, Failed: NCollection_List_TopoDS_Shape, theRange: Message_ProgressRange, bIsPlanar: boolean): void
Computes intersection with not offset faces .
Parameters (9)ContextFacesExtentContextMapSFAMES—Mutated in place; read the updated value from this argument after the call.Build—Mutated in place; read the updated value from this argument after the call.Failed—Mutated in place; read the updated value from this argument after the call.theRangebIsPlanar
- ContextIntByArc(ContextFaces: NCollection_IndexedMap_TopoDS_Shape_TopTools_ShapeMapHasher, ExtentContext: boolean, Analyse: BRepOffset_Analyse, InitOffsetFace: BRepAlgo_Image, InitOffsetEdge: BRepAlgo_Image, theRange: Message_ProgressRange): void
Computes connections of the not offset faces that have to be connected by arcs.
Parameters (6)ContextFacesExtentContextAnalyseInitOffsetFaceInitOffsetEdge—Mutated in place; read the updated value from this argument after the call.theRange
- SetDone(F1: TopoDS_Face, F2: TopoDS_Face): void
Marks the pair of faces as already intersected.
Parameters (2)F1F2
- IsDone(F1: TopoDS_Face, F2: TopoDS_Face): boolean
Checks if the pair of faces has already been treated.
Parameters (2)F1F2
Returns touched faces.
Returns AsDes tool.
Returns new edges.
BRepOffset_Interval
Constructors(2)
- constructor(U1: number, U2: number, Type: ChFiDS_TypeOfConcavity): BRepOffset_IntervalParameters (3)
U1U2Type
Instance methods(6)
BRepOffset_MakeLoops
Constructors(1)
Instance methods(3)
- Build(LF: NCollection_List_TopoDS_Shape, AsDes: BRepAlgo_AsDes, Image: BRepAlgo_Image, theImageVV: BRepAlgo_Image, theRange: Message_ProgressRange): voidParameters (5)
LFAsDesImagetheImageVVtheRange
- BuildOnContext(LContext: NCollection_List_TopoDS_Shape, Analyse: BRepOffset_Analyse, AsDes: BRepAlgo_AsDes, Image: BRepAlgo_Image, InSide: boolean, theRange: Message_ProgressRange): voidParameters (6)
LContextAnalyseAsDesImageInSidetheRange
- BuildFaces(LF: NCollection_List_TopoDS_Shape, AsDes: BRepAlgo_AsDes, Image: BRepAlgo_Image, theRange: Message_ProgressRange): voidParameters (4)
LFAsDesImagetheRange
BRepOffset_MakeSimpleOffset
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:
- 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.
- Run
BRepTools_Modifierto 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.
Constructors(2)
Constructor. Does nothing.
- constructor(theInputShape: TopoDS_Shape, theOffsetValue: number): BRepOffset_MakeSimpleOffset
Constructor.
Parameters (2)theInputShapetheOffsetValue
Instance methods(15)
- Initialize(theInputShape: TopoDS_Shape, theOffsetValue: number): void
Initialise shape for modifications.
Parameters (2)theInputShapetheOffsetValue
- Perform(): void
Computes offset shape.
Gets error message.
Gets error code.
- GetBuildSolidFlag(): boolean
Gets solid building flag.
- SetBuildSolidFlag(theBuildFlag: boolean): void
Sets solid building flag.
Parameters (1)theBuildFlag
- GetOffsetValue(): number
Gets offset value.
- SetOffsetValue(theOffsetValue: number): void
Sets offset value.
Parameters (1)theOffsetValue
- GetTolerance(): number
Gets tolerance (used for handling singularities).
- SetTolerance(theValue: number): void
Sets tolerance (used for handling singularities).
Parameters (1)theValue
- IsDone(): boolean
Gets done state.
Returns result shape.
- GetSafeOffset(theExpectedToler: number): number
Computes max safe offset value for the given tolerance.
Parameters (1)theExpectedToler
- Generated(theShape: TopoDS_Shape): TopoDS_Shape
Returns result shape for the given one (if exists).
Parameters (1)theShape
- Modified(theShape: TopoDS_Shape): TopoDS_Shape
Returns modified shape for the given one (if exists).
Parameters (1)theShape
BRepOffset_Mode
Properties(3)
BRepOffset_Offset
This class compute elemenary offset surface. Evaluate the offset generated : 1 - from a face. 2 - from an edge. 3 - from a vertex.
Constructors(6)
- constructor(Face: TopoDS_Face, Offset: number, OffsetOutside?: boolean, JoinType?: GeomAbs_JoinType): BRepOffset_OffsetParameters (4)
FaceOffsetOffsetOutsideJoinType
- constructor(Face: TopoDS_Face, Offset: number, Created: NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher, OffsetOutside?: boolean, JoinType?: GeomAbs_JoinType): BRepOffset_Offset
This method will be called when you want to share the edges soon generated from an other face. e.g. when two faces are tangents the common edge will generate only one edge ( no pipe).
The Map will be fill as follow:
Created(E) = E' with: E = an edge of <Face> E' = the image of E in the offsetting of another face sharing E with a continuity at least G1Parameters (5)FaceOffsetCreatedOffsetOutsideJoinType
- constructor(Vertex: TopoDS_Vertex, LEdge: NCollection_List_TopoDS_Shape, Offset: number, Polynomial?: boolean, Tol?: number, Conti?: GeomAbs_Shape): BRepOffset_Offset
Tol and Conti are only used if Polynomial is True (Used to perform the approximation).
Parameters (6)VertexLEdgeOffsetPolynomialTolConti
- constructor(Path: TopoDS_Edge, Edge1: TopoDS_Edge, Edge2: TopoDS_Edge, Offset: number, Polynomial?: boolean, Tol?: number, Conti?: GeomAbs_Shape): BRepOffset_OffsetParameters (7)
PathEdge1Edge2OffsetPolynomialTolConti
- constructor(Path: TopoDS_Edge, Edge1: TopoDS_Edge, Edge2: TopoDS_Edge, Offset: number, FirstEdge: TopoDS_Edge, LastEdge: TopoDS_Edge, Polynomial?: boolean, Tol?: number, Conti?: GeomAbs_Shape): BRepOffset_OffsetParameters (9)
PathEdge1Edge2OffsetFirstEdgeLastEdgePolynomialTolConti
Instance methods(10)
- Init(Face: TopoDS_Face, Offset: number, OffsetOutside: boolean, JoinType: GeomAbs_JoinType): voidParameters (4)
FaceOffsetOffsetOutsideJoinType
- Init(Face: TopoDS_Face, Offset: number, Created: NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher, OffsetOutside: boolean, JoinType: GeomAbs_JoinType): voidParameters (5)
FaceOffsetCreatedOffsetOutsideJoinType
- Init(Path: TopoDS_Edge, Edge1: TopoDS_Edge, Edge2: TopoDS_Edge, Offset: number, Polynomial: boolean, Tol: number, Conti: GeomAbs_Shape): voidParameters (7)
PathEdge1Edge2OffsetPolynomialTolConti
- Init(Path: TopoDS_Edge, Edge1: TopoDS_Edge, Edge2: TopoDS_Edge, Offset: number, FirstEdge: TopoDS_Edge, LastEdge: TopoDS_Edge, Polynomial: boolean, Tol: number, Conti: GeomAbs_Shape): voidParameters (9)
PathEdge1Edge2OffsetFirstEdgeLastEdgePolynomialTolConti
- Init(Vertex: TopoDS_Vertex, LEdge: NCollection_List_TopoDS_Shape, Offset: number, Polynomial: boolean, Tol: number, Conti: GeomAbs_Shape): void
Tol and Conti are only used if Polynomial is True (Used to perform the approximation).
Parameters (6)VertexLEdgeOffsetPolynomialTolConti
- Init(Edge: TopoDS_Edge, Offset: number): void
Only used in Rolling Ball. Pipe on Free Boundary.
Parameters (2)EdgeOffset
- Face(): TopoDS_Face
- Generated(Shape: TopoDS_Shape): TopoDS_ShapeParameters (1)
Shape
BRepOffset_SimpleOffset
This class represents mechanism of simple offset algorithm i.e. topology-preserve offset construction without intersection.
The list below shows mapping scheme:
- Each surface is mapped to its geometric offset surface.
- For each edge, pcurves are mapped to the same pcurves on offset surfaces.
- For each edge, 3d curve is constructed by re-approximation of pcurve on the first offset face.
- Position of each vertex in a result shell is computed as average point of all ends of edges shared by that vertex.
- Tolerances are updated according to the resulting geometry.
Constructors(1)
- constructor(theInputShape: TopoDS_Shape, theOffsetValue: number, theTolerance: number): BRepOffset_SimpleOffset
Constructor.
Parameters (3)theInputShape—shape to be offsettheOffsetValue—offset distance (signed)theTolerance—tolerance for handling singular points
Static methods(2)
- get_type_name(): string
Instance methods(7)
- NewSurface(F: TopoDS_Face, L: TopLoc_Location, Tol: number, RevWires: boolean, RevFace: boolean): { returnValue: boolean; S: Geom_Surface; Tol: number; RevWires: boolean; RevFace: boolean; [Symbol.dispose](): void }
Returns true if the face <F> has been modified. In this case, is the new geometric support of the face, <L> the new location, <Tol> the new tolerance. <RevWires> has to be set to true when the modification reverses the normal of the surface. (the wires have to be reversed). <RevFace> has to be set to true if the orientation of the modified face changes in the shells which contain it. Here, <RevFace> will return true if the
gp_Trsfis negative.Parameters (5)FL—Mutated in place; read the updated value from this argument after the call.TolRevWiresRevFace
ReturnsA result object with fields:
returnValue: the C++ return valueS: owned by the returned envelope.Tol: updated value from the call.RevWires: updated value from the call.RevFace: updated value from the call.
Dispose the returned envelope to release owned Handle fields.
- NewCurve(E: TopoDS_Edge, L: TopLoc_Location, Tol: number): { returnValue: boolean; C: Geom_Curve; Tol: number; [Symbol.dispose](): void }
Returns true if the edge <E> has been modified. In this case,
is the new geometric support of the edge, <L> the new location, <Tol> the new tolerance. Otherwise, returns false, and , <L>, <Tol> are not significant.Parameters (3)EL—Mutated in place; read the updated value from this argument after the call.Tol
ReturnsA result object with fields:
returnValue: the C++ return valueC: owned by the returned envelope.Tol: updated value from the call.
Dispose the returned envelope to release owned Handle fields.
- NewPoint(V: TopoDS_Vertex, P: gp_Pnt, Tol: number): { returnValue: boolean; Tol: number }
Returns true if the vertex <V> has been modified. In this case,.
is the new geometric support of the vertex, <Tol> the new tolerance. Otherwise, returns false, and
, <Tol> are not significant.Parameters (3)VP—Mutated in place; read the updated value from this argument after the call.Tol
ReturnsA result object with fields:
returnValue: the C++ return valueTol: updated value from the call.
- NewCurve2d(E: TopoDS_Edge, F: TopoDS_Face, NewE: TopoDS_Edge, NewF: TopoDS_Face, Tol: number): { returnValue: boolean; C: Geom2d_Curve; Tol: number; [Symbol.dispose](): void }
Returns true if the edge <E> has a new curve on surface on the face <F>. In this case,
is the new geometric support of the edge, <L> the new location, <Tol> the new tolerance. Otherwise, returns false, and , <L>, <Tol> are not significant.Parameters (5)EFNewENewFTol
ReturnsA result object with fields:
returnValue: the C++ return valueC: owned by the returned envelope.Tol: updated value from the call.
Dispose the returned envelope to release owned Handle fields.
- NewParameter(V: TopoDS_Vertex, E: TopoDS_Edge, P: number, Tol: number): { returnValue: boolean; P: number; Tol: number }
Returns true if the Vertex <V> has a new parameter on the edge <E>. In this case,.
is the parameter, <Tol> the new tolerance. Otherwise, returns false, and
, <Tol> are not significant.Parameters (4)VEPTol
ReturnsA result object with fields:
returnValue: the C++ return valueP: updated value from the call.Tol: updated value from the call.
- Continuity(E: TopoDS_Edge, F1: TopoDS_Face, F2: TopoDS_Face, NewE: TopoDS_Edge, NewF1: TopoDS_Face, NewF2: TopoDS_Face): GeomAbs_Shape
Returns the continuity of <NewE> between <NewF1> and <NewF2>.
<NewE> is the new edge created from <E>. <NewF1> (resp. <NewF2>) is the new face created from <F1> (resp. <F2>).Parameters (6)EF1F2NewENewF1NewF2