1 -- File: BRepLib_FuseEdges.cdl
2 -- Created: Mon Sep 10 10:36:48 2007
3 -- Author: Igor FEOKTISTOV
4 -- <ifv@philipox.nnov.matra-dtv.fr>
5 ---Copyright: Matra Datavision 2007
8 class FuseEdges from BRepLib
10 ---Purpose: This class can detect vertices in a face that can
11 -- be considered useless and then perform the fuse of
12 -- the edges and remove the useless vertices. By
13 -- useles vertices, we mean :
14 -- * vertices that have exactly two connex edges
15 -- * the edges connex to the vertex must have
16 -- exactly the same 2 connex faces .
17 -- * The edges connex to the vertex must have the
18 -- same geometric support.
24 ShapeEnum from TopAbs,
25 MapOfShape from TopTools,
26 ListOfShape from TopTools,
27 DataMapOfIntegerListOfShape from TopTools,
28 DataMapOfIntegerShape from TopTools,
29 DataMapOfShapeShape from TopTools,
30 IndexedDataMapOfShapeListOfShape from TopTools,
31 IndexedMapOfShape from TopTools
34 ConstructionError from Standard,
35 NullObject from Standard
38 Create (theShape : Shape from TopoDS;
39 PerformNow : Boolean from Standard = Standard_False)
40 returns FuseEdges from BRepLib
41 raises NullObject from Standard;
42 ---Purpose: Initialise members and build construction of map
45 AvoidEdges (me : in out; theMapEdg : IndexedMapOfShape from TopTools);
46 ---Purpose: set edges to avoid being fused
48 -- Modified by IFV 19.04.07
49 SetConcatBSpl(me : in out; theConcatBSpl : Boolean from Standard = Standard_True);
50 ---Purpose: set mode to enable concatenation G1 BSpline edges in one
51 -- End Modified by IFV 19.04.07
53 Edges (me : in out ; theMapLstEdg : in out DataMapOfIntegerListOfShape from TopTools);
54 ---Purpose: returns all the list of edges to be fused
55 -- each list of the map represent a set of connex edges
58 ResultEdges (me : in out ; theMapEdg : in out DataMapOfIntegerShape from TopTools);
59 ---Purpose: returns all the fused edges. each integer entry in
60 -- the map corresponds to the integer in the
61 -- DataMapOfIntegerListOfShape we get in method
62 -- Edges. That is to say, to the list of edges in
63 -- theMapLstEdg(i) corresponds the resulting edge theMapEdge(i)
67 Faces (me: in out; theMapFac : in out DataMapOfShapeShape from TopTools);
68 ---Purpose: returns the map of modified faces.
71 returns Shape from TopoDS
72 raises NullObject from Standard;
73 ---Purpose: returns myShape modified with the list of internal
74 -- edges removed from it.
77 NbVertices (me : in out)
78 returns Integer from Standard
79 raises NullObject from Standard;
80 ---Purpose: returns the number of vertices candidate to be removed
83 Perform (me : in out);
84 ---Purpose: Using map of list of connex edges, fuse each list to
85 -- one edge and then update myShape
88 BuildAncestors (me; S: Shape from TopoDS; TS: ShapeEnum from TopAbs;
89 TA: ShapeEnum from TopAbs; M: in out IndexedDataMapOfShapeListOfShape from TopTools)
90 ---Purpose: build a map of shapes and ancestors, like
91 -- TopExp.MapShapesAndAncestors, but we remove duplicate
92 -- shapes in list of shapes.
95 BuildListEdges (me : in out)
96 ---Purpose: Build the all the lists of edges that are to be fused
99 BuildListResultEdges (me : in out)
100 ---Purpose: Build result fused edges according to the list
101 -- builtin BuildLisEdges
104 BuildListConnexEdge (me : in out; theEdge : Shape from TopoDS; theMapUniq : in out MapOfShape from TopTools;
105 theLstEdg : in out ListOfShape from TopTools)
108 NextConnexEdge (me; theVertex : Vertex from TopoDS; theEdge : Shape from TopoDS;
109 theEdgeConnex : in out Shape from TopoDS)
110 returns Boolean from Standard
113 SameSupport (me; E1 : Edge from TopoDS; E2 :Edge from TopoDS)
114 returns Boolean from Standard
117 UpdatePCurve (me; theOldEdge : Edge from TopoDS;
118 theNewEdge : in out Edge from TopoDS;
119 theLstEdg : ListOfShape from TopTools)
120 returns Boolean from Standard
125 myShape : Shape from TopoDS;
126 myShapeDone : Boolean from Standard;
127 myEdgesDone : Boolean from Standard;
128 myResultEdgesDone : Boolean from Standard;
129 myMapVerLstEdg : IndexedDataMapOfShapeListOfShape from TopTools;
130 myMapEdgLstFac : IndexedDataMapOfShapeListOfShape from TopTools;
131 myMapLstEdg : DataMapOfIntegerListOfShape from TopTools;
132 myMapEdg : DataMapOfIntegerShape from TopTools;
133 myMapFaces : DataMapOfShapeShape from TopTools;
134 myNbConnexEdge : Integer from Standard;
135 myAvoidEdg : IndexedMapOfShape from TopTools;
136 -- Modified by IFV 19.04.07
137 myConcatBSpl : Boolean from Standard; -- to enable concatenation of G1 BSpline