BRepLib
OCCT package BRepLib: BRepLib, BRepLib_CheckCurveOnSurface, BRepLib_Command, BRepLib_EdgeError, and 18 more bound classes.
BRepLib
The BRepLib package provides general utilities for BRep.
- FindSurface : Class to compute a surface through a set of edges.
- Compute missing 3d curve on an edge.
Constructors(1)
Static methods(33)
- Precision(P: number): void
Computes the max distance between edge and its 2d representation on the face. Sets the default precision. The current
Precisionis returned.Parameters (1)P
- Precision(): number
Returns the default precision.
- Plane(P: Geom_Plane): void
Sets the current plane to P.
Parameters (1)P
- Plane(): Geom_Plane
Returns the current plane.
- CheckSameRange(E: TopoDS_Edge, Confusion?: number): boolean
checks if the Edge is same range IGNORING the same range flag of the edge Confusion argument is to compare real numbers idenpendently of any model space tolerance
Parameters (2)EConfusion
- SameRange(E: TopoDS_Edge, Tolerance?: number): void
will make all the curve representation have the same range domain for the parameters. This will IGNORE the same range flag value to proceed. If there is a 3D curve there it will the range of that curve. If not the first curve representation encountered in the list will give its range to the all the other curves.
Parameters (2)ETolerance
- BuildCurve3d(E: TopoDS_Edge, Tolerance?: number, Continuity?: GeomAbs_Shape, MaxDegree?: number, MaxSegment?: number): boolean
Computes the 3d curve for the edge <E> if it does not exist. Returns True if the curve was computed or existed. Returns False if there is no planar pcurve or the computation failed. <MaxSegment> >= 30 in approximation.
Parameters (5)EToleranceContinuityMaxDegreeMaxSegment
- BuildCurves3d(S: TopoDS_Shape, Tolerance: number, Continuity: GeomAbs_Shape, MaxDegree: number, MaxSegment: number): boolean
Computes the 3d curves for all the edges of return False if one of the computation failed. <MaxSegment> >= 30 in approximation.
Parameters (5)SToleranceContinuityMaxDegreeMaxSegment
- BuildCurves3d(S: TopoDS_Shape): boolean
Computes the 3d curves for all the edges of return False if one of the computation failed.
Parameters (1)S
- BuildPCurveForEdgeOnPlane(theE: TopoDS_Edge, theF: TopoDS_Face): void
Builds pcurve of edge on face if the surface is plane, and updates the edge.
Parameters (2)theEtheF
- BuildPCurveForEdgeOnPlane(theE: TopoDS_Edge, theF: TopoDS_Face, bToUpdate: boolean): { aC2D: Geom2d_Curve; bToUpdate: boolean; [Symbol.dispose](): void }
Builds pcurve of edge on face if the surface is plane, but does not update the edge. The output are the pcurve and the flag telling that pcurve was built.
Parameters (3)theEtheFbToUpdate
ReturnsA result object with fields:
aC2D: owned by the returned envelope.bToUpdate: updated value from the call.
Dispose the returned envelope to release owned Handle fields.
- UpdateEdgeTol(E: TopoDS_Edge, MinToleranceRequest: number, MaxToleranceToCheck: number): boolean
Checks if the edge has a Tolerance smaller than MaxToleranceToCheck if so it will compute the radius of the cylindrical pipe surface that MinToleranceRequest is the minimum tolerance before it is useful to start testing. Usually it should be around 10e-5 contains all the curve representation of the edge returns True if the Edge tolerance had to be updated.
Parameters (3)EMinToleranceRequestMaxToleranceToCheck
- UpdateEdgeTolerance(S: TopoDS_Shape, MinToleranceRequest: number, MaxToleranceToCheck: number): boolean
Checks all the edges of the shape whose Tolerance is smaller than MaxToleranceToCheck Returns True if at least one edge was updated MinToleranceRequest is the minimum tolerance before it is useful to start testing. Usually it should be around 10e-5.
Warning: The method is very slow as it checks all. Use only in interfaces or processing assimilate batchParameters (3)SMinToleranceRequestMaxToleranceToCheck
- SameParameter(theEdge: TopoDS_Edge, Tolerance: number): void
Computes new 2d curve(s) for the edge <theEdge> to have the same parameter as the 3d curve. The algorithm is not done if the flag SameParameter was True on the Edge.
Parameters (2)theEdgeTolerance
- SameParameter(S: TopoDS_Shape, Tolerance: number, forced: boolean): void
Computes new 2d curve(s) for all the edges of to have the same parameter as the 3d curve. The algorithm is not done if the flag SameParameter was True on an Edge.
Parameters (3)SToleranceforced
- SameParameter(theEdge: TopoDS_Edge, theTolerance: number, theNewTol: number, IsUseOldEdge: boolean): { returnValue: TopoDS_Edge; theNewTol: number; [Symbol.dispose](): void }
Computes new 2d curve(s) for the edge <theEdge> to have the same parameter as the 3d curve. The algorithm is not done if the flag SameParameter was True on the Edge. theNewTol is a new tolerance of vertices of the input edge (not applied inside the algorithm, but pre-computed). If IsUseOldEdge is true then the input edge will be modified, otherwise the new copy of input edge will be created. Returns the new edge as a result, can be ignored if IsUseOldEdge is true.
Parameters (4)theEdgetheTolerancetheNewTolIsUseOldEdge
ReturnsA result object with fields:
returnValue: the C++ return valuetheNewTol: updated value from the call.
Dispose the returned envelope to release owned Handle fields.
- SameParameter(S: TopoDS_Shape, theReshaper: BRepTools_ReShape, Tolerance: number, forced: boolean): void
Computes new 2d curve(s) for all the edges of to have the same parameter as the 3d curve. The algorithm is not done if the flag SameParameter was True on an Edge. theReshaper is used to record the modifications of input shape to prevent any modifications on the shape itself. Thus the input shape (and its subshapes) will not be modified, instead the reshaper will contain a modified empty-copies of original subshapes as substitutions.
Parameters (4)StheReshaper—Mutated in place; read the updated value from this argument after the call.Toleranceforced
- UpdateTolerances(S: TopoDS_Shape, verifyFaceTolerance: boolean): void
Replaces tolerance of FACE EDGE VERTEX by the tolerance Max of their connected handling shapes. It is not necessary to use this call after SameParameter. (called in).
Parameters (2)SverifyFaceTolerance
- UpdateTolerances(S: TopoDS_Shape, theReshaper: BRepTools_ReShape, verifyFaceTolerance: boolean): void
Replaces tolerance of FACE EDGE VERTEX by the tolerance Max of their connected handling shapes. It is not necessary to use this call after SameParameter. (called in) theReshaper is used to record the modifications of input shape to prevent any modifications on the shape itself. Thus the input shape (and its subshapes) will not be modified, instead the reshaper will contain a modified empty-copies of original subshapes as substitutions.
Parameters (3)StheReshaper—Mutated in place; read the updated value from this argument after the call.verifyFaceTolerance
- UpdateInnerTolerances(S: TopoDS_Shape): void
Checks tolerances of edges (including inner points) and vertices of a shape and updates them to satisfy "SameParameter" condition.
Parameters (1)S
- OrientClosedSolid(solid: TopoDS_Solid): boolean
Orients the solid forward and the shell with the orientation to have matter in the solid. Returns False if the solid is unOrientable (open or incoherent).
Parameters (1)solid—Mutated in place; read the updated value from this argument after the call.
- ContinuityOfFaces(theEdge: TopoDS_Edge, theFace1: TopoDS_Face, theFace2: TopoDS_Face, theAngleTol: number): GeomAbs_Shape
Returns the order of continuity between two faces connected by an edge.
Parameters (4)theEdgetheFace1theFace2theAngleTol
- EncodeRegularity(S: TopoDS_Shape, TolAng: number): void
Encodes the Regularity of edges on a Shape. Warning: <TolAng> is an angular tolerance, expressed in Rad. Warning: If the edges's regularity are coded before, nothing is done.
Parameters (2)STolAng
- EncodeRegularity(S: TopoDS_Shape, LE: NCollection_List_TopoDS_Shape, TolAng: number): void
Encodes the Regularity of edges in list <LE> on the shape Warning: <TolAng> is an angular tolerance, expressed in Rad. Warning: If the edges's regularity are coded before, nothing is done.
Parameters (3)SLETolAng
- EncodeRegularity(E: TopoDS_Edge, F1: TopoDS_Face, F2: TopoDS_Face, TolAng: number): void
Encodes the Regularity between <F1> and <F2> by <E> Warning: <TolAng> is an angular tolerance, expressed in Rad. Warning: If the edge's regularity is coded before, nothing is done.
Parameters (4)E—Mutated in place; read the updated value from this argument after the call.F1F2TolAng
- SortFaces(S: TopoDS_Shape, LF: NCollection_List_TopoDS_Shape): void
Sorts in LF the Faces of S on the complexity of their surfaces (Plane,Cylinder,Cone,Sphere,Torus,other).
Parameters (2)SLF—Mutated in place; read the updated value from this argument after the call.
- ReverseSortFaces(S: TopoDS_Shape, LF: NCollection_List_TopoDS_Shape): void
Sorts in LF the Faces of S on the reverse complexity of their surfaces (other,Torus,Sphere,Cone,Cylinder,Plane).
Parameters (2)SLF—Mutated in place; read the updated value from this argument after the call.
- EnsureNormalConsistency(S: TopoDS_Shape, theAngTol?: number, ForceComputeNormals?: boolean): boolean
Corrects the normals in
Poly_Triangulationof faces, in such way that normals at nodes lying along smooth edges have the same value on both adjacent triangulations. Returns TRUE if any correction is done.Parameters (3)StheAngTolForceComputeNormals
- UpdateDeflection(S: TopoDS_Shape): void
Updates value of deflection in
Poly_Triangulationof faces by the maximum deviation measured on existing triangulation.Parameters (1)S
- BoundingVertex(theLV: NCollection_List_TopoDS_Shape, theNewCenter: gp_Pnt, theNewTol: number): { theNewTol: number }
Calculates the bounding sphere around the set of vertexes from the theLV list. Returns the center (theNewCenter) and the radius (theNewTol) of this sphere. This can be used to construct the new vertex which covers the given set of other vertices.
Parameters (3)theLVtheNewCenter—Mutated in place; read the updated value from this argument after the call.theNewTol
ReturnsA result object with fields:
theNewTol: updated value from the call.
- FindValidRange(theCurve: Adaptor3d_Curve, theTolE: number, theParV1: number, thePntV1: gp_Pnt, theTolV1: number, theParV2: number, thePntV2: gp_Pnt, theTolV2: number, theFirst: number, theLast: number): { returnValue: boolean; theFirst: number; theLast: number }
For an edge defined by 3d curve and tolerance and vertices defined by points, parameters on curve and tolerances, finds a range of curve between vertices not covered by vertices tolerances. Returns false if there is no such range. Otherwise, sets theFirst and theLast as its bounds.
Parameters (10)theCurvetheTolEtheParV1thePntV1theTolV1theParV2thePntV2theTolV2theFirsttheLast
ReturnsA result object with fields:
returnValue: the C++ return valuetheFirst: updated value from the call.theLast: updated value from the call.
- FindValidRange(theEdge: TopoDS_Edge, theFirst: number, theLast: number): { returnValue: boolean; theFirst: number; theLast: number }
Finds a range of 3d curve of the edge not covered by vertices tolerances. Returns false if there is no such range. Otherwise, sets theFirst and theLast as its bounds.
Parameters (3)theEdgetheFirsttheLast
ReturnsA result object with fields:
returnValue: the C++ return valuetheFirst: updated value from the call.theLast: updated value from the call.
- ExtendFace(theF: TopoDS_Face, theExtVal: number, theExtUMin: boolean, theExtUMax: boolean, theExtVMin: boolean, theExtVMax: boolean, theFExtended: TopoDS_Face): void
Enlarges the face on the given value.
Parameters (7)theF—The face to extendtheExtVal—The extension valuetheExtUMin—Defines whether to extend the face in UMin directiontheExtUMax—Defines whether to extend the face in UMax directiontheExtVMin—Defines whether to extend the face in VMin directiontheExtVMax—Defines whether to extend the face in VMax directiontheFExtended—The extended face Mutated in place; read the updated value from this argument after the call.
BRepLib_CheckCurveOnSurface
Computes the max distance between edge and its 2d representation on the face. This class is not intended to process non-sameparameter edges.
Constructors(2)
Default constructor.
- constructor(theEdge: TopoDS_Edge, theFace: TopoDS_Face): BRepLib_CheckCurveOnSurface
Constructor.
Parameters (2)theEdgetheFace
Instance methods(8)
- Init(theEdge: TopoDS_Edge, theFace: TopoDS_Face): void
Sets the data for the algorithm.
Parameters (2)theEdgetheFace
- Perform(): void
Performs the calculation If myIsParallel == true then computation will be performed in parallel.
- IsDone(): boolean
Returns true if the max distance has been found.
- SetParallel(theIsParallel: boolean): void
Sets parallel flag.
Parameters (1)theIsParallel
- IsParallel(): boolean
Returns true if parallel flag is set.
- ErrorStatus(): number
Returns error status The possible values are: 0 - OK; 1 - null curve or surface or 2d curve; 2 - invalid parametric range; 3 - error in calculations.
- MaxDistance(): number
Returns max distance.
- MaxParameter(): number
Returns parameter in which the distance is maximal.
BRepLib_Command
Root class for all commands in BRepLib.
Provides :
- Managements of the notDone flag.
- Catching of exceptions (not implemented).
- Logging (not implemented).
Instance methods(2)
BRepLib_EdgeError
Properties(7)
BRepLib_FaceError
Properties(5)
BRepLib_FindSurface
Provides an algorithm to find a Surface through a set of edges.
The edges of the shape given as argument are explored if they are not coplanar at the required tolerance the method Found returns false.
If a null tolerance is given the max of the edges tolerances is used.
The method Tolerance returns the true distance of the edges to the Surface.
The method Surface returns the Surface if found.
The method Existed returns True if the Surface was already attached to some of the edges.
When Existed returns True the Surface may have a location given by the Location method.
Constructors(2)
- constructor(S: TopoDS_Shape, Tol?: number, OnlyPlane?: boolean, OnlyClosed?: boolean): BRepLib_FindSurface
Computes the Surface from the edges of with the given tolerance. if <OnlyPlane> is true, the computed surface will be a plane. If it is not possible to find a plane, the flag NotDone will be set. If <OnlyClosed> is true, then S should be a wire and the existing surface, on which wire S is not closed in 2D, will be ignored.
Parameters (4)STolOnlyPlaneOnlyClosed
Instance methods(7)
- Init(S: TopoDS_Shape, Tol?: number, OnlyPlane?: boolean, OnlyClosed?: boolean): void
Computes the Surface from the edges of with the given tolerance. if <OnlyPlane> is true, the computed surface will be a plane. If it is not possible to find a plane, the flag NotDone will be set. If <OnlyClosed> is true, then S should be a wire and the existing surface, on which wire S is not closed in 2D, will be ignored.
Parameters (4)STolOnlyPlaneOnlyClosed
- Found(): boolean
- Tolerance(): number
- ToleranceReached(): number
- Existed(): boolean
BRepLib_FuseEdges
This class can detect vertices in a face that can be considered useless and then perform the fuse of the edges and remove the useless vertices. By useles vertices, we mean:
- vertices that have exactly two connex edges
- the edges connex to the vertex must have exactly the same 2 connex faces.
- The edges connex to the vertex must have the same geometric support.
Constructors(1)
- constructor(theShape: TopoDS_Shape, PerformNow?: boolean): BRepLib_FuseEdges
Initialise members and build construction of map of ancestors.
Parameters (2)theShapePerformNow
Instance methods(8)
- AvoidEdges(theMapEdg: NCollection_IndexedMap_TopoDS_Shape_TopTools_ShapeMapHasher): void
set edges to avoid being fused
Parameters (1)theMapEdg
- SetConcatBSpl(theConcatBSpl?: boolean): void
set mode to enable concatenation G1 BSpline edges in one End Modified by IFV 19.04.07
Parameters (1)theConcatBSpl
- Edges(theMapLstEdg: NCollection_DataMap_int_NCollection_List_TopoDS_Shape): void
returns all the list of edges to be fused each list of the map represent a set of connex edges that can be fused.
Parameters (1)theMapLstEdg—Mutated in place; read the updated value from this argument after the call.
- ResultEdges(theMapEdg: NCollection_DataMap_int_TopoDS_Shape): void
returns all the fused edges. each integer entry in the map corresponds to the integer in the DataMapOfIntegerListOfShape we get in method Edges. That is to say, to the list of edges in theMapLstEdg(i) corresponds the resulting edge theMapEdge(i)
Parameters (1)theMapEdg—Mutated in place; read the updated value from this argument after the call.
- Faces(theMapFac: NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher): void
returns the map of modified faces.
Parameters (1)theMapFac—Mutated in place; read the updated value from this argument after the call.
returns myShape modified with the list of internal edges removed from it.
- NbVertices(): number
returns the number of vertices candidate to be removed
- Perform(): void
Using map of list of connex edges, fuse each list to one edge and then update myShape.
BRepLib_MakeEdge
Provides methods to build edges.
The methods have the following syntax, where TheCurve is one of Lin, Circ, ...
Create(C : TheCurve)
Makes an edge on the whole curve. Add vertices on finite curves.
Create(C : TheCurve; p1,p2 : Real)
Make an edge on the curve between parameters p1 and p2. if p2 < p1 the edge will be REVERSED. If p1 or p2 is infinite the curve will be open in that direction. Vertices are created for finite values of p1 and p2.
Create(C : TheCurve; P1, P2 : Pnt from gp)
Make an edge on the curve between the points P1 and P2. The points are projected on the curve and the previous method is used. An error is raised if the points are not on the curve.
Create(C : TheCurve; V1, V2 : Vertex from TopoDS)
Make an edge on the curve between the vertices V1 and V2. Same as the previous but no vertices are created. If a vertex is Null the curve will be open in this direction.
Constructors(35)
- Parameters (1)
L
- Parameters (1)
L
- Parameters (1)
L
- Parameters (1)
L
- Parameters (1)
L
- Parameters (1)
L
- constructor(V1: TopoDS_Vertex, V2: TopoDS_Vertex): BRepLib_MakeEdgeParameters (2)
V1V2
- constructor(P1: gp_Pnt, P2: gp_Pnt): BRepLib_MakeEdgeParameters (2)
P1P2
- Parameters (2)
LS
- constructor(L: gp_Lin, p1: number, p2: number): BRepLib_MakeEdgeParameters (3)
Lp1p2
- constructor(L: gp_Lin, P1: gp_Pnt, P2: gp_Pnt): BRepLib_MakeEdgeParameters (3)
LP1P2
- constructor(L: gp_Lin, V1: TopoDS_Vertex, V2: TopoDS_Vertex): BRepLib_MakeEdgeParameters (3)
LV1V2
- constructor(L: gp_Circ, p1: number, p2: number): BRepLib_MakeEdgeParameters (3)
Lp1p2
- constructor(L: gp_Circ, P1: gp_Pnt, P2: gp_Pnt): BRepLib_MakeEdgeParameters (3)
LP1P2
- constructor(L: gp_Circ, V1: TopoDS_Vertex, V2: TopoDS_Vertex): BRepLib_MakeEdgeParameters (3)
LV1V2
- constructor(L: gp_Elips, p1: number, p2: number): BRepLib_MakeEdgeParameters (3)
Lp1p2
- constructor(L: gp_Elips, P1: gp_Pnt, P2: gp_Pnt): BRepLib_MakeEdgeParameters (3)
LP1P2
- constructor(L: gp_Elips, V1: TopoDS_Vertex, V2: TopoDS_Vertex): BRepLib_MakeEdgeParameters (3)
LV1V2
- constructor(L: gp_Hypr, p1: number, p2: number): BRepLib_MakeEdgeParameters (3)
Lp1p2
- constructor(L: gp_Hypr, P1: gp_Pnt, P2: gp_Pnt): BRepLib_MakeEdgeParameters (3)
LP1P2
- constructor(L: gp_Hypr, V1: TopoDS_Vertex, V2: TopoDS_Vertex): BRepLib_MakeEdgeParameters (3)
LV1V2
- constructor(L: gp_Parab, p1: number, p2: number): BRepLib_MakeEdgeParameters (3)
Lp1p2
- constructor(L: gp_Parab, P1: gp_Pnt, P2: gp_Pnt): BRepLib_MakeEdgeParameters (3)
LP1P2
- constructor(L: gp_Parab, V1: TopoDS_Vertex, V2: TopoDS_Vertex): BRepLib_MakeEdgeParameters (3)
LV1V2
- constructor(L: Geom_Curve, p1: number, p2: number): BRepLib_MakeEdgeParameters (3)
Lp1p2
- constructor(L: Geom_Curve, P1: gp_Pnt, P2: gp_Pnt): BRepLib_MakeEdgeParameters (3)
LP1P2
- constructor(L: Geom_Curve, V1: TopoDS_Vertex, V2: TopoDS_Vertex): BRepLib_MakeEdgeParameters (3)
LV1V2
- constructor(L: Geom2d_Curve, S: Geom_Surface, p1: number, p2: number): BRepLib_MakeEdgeParameters (4)
LSp1p2
- constructor(L: Geom2d_Curve, S: Geom_Surface, P1: gp_Pnt, P2: gp_Pnt): BRepLib_MakeEdgeParameters (4)
LSP1P2
- constructor(L: Geom2d_Curve, S: Geom_Surface, V1: TopoDS_Vertex, V2: TopoDS_Vertex): BRepLib_MakeEdgeParameters (4)
LSV1V2
- constructor(L: Geom_Curve, P1: gp_Pnt, P2: gp_Pnt, p1: number, p2: number): BRepLib_MakeEdgeParameters (5)
LP1P2p1p2
- constructor(L: Geom_Curve, V1: TopoDS_Vertex, V2: TopoDS_Vertex, p1: number, p2: number): BRepLib_MakeEdgeParameters (5)
LV1V2p1p2
- constructor(L: Geom2d_Curve, S: Geom_Surface, P1: gp_Pnt, P2: gp_Pnt, p1: number, p2: number): BRepLib_MakeEdgeParameters (6)
LSP1P2p1p2
- constructor(L: Geom2d_Curve, S: Geom_Surface, V1: TopoDS_Vertex, V2: TopoDS_Vertex, p1: number, p2: number): BRepLib_MakeEdgeParameters (6)
LSV1V2p1p2
Instance methods(16)
- Init(C: Geom_Curve): voidParameters (1)
C
- Init(C: Geom2d_Curve, S: Geom_Surface): voidParameters (2)
CS
- Init(C: Geom_Curve, p1: number, p2: number): voidParameters (3)
Cp1p2
- Init(C: Geom_Curve, P1: gp_Pnt, P2: gp_Pnt): voidParameters (3)
CP1P2
- Init(C: Geom_Curve, V1: TopoDS_Vertex, V2: TopoDS_Vertex): voidParameters (3)
CV1V2
- Init(C: Geom2d_Curve, S: Geom_Surface, p1: number, p2: number): voidParameters (4)
CSp1p2
- Init(C: Geom2d_Curve, S: Geom_Surface, P1: gp_Pnt, P2: gp_Pnt): voidParameters (4)
CSP1P2
- Init(C: Geom2d_Curve, S: Geom_Surface, V1: TopoDS_Vertex, V2: TopoDS_Vertex): voidParameters (4)
CSV1V2
- Init(C: Geom_Curve, P1: gp_Pnt, P2: gp_Pnt, p1: number, p2: number): voidParameters (5)
CP1P2p1p2
- Init(C: Geom_Curve, V1: TopoDS_Vertex, V2: TopoDS_Vertex, p1: number, p2: number): voidParameters (5)
CV1V2p1p2
- Init(C: Geom2d_Curve, S: Geom_Surface, P1: gp_Pnt, P2: gp_Pnt, p1: number, p2: number): voidParameters (6)
CSP1P2p1p2
- Init(C: Geom2d_Curve, S: Geom_Surface, V1: TopoDS_Vertex, V2: TopoDS_Vertex, p1: number, p2: number): voidParameters (6)
CSV1V2p1p2
Returns the error description when NotDone.
- Edge(): TopoDS_Edge
Returns the first vertex of the edge. May be Null.
Returns the second vertex of the edge. May be Null.
BRepLib_MakeEdge2d
Provides methods to build edges.
The methods have the following syntax, where TheCurve is one of Lin2d, Circ2d, ...
Create(C : TheCurve)
Makes an edge on the whole curve. Add vertices on finite curves.
Create(C : TheCurve; p1,p2 : Real)
Make an edge on the curve between parameters p1 and p2. if p2 < p1 the edge will be REVERSED. If p1 or p2 is infinite the curve will be open in that direction. Vertices are created for finite values of p1 and p2.
Create(C : TheCurve; P1, P2 : Pnt2d from gp)
Make an edge on the curve between the points P1 and P2. The points are projected on the curve and the previous method is used. An error is raised if the points are not on the curve.
Create(C : TheCurve; V1, V2 : Vertex from TopoDS)
Make an edge on the curve between the vertices V1 and V2. Same as the previous but no vertices are created. If a vertex is Null the curve will be open in this direction.
Constructors(28)
- Parameters (1)
L
- Parameters (1)
L
- Parameters (1)
L
- Parameters (1)
L
- Parameters (1)
L
- Parameters (1)
L
- constructor(V1: TopoDS_Vertex, V2: TopoDS_Vertex): BRepLib_MakeEdge2dParameters (2)
V1V2
- constructor(P1: gp_Pnt2d, P2: gp_Pnt2d): BRepLib_MakeEdge2dParameters (2)
P1P2
- constructor(L: gp_Lin2d, p1: number, p2: number): BRepLib_MakeEdge2dParameters (3)
Lp1p2
- constructor(L: gp_Lin2d, P1: gp_Pnt2d, P2: gp_Pnt2d): BRepLib_MakeEdge2dParameters (3)
LP1P2
- constructor(L: gp_Lin2d, V1: TopoDS_Vertex, V2: TopoDS_Vertex): BRepLib_MakeEdge2dParameters (3)
LV1V2
- constructor(L: gp_Circ2d, p1: number, p2: number): BRepLib_MakeEdge2dParameters (3)
Lp1p2
- constructor(L: gp_Circ2d, P1: gp_Pnt2d, P2: gp_Pnt2d): BRepLib_MakeEdge2dParameters (3)
LP1P2
- constructor(L: gp_Circ2d, V1: TopoDS_Vertex, V2: TopoDS_Vertex): BRepLib_MakeEdge2dParameters (3)
LV1V2
- constructor(L: gp_Elips2d, p1: number, p2: number): BRepLib_MakeEdge2dParameters (3)
Lp1p2
- constructor(L: gp_Elips2d, P1: gp_Pnt2d, P2: gp_Pnt2d): BRepLib_MakeEdge2dParameters (3)
LP1P2
- constructor(L: gp_Elips2d, V1: TopoDS_Vertex, V2: TopoDS_Vertex): BRepLib_MakeEdge2dParameters (3)
LV1V2
- constructor(L: gp_Hypr2d, p1: number, p2: number): BRepLib_MakeEdge2dParameters (3)
Lp1p2
- constructor(L: gp_Hypr2d, P1: gp_Pnt2d, P2: gp_Pnt2d): BRepLib_MakeEdge2dParameters (3)
LP1P2
- constructor(L: gp_Hypr2d, V1: TopoDS_Vertex, V2: TopoDS_Vertex): BRepLib_MakeEdge2dParameters (3)
LV1V2
- constructor(L: gp_Parab2d, p1: number, p2: number): BRepLib_MakeEdge2dParameters (3)
Lp1p2
- constructor(L: gp_Parab2d, P1: gp_Pnt2d, P2: gp_Pnt2d): BRepLib_MakeEdge2dParameters (3)
LP1P2
- constructor(L: gp_Parab2d, V1: TopoDS_Vertex, V2: TopoDS_Vertex): BRepLib_MakeEdge2dParameters (3)
LV1V2
- constructor(L: Geom2d_Curve, p1: number, p2: number): BRepLib_MakeEdge2dParameters (3)
Lp1p2
- constructor(L: Geom2d_Curve, P1: gp_Pnt2d, P2: gp_Pnt2d): BRepLib_MakeEdge2dParameters (3)
LP1P2
- constructor(L: Geom2d_Curve, V1: TopoDS_Vertex, V2: TopoDS_Vertex): BRepLib_MakeEdge2dParameters (3)
LV1V2
- constructor(L: Geom2d_Curve, P1: gp_Pnt2d, P2: gp_Pnt2d, p1: number, p2: number): BRepLib_MakeEdge2dParameters (5)
LP1P2p1p2
- constructor(L: Geom2d_Curve, V1: TopoDS_Vertex, V2: TopoDS_Vertex, p1: number, p2: number): BRepLib_MakeEdge2dParameters (5)
LV1V2p1p2
Instance methods(10)
- Init(C: Geom2d_Curve): voidParameters (1)
C
- Init(C: Geom2d_Curve, p1: number, p2: number): voidParameters (3)
Cp1p2
- Init(C: Geom2d_Curve, P1: gp_Pnt2d, P2: gp_Pnt2d): voidParameters (3)
CP1P2
- Init(C: Geom2d_Curve, V1: TopoDS_Vertex, V2: TopoDS_Vertex): voidParameters (3)
CV1V2
- Init(C: Geom2d_Curve, P1: gp_Pnt2d, P2: gp_Pnt2d, p1: number, p2: number): voidParameters (5)
CP1P2p1p2
- Init(C: Geom2d_Curve, V1: TopoDS_Vertex, V2: TopoDS_Vertex, p1: number, p2: number): voidParameters (5)
CV1V2p1p2
Returns the error description when NotDone.
- Edge(): TopoDS_Edge
Returns the first vertex of the edge. May be Null.
Returns the second vertex of the edge. May be Null.
BRepLib_MakeFace
Provides methods to build faces.
A face may be built :
- From a surface.
- Elementary surface from gp.
- Surface from Geom.
- From a surface and U,V values.
- From a wire.
- Find the surface automatically if possible.
- From a surface and a wire.
- A flag Inside is given, when this flag is True the wire is oriented to bound a finite area on the surface.
- From a face and a wire.
- The new wire is a perforation.
Constructors(22)
Not done.
Load a face. Useful to add wires.
Parameters (1)F
Make a face from a plane.
Parameters (1)P
Make a face from a cylinder.
Parameters (1)C
Make a face from a cone.
Parameters (1)C
Make a face from a sphere.
Parameters (1)S
Make a face from a torus.
Parameters (1)C
- constructor(S: Geom_Surface, TolDegen: number): BRepLib_MakeFace
Make a face from a Surface. Accepts tolerance value (TolDegen) for resolution of degenerated edges.
Parameters (2)STolDegen
- constructor(W: TopoDS_Wire, OnlyPlane?: boolean): BRepLib_MakeFace
Find a surface from the wire and make a face. if <OnlyPlane> is true, the computed surface will be a plane. If it is not possible to find a plane, the flag NotDone will be set.
Parameters (2)WOnlyPlane
Adds the wire <W> in the face <F>.
Parameters (2)FW
- constructor(P: gp_Pln, W: TopoDS_Wire, Inside?: boolean): BRepLib_MakeFace
Make a face from a plane and a wire.
Parameters (3)PWInside
- constructor(C: gp_Cylinder, W: TopoDS_Wire, Inside?: boolean): BRepLib_MakeFace
Make a face from a cylinder and a wire.
Parameters (3)CWInside
- constructor(C: gp_Cone, W: TopoDS_Wire, Inside?: boolean): BRepLib_MakeFace
Make a face from a cone and a wire.
Parameters (3)CWInside
- constructor(S: gp_Sphere, W: TopoDS_Wire, Inside?: boolean): BRepLib_MakeFace
Make a face from a sphere and a wire.
Parameters (3)SWInside
- constructor(C: gp_Torus, W: TopoDS_Wire, Inside?: boolean): BRepLib_MakeFace
Make a face from a torus and a wire.
Parameters (3)CWInside
- constructor(S: Geom_Surface, W: TopoDS_Wire, Inside?: boolean): BRepLib_MakeFace
Make a face from a Surface and a wire.
Parameters (3)SWInside
- constructor(P: gp_Pln, UMin: number, UMax: number, VMin: number, VMax: number): BRepLib_MakeFace
Make a face from a plane.
Parameters (5)PUMinUMaxVMinVMax
- constructor(C: gp_Cylinder, UMin: number, UMax: number, VMin: number, VMax: number): BRepLib_MakeFace
Make a face from a cylinder.
Parameters (5)CUMinUMaxVMinVMax
- constructor(C: gp_Cone, UMin: number, UMax: number, VMin: number, VMax: number): BRepLib_MakeFace
Make a face from a cone.
Parameters (5)CUMinUMaxVMinVMax
- constructor(S: gp_Sphere, UMin: number, UMax: number, VMin: number, VMax: number): BRepLib_MakeFace
Make a face from a sphere.
Parameters (5)SUMinUMaxVMinVMax
- constructor(C: gp_Torus, UMin: number, UMax: number, VMin: number, VMax: number): BRepLib_MakeFace
Make a face from a torus.
Parameters (5)CUMinUMaxVMinVMax
- constructor(S: Geom_Surface, UMin: number, UMax: number, VMin: number, VMax: number, TolDegen: number): BRepLib_MakeFace
Make a face from a Surface. Accepts min & max parameters to construct the face's bounds. Also accepts tolerance value (TolDegen) for resolution of degenerated edges.
Parameters (6)SUMinUMaxVMinVMaxTolDegen
Static methods(1)
- IsDegenerated(theCurve: Geom_Curve, theMaxTol: number, theActTol: number): { returnValue: boolean; theActTol: number }
Checks the specified curve is degenerated according to specified tolerance. Returns <theActTol> less than <theMaxTol>, which shows actual tolerance to decide the curve is degenerated. Warning: For internal use of
BRepLib_MakeFaceandBRepLib_MakeShell.Parameters (3)theCurvetheMaxToltheActTol
ReturnsA result object with fields:
returnValue: the C++ return valuetheActTol: updated value from the call.
Instance methods(6)
- Init(F: TopoDS_Face): void
Load the face.
Parameters (1)F
- Init(S: Geom_Surface, Bound: boolean, TolDegen: number): void
Creates the face from the surface. If Bound is True a wire is made from the natural bounds. Accepts tolerance value (TolDegen) for resolution of degenerated edges.
Parameters (3)SBoundTolDegen
- Init(S: Geom_Surface, UMin: number, UMax: number, VMin: number, VMax: number, TolDegen: number): void
Creates the face from the surface and the min-max values. Accepts tolerance value (TolDegen) for resolution of degenerated edges.
Parameters (6)SUMinUMaxVMinVMaxTolDegen
- Add(W: TopoDS_Wire): void
Adds the wire <W> in the current face.
Parameters (1)W
- Face(): TopoDS_Face
Returns the new face.
BRepLib_MakePolygon
Class to build polygonal wires.
A polygonal wire may be build from
- 2,4,3 points.
- 2,3,4 vertices.
- any number of points.
- any number of vertices.
When a point or vertex is added to the polygon if it is identic to the previous point no edge is built. The method added can be used to test it.
Constructors(7)
Creates an empty MakePolygon.
- constructor(P1: gp_Pnt, P2: gp_Pnt): BRepLib_MakePolygonParameters (2)
P1P2
- constructor(V1: TopoDS_Vertex, V2: TopoDS_Vertex): BRepLib_MakePolygonParameters (2)
V1V2
- constructor(P1: gp_Pnt, P2: gp_Pnt, P3: gp_Pnt, Close?: boolean): BRepLib_MakePolygonParameters (4)
P1P2P3Close
- constructor(V1: TopoDS_Vertex, V2: TopoDS_Vertex, V3: TopoDS_Vertex, Close?: boolean): BRepLib_MakePolygonParameters (4)
V1V2V3Close
- constructor(P1: gp_Pnt, P2: gp_Pnt, P3: gp_Pnt, P4: gp_Pnt, Close?: boolean): BRepLib_MakePolygonParameters (5)
P1P2P3P4Close
- constructor(V1: TopoDS_Vertex, V2: TopoDS_Vertex, V3: TopoDS_Vertex, V4: TopoDS_Vertex, Close?: boolean): BRepLib_MakePolygonParameters (5)
V1V2V3V4Close
Instance methods(8)
- Parameters (1)
P
- Add(V: TopoDS_Vertex): voidParameters (1)
V
- Added(): boolean
Returns True if the last vertex or point was successfully added.
- Close(): void
- Edge(): TopoDS_Edge
Returns the last edge added to the polygon.
- Wire(): TopoDS_Wire
BRepLib_MakeShape
This is the root class for all shape constructions. It stores the result.
It provides deferred methods to trace the history of sub-shapes.
Instance methods(8)
- Build(): void
This is called by
Shape(). It does nothing but may be redefined. returns the status of the Face after the shape creation.
Parameters (1)F
- HasDescendants(F: TopoDS_Face): boolean
Returns True if the Face generates new topology.
Parameters (1)F
returns the list of generated Faces.
Parameters (1)F
- NbSurfaces(): number
returns the number of surfaces after the shape creation.
- NewFaces(I: number): NCollection_List_TopoDS_Shape
Return the faces created for surface I.
Parameters (1)I
returns a list of the created faces from the edge <E>.
Parameters (1)E
BRepLib_MakeShell
Provides methods to build shells.
Build a shell from a set of faces. Build untied shell from a non C2 surface splitting it into C2-continuous parts.
Constructors(3)
Not done.
- constructor(S: Geom_Surface, Segment?: boolean): BRepLib_MakeShellParameters (2)
SSegment
- constructor(S: Geom_Surface, UMin: number, UMax: number, VMin: number, VMax: number, Segment?: boolean): BRepLib_MakeShellParameters (6)
SUMinUMaxVMinVMaxSegment
Instance methods(3)
- Init(S: Geom_Surface, UMin: number, UMax: number, VMin: number, VMax: number, Segment?: boolean): void
Creates the shell from the surface and the min-max values.
Parameters (6)SUMinUMaxVMinVMaxSegment
Returns the new Shell.
BRepLib_MakeSolid
Makes a solid from compsolid or shells.
Constructors(7)
Solid covers whole space.
Make a solid from a CompSolid.
Parameters (1)S
Make a solid from a shell.
Parameters (1)S
Make a solid from a solid. Useful for adding later.
Parameters (1)So
- constructor(S1: TopoDS_Shell, S2: TopoDS_Shell): BRepLib_MakeSolid
Make a solid from two shells.
Parameters (2)S1S2
- constructor(So: TopoDS_Solid, S: TopoDS_Shell): BRepLib_MakeSolid
Add a shell to a solid.
Parameters (2)SoS
- constructor(S1: TopoDS_Shell, S2: TopoDS_Shell, S3: TopoDS_Shell): BRepLib_MakeSolid
Make a solid from three shells.
Parameters (3)S1S2S3
Instance methods(3)
- Add(S: TopoDS_Shell): void
Add the shell to the current solid.
Parameters (1)S
Returns the new Solid.
returns the status of the Face after the shape creation.
Parameters (1)F
BRepLib_MakeVertex
Provides methods to build vertices.
Constructors(1)
- Parameters (1)
P
Instance methods(1)
BRepLib_MakeWire
Provides methods to build wires.
A wire may be built:
- From a single edge.
- From a wire and an edge.
- A new wire is created with the edges of the wire + the edge.
- If the edge is not connected to the wire the flag NotDone is set and the method Wire will raise an error.
- The connection may be:
. Through an existing vertex. The edge is shared.
. Through a geometric coincidence of vertices. The edge is copied and the vertices from the edge are replaced by the vertices from the wire.
. The new edge and the connection vertices are kept by the algorithm. - From 2, 3, 4 edges.
- A wire is created from the first edge, the following edges are added.
- From many edges.
- The following syntax may be used :
BRepLib_MakeWireMW;
// for all the edges ... MW.Add(anEdge);
TopoDS_WireW = MW;
Constructors(7)
NotDone MakeWire.
Make a Wire from an edge.
Parameters (1)E
Make a Wire from a Wire. Useful for adding later.
Parameters (1)W
- constructor(E1: TopoDS_Edge, E2: TopoDS_Edge): BRepLib_MakeWire
Make a Wire from two edges.
Parameters (2)E1E2
Add an edge to a wire.
Parameters (2)WE
- constructor(E1: TopoDS_Edge, E2: TopoDS_Edge, E3: TopoDS_Edge): BRepLib_MakeWire
Make a Wire from three edges.
Parameters (3)E1E2E3
- constructor(E1: TopoDS_Edge, E2: TopoDS_Edge, E3: TopoDS_Edge, E4: TopoDS_Edge): BRepLib_MakeWire
Make a Wire from four edges.
Parameters (4)E1E2E3E4
Instance methods(7)
- Add(E: TopoDS_Edge): void
Add the edge <E> to the current wire.
Parameters (1)E
- Add(W: TopoDS_Wire): void
Add the edges of <W> to the current wire.
Parameters (1)W
- Add(L: NCollection_List_TopoDS_Shape): void
Add the edges of <L> to the current wire. The edges are not to be consecutive. But they are to be all connected geometrically or topologically.
Parameters (1)L
- Wire(): TopoDS_Wire
Returns the new wire.
- Edge(): TopoDS_Edge
Returns the last edge added to the wire.
Returns the last connecting vertex.
BRepLib_PointCloudShape
This tool is intended to get points from shape with specified distance from shape along normal. Can be used to simulation of points obtained in result of laser scan of shape. There are 2 ways for generation points by shape:
- Generation points with specified density
- Generation points using triangulation Nodes Generation of points by density using the
GeneratePointsByDensity()function is not thread safe.
Instance methods(10)
Return loaded shape.
- SetShape(theShape: TopoDS_Shape): void
Set shape.
Parameters (1)theShape
- Tolerance(): number
Return tolerance.
- SetTolerance(theTol: number): void
Set tolerance.
Parameters (1)theTol
- GetDistance(): number
Returns value of the distance to define deflection of points from shape along normal to shape; 0.0 by default.
- SetDistance(theDist: number): void
Sets value of the distance to define deflection of points from shape along normal to shape. Negative values of theDist parameter are ignored.
Parameters (1)theDist
- NbPointsByDensity(theDensity?: number): number
Returns size of the point cloud for specified density.
Parameters (1)theDensity
- NbPointsByTriangulation(): number
Returns size of the point cloud for using triangulation.
- GeneratePointsByDensity(theDensity?: number): boolean
Computes points with specified density for initial shape. If parameter Density is equal to 0 then density will be computed automatically by criterion:
- 10 points per minimal unreduced face area.
Note: this function should not be called from concurrent threads without external lock.
Parameters (1)theDensity
- 10 points per minimal unreduced face area.
- GeneratePointsByTriangulation(): boolean
Get points from triangulation existing in the shape.
BRepLib_ShapeModification
Properties(5)
BRepLib_ShellError
Properties(4)
BRepLib_ToolTriangulatedShape
Provides methods for calculating normals to Poly_Triangulation of TopoDS_Face.
Constructors(1)
Static methods(2)
- ComputeNormals(theFace: TopoDS_Face, theTris: Poly_Triangulation): void
Computes nodal normals for
Poly_Triangulationstructure using UV coordinates and surface. Does nothing if triangulation already defines normals.Parameters (2)theFace—the facetheTris—the definition of a face triangulation
- ComputeNormals(theFace: TopoDS_Face, theTris: Poly_Triangulation, thePolyConnect: Poly_Connect): void
Computes nodal normals for
Poly_Triangulationstructure using UV coordinates and surface. Does nothing if triangulation already defines normals.Parameters (3)theFace—the facetheTris—the definition of a face triangulationthePolyConnect—optional, initialized tool for exploring triangulation Mutated in place; read the updated value from this argument after the call.
BRepLib_ValidateEdge
Computes the max distance between 3D-curve and curve on surface. This class uses 2 methods: approximate using finite number of points (default) and exact.
Constructors(1)
- constructor(theReferenceCurve: Adaptor3d_Curve, theOtherCurve: Adaptor3d_CurveOnSurface, theSameParameter: boolean): BRepLib_ValidateEdge
Initialization constructor.
Parameters (3)theReferenceCurvetheOtherCurvetheSameParameter
Instance methods(11)
- SetExactMethod(theIsExact: boolean): void
Sets method to calculate distance: Calculating in finite number of points (if theIsExact is false, faster, but possible not correct result) or exact calculating by using
BRepLib_CheckCurveOnSurfaceclass (if theIsExact is true, slowly, but more correctly). Exact method is used only when edge is SameParameter. Default method is calculating in finite number of points.Parameters (1)theIsExact
- IsExactMethod(): boolean
Returns true if exact method selected.
- SetParallel(theIsMultiThread: boolean): void
Sets parallel flag.
Parameters (1)theIsMultiThread
- IsParallel(): boolean
Returns true if parallel flag is set.
- SetControlPointsNumber(theControlPointsNumber: number): void
Set control points number (if you need a value other than 22).
Parameters (1)theControlPointsNumber
- SetExitIfToleranceExceeded(theToleranceForChecking: number): void
Sets limit to compute a distance in the
Process()function. If the distance greater than theToleranceForChecking theProcess()function stopped. Use this in case checking of tolerance for best performcnce. Has no effect in case using exact method.Parameters (1)theToleranceForChecking
- Process(): void
Computes the max distance for the 3d curve <myReferenceCurve> and curve on surface <myOtherCurve>. If the
SetExitIfToleranceExceeded()function was called before <myCalculatedDistance> contains first greater thanSetExitIfToleranceExceeded()parameter value. In case using exact method always computes real max distance. - IsDone(): boolean
Returns true if the distance has been found for all points.
- CheckTolerance(theToleranceToCheck: number): boolean
Returns true if computed distance is less than <theToleranceToCheck>.
Parameters (1)theToleranceToCheck
- GetMaxDistance(): number
Returns max distance.
- UpdateTolerance(theToleranceToUpdate: number): { theToleranceToUpdate: number }
Increase <theToleranceToUpdate> if max distance is greater than <theToleranceToUpdate>.
Parameters (1)theToleranceToUpdate
ReturnsA result object with fields:
theToleranceToUpdate: updated value from the call.