BRepAlgo
OCCT package BRepAlgo: BRepAlgo, BRepAlgo_AsDes, BRepAlgo_FaceRestrictor, BRepAlgo_Image, and 2 more bound classes.
BRepAlgo
The BRepAlgo class provides the following tools for:
- Checking validity of the shape;
- Concatenation of the edges of the wire.
Constructors(1)
Static methods(7)
- ConcatenateWire(Wire: TopoDS_Wire, Option: GeomAbs_Shape, AngularTolerance?: number): TopoDS_Wire
this method makes a wire whose edges are C1 from a Wire whose edges could be G1. It removes a vertex between G1 edges. Option can be G1 or C1.
Parameters (3)WireOptionAngularTolerance
- ConcatenateWireC0(Wire: TopoDS_Wire): TopoDS_Edge
this method makes an edge from a wire. Junction points between edges of wire may be sharp, resulting curve of the resulting edge may be C0.
Parameters (1)Wire
- ConvertWire(theWire: TopoDS_Wire, theAngleTolerance: number, theFace: TopoDS_Face): TopoDS_Wire
Method of wire conversion, calls BRepAlgo_Approx internally.
Parameters (3)theWire—Input Wire object.theAngleTolerance—Angle (in radians) defining the continuity of the wire: if two vectors differ by less than this angle, the result will be smooth (zero angle of tangent lines between curve elements).theFace
ReturnsThe new
TopoDS_Wireobject consisting of edges each representing an arc of circle or a linear segment. The accuracy of conversion is defined as the maximal tolerance of edges in theWire. - ConvertFace(theFace: TopoDS_Face, theAngleTolerance: number): TopoDS_Face
Method of face conversion. The API corresponds to the method ConvertWire. This is a shortcut for calling
ConvertWire()for each wire in theFace.Parameters (2)theFacetheAngleTolerance
- IsValid(S: TopoDS_Shape): boolean
Checks if the shape is "correct". If not, returns <false>, else returns <true>.
Parameters (1)S
- IsValid(theArgs: NCollection_List_TopoDS_Shape, theResult: TopoDS_Shape, closedSolid: boolean, GeomCtrl: boolean): boolean
Checks if the Generated and Modified Faces from the shapes <arguments> in the shape <result> are "correct". The args may be empty, then all faces will be checked. If <Closed> is True, only closed shape are valid. If <GeomCtrl> is False the geometry of new vertices and edges are not verified and the auto-intersection of new wires are not searched.
Parameters (4)theArgstheResultclosedSolidGeomCtrl
- IsTopologicallyValid(S: TopoDS_Shape): boolean
Checks if the shape is "correct". If not, returns FALSE, else returns TRUE. This method differs from the previous one in the fact that no geometric controls (intersection of wires, pcurve validity) are performed.
Parameters (1)S
BRepAlgo_AsDes
SD to store descendants and ascendants of Shapes.
Constructors(1)
Creates an empty AsDes.
Static methods(2)
- get_type_name(): string
Instance methods(12)
- Clear(): void
- Add(S: TopoDS_Shape, SS: TopoDS_Shape): void
Stores <SS> as a futur subshape of .
Parameters (2)SSS
- Add(S: TopoDS_Shape, SS: NCollection_List_TopoDS_Shape): void
Stores <SS> as futurs SubShapes of .
Parameters (2)SSS
- HasAscendant(S: TopoDS_Shape): booleanParameters (1)
S
- HasDescendant(S: TopoDS_Shape): booleanParameters (1)
S
Returns the Shape containing .
Parameters (1)S
Returns futur subhapes of .
Parameters (1)S
Returns futur subhapes of .
Parameters (1)S
- Replace(theOldS: TopoDS_Shape, theNewS: TopoDS_Shape): void
Replace theOldS by theNewS. theOldS disappear from this.
Parameters (2)theOldStheNewS
- Remove(theS: TopoDS_Shape): void
Remove theS from me.
Parameters (1)theS
- HasCommonDescendant(S1: TopoDS_Shape, S2: TopoDS_Shape, LC: NCollection_List_TopoDS_Shape): boolean
Returns True if (S1> and <S2> has common Descendants. Stores in <LC> the Commons Descendants.
Parameters (3)S1S2LC—Mutated in place; read the updated value from this argument after the call.
BRepAlgo_FaceRestrictor
Builds all the faces limited with a set of non jointing and planars wires. if <ControlOrientation> is false The Wires must have correct orientations. Sinon orientation des wires de telle sorte que les faces ne soient pas infinies et qu'elles soient disjointes.
Constructors(1)
Instance methods(8)
- Init(F: TopoDS_Face, Proj?: boolean, ControlOrientation?: boolean): void
the surface of <F> will be the surface of each new faces built. <Proj> is used to update pcurves on edges if necessary. See
Add().Parameters (3)FProjControlOrientation
- Add(W: TopoDS_Wire): void
Add the wire <W> to the set of wires.
Warning: The Wires must be closed.
The edges of <W> can be modified if they don't have pcurves on the surface of <F>. In this case if <Proj> is false the first pcurve of the edge is positioned on . if <Proj> is True, the Pcurve On is the projection of the curve 3d on <F>.Parameters (1)W—Mutated in place; read the updated value from this argument after the call.
- Clear(): void
Removes all the Wires.
- Perform(): void
Evaluate all the faces limited by the set of Wires.
- IsDone(): boolean
- More(): boolean
- Next(): void
BRepAlgo_Image
Stores link between a shape and a shape <NewS> obtained from . <NewS> is an image of .
Constructors(1)
Instance methods(18)
- SetRoot(S: TopoDS_Shape): voidParameters (1)
S
- Bind(OldS: TopoDS_Shape, NewS: TopoDS_Shape): void
Links <NewS> as image of <OldS>.
Parameters (2)OldSNewS
- Bind(OldS: TopoDS_Shape, NewS: NCollection_List_TopoDS_Shape): void
Links <NewS> as image of <OldS>.
Parameters (2)OldSNewS
- Add(OldS: TopoDS_Shape, NewS: TopoDS_Shape): void
Add <NewS> to the image of <OldS>.
Parameters (2)OldSNewS
- Add(OldS: TopoDS_Shape, NewS: NCollection_List_TopoDS_Shape): void
Add <NewS> to the image of <OldS>.
Parameters (2)OldSNewS
- Clear(): void
- Remove(S: TopoDS_Shape): void
Remove to set of images.
Parameters (1)S
- RemoveRoot(Root: TopoDS_Shape): void
Removes the root <theRoot> from the list of roots and up and down maps.
Parameters (1)Root
- ReplaceRoot(OldRoot: TopoDS_Shape, NewRoot: TopoDS_Shape): void
Replaces the <OldRoot> with the <NewRoot>, so all images of the <OldRoot> become the images of the <NewRoot>. The <OldRoot> is removed.
Parameters (2)OldRootNewRoot
- IsImage(S: TopoDS_Shape): booleanParameters (1)
S
Returns the generator of .
Parameters (1)S
- Root(S: TopoDS_Shape): TopoDS_Shape
Returns the upper generator of .
Parameters (1)S
- HasImage(S: TopoDS_Shape): booleanParameters (1)
S
Returns the Image of . Returns in the list if HasImage(S) is false.
Parameters (1)S
- LastImage(S: TopoDS_Shape, L: NCollection_List_TopoDS_Shape): void
Stores in <L> the images of images of...images of . <L> contains only if HasImage(S) is false.
Parameters (2)SL—Mutated in place; read the updated value from this argument after the call.
- Compact(): void
Keeps only the link between roots and lastimage.
- Filter(S: TopoDS_Shape, ShapeType: TopAbs_ShapeEnum): void
Deletes in the images the shape of type <ShapeType> which are not in . Warning:
Compact()must be call before.Parameters (2)SShapeType
BRepAlgo_Loop
Builds the loops from a set of edges on a face.
Constructors(1)
Instance methods(16)
- Init(F: TopoDS_Face): void
Init with <F> the set of edges must have pcurves on <F>.
Parameters (1)F
- AddEdge(E: TopoDS_Edge, LV: NCollection_List_TopoDS_Shape): void
Add E with <LV>. <E> will be copied and trim by vertices in <LV>.
Parameters (2)E—Mutated in place; read the updated value from this argument after the call.LV
- AddConstEdge(E: TopoDS_Edge): void
Add <E> as const edge, E can be in the result.
Parameters (1)E
- AddConstEdges(LE: NCollection_List_TopoDS_Shape): void
Add <LE> as a set of const edges.
Parameters (1)LE
- SetImageVV(theImageVV: BRepAlgo_Image): void
Sets the Image Vertex - Vertex.
Parameters (1)theImageVV
- Perform(): void
Make loops.
- UpdateVEmap(theVEmap: NCollection_IndexedDataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher): void
Update VE map according to Image Vertex - Vertex.
Parameters (1)theVEmap—Mutated in place; read the updated value from this argument after the call.
- CutEdge(E: TopoDS_Edge, VonE: NCollection_List_TopoDS_Shape, NE: NCollection_List_TopoDS_Shape): void
Cut the edge <E> in several edges <NE> on the vertices<VonE>.
Parameters (3)EVonENE—Mutated in place; read the updated value from this argument after the call.
Returns the list of wires performed. can be an empty list.
- WiresToFaces(): void
Build faces from the wires result.
Returns the list of faces. Warning: The method <WiresToFaces> as to be called before. can be an empty list.
Returns the list of new edges built from an edge <E> it can be an empty list.
Parameters (1)E
- GetVerticesForSubstitute(VerVerMap: NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher): void
Returns the datamap of vertices with their substitutes.
Parameters (1)VerVerMap—Mutated in place; read the updated value from this argument after the call.
- VerticesForSubstitute(VerVerMap: NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher): voidParameters (1)
VerVerMap
- SetTolConf(theTolConf: number): void
Set maximal tolerance used for comparing distances between vertices.
Parameters (1)theTolConf
- GetTolConf(): number
Get maximal tolerance used for comparing distances between vertices.
BRepAlgo_NormalProjection
This class makes the projection of a wire on a shape.
Constructors(2)
- Parameters (1)
S
Instance methods(15)
- Init(S: TopoDS_Shape): voidParameters (1)
S
- Add(ToProj: TopoDS_Shape): void
Add an edge or a wire to the list of shape to project.
Parameters (1)ToProj
- SetParams(Tol3D: number, Tol2D: number, InternalContinuity: GeomAbs_Shape, MaxDegree: number, MaxSeg: number): void
Set the parameters used for computation Tol3d is the required tolerance between the 3d projected curve and its 2d representation InternalContinuity is the order of constraints used for approximation. MaxDeg and MaxSeg are the maximum degree and the maximum number of segment for BSpline resulting of an approximation.
Parameters (5)Tol3DTol2DInternalContinuityMaxDegreeMaxSeg
- SetDefaultParams(): void
Set the parameters used for computation in their default values.
- SetMaxDistance(MaxDist: number): void
Sets the maximum distance between target shape and shape to project. If this condition is not satisfied then corresponding part of solution is discarded. if MaxDist < 0 then this method does not affect the algorithm.
Parameters (1)MaxDist
- Compute3d(With3d?: boolean): void
if With3d = false the 3dcurve is not computed the initial 3dcurve is kept to build the resulting edges.
Parameters (1)With3d
- SetLimit(FaceBoundaries?: boolean): void
Manage limitation of projected edges.
Parameters (1)FaceBoundaries
- Build(): void
Builds the result as a compound.
- IsDone(): boolean
returns the result
For a resulting edge, returns the corresponding initial edge.
Parameters (1)E
For a projected edge, returns the corresponding initial face.
Parameters (1)E
Returns the list of shapes generated from the shape .
Parameters (1)S
- IsElementary(C: Adaptor3d_Curve): booleanParameters (1)
C
- BuildWire(Liste: NCollection_List_TopoDS_Shape): boolean
build the result as a list of wire if possible in - a first returns a wire only if there is only a wire.
Parameters (1)Liste—Mutated in place; read the updated value from this argument after the call.