| 1 | -- File: BRepAlgo_Loop.cdl |
| 2 | -- Created: Fri Nov 10 15:58:31 1995 |
| 3 | -- Author: Yves FRICAUD |
| 4 | -- <yfr@stylox> |
| 5 | ---Copyright: Matra Datavision 1995 |
| 6 | |
| 7 | |
| 8 | class Loop from BRepAlgo |
| 9 | |
| 10 | ---Purpose: Builds the loops from a set of edges on a face. |
| 11 | |
| 12 | uses |
| 13 | |
| 14 | Face from TopoDS, |
| 15 | Edge from TopoDS, |
| 16 | ListOfShape from TopTools, |
| 17 | DataMapOfShapeListOfShape from TopTools, |
| 18 | DataMapOfShapeShape from TopTools |
| 19 | |
| 20 | is |
| 21 | |
| 22 | Create; |
| 23 | |
| 24 | Init (me : in out; F : Face from TopoDS) |
| 25 | ---Purpose: Init with <F> the set of edges must have |
| 26 | -- pcurves on <F>. |
| 27 | is static; |
| 28 | |
| 29 | AddEdge (me : in out; E : in out Edge from TopoDS; |
| 30 | LV : ListOfShape from TopTools) |
| 31 | ---Purpose: Add E with <LV>. <E> will be copied and trim |
| 32 | -- by vertices in <LV>. |
| 33 | is static; |
| 34 | |
| 35 | AddConstEdge (me : in out; E : Edge from TopoDS) |
| 36 | ---Purpose: Add <E> as const edge, E can be in the result. |
| 37 | is static; |
| 38 | |
| 39 | AddConstEdges (me : in out; LE : ListOfShape from TopTools) |
| 40 | ---Purpose: Add <LE> as a set of const edges. |
| 41 | is static; |
| 42 | |
| 43 | Perform(me : in out) |
| 44 | ---Purpose: Make loops. |
| 45 | is static; |
| 46 | |
| 47 | CutEdge(me; |
| 48 | E : Edge from TopoDS; |
| 49 | VonE : ListOfShape from TopTools; |
| 50 | NE : in out ListOfShape from TopTools) |
| 51 | ---Purpose: Cut the edge <E> in several edges <NE> on the |
| 52 | -- vertices<VonE>. |
| 53 | is static; |
| 54 | |
| 55 | NewWires (me) |
| 56 | ---Purpose: Returns the list of wires performed. |
| 57 | -- can be an empty list. |
| 58 | ---C++: return const & |
| 59 | returns ListOfShape from TopTools; |
| 60 | |
| 61 | WiresToFaces (me : in out) |
| 62 | ---Purpose: Build faces from the wires result. |
| 63 | is static; |
| 64 | |
| 65 | NewFaces (me) |
| 66 | ---Purpose: Returns the list of faces. |
| 67 | -- Warning: The method <WiresToFaces> as to be called before. |
| 68 | -- can be an empty list. |
| 69 | ---C++: return const & |
| 70 | returns ListOfShape from TopTools; |
| 71 | |
| 72 | NewEdges (me ; E : Edge from TopoDS) |
| 73 | ---Purpose: Returns the list of new edges built from an edge <E> |
| 74 | -- it can be an empty list. |
| 75 | ---C++: return const & |
| 76 | returns ListOfShape from TopTools; |
| 77 | |
| 78 | GetVerticesForSubstitute (me; VerVerMap: out DataMapOfShapeShape from TopTools); |
| 79 | ---Purpose: Returns the datamap of vertices with their substitutes. |
| 80 | |
| 81 | VerticesForSubstitute (me : in out; VerVerMap: in out DataMapOfShapeShape from TopTools); |
| 82 | ---Purpose: |
| 83 | |
| 84 | fields |
| 85 | |
| 86 | myFace : Face from TopoDS; |
| 87 | myConstEdges : ListOfShape from TopTools; |
| 88 | myVerOnEdges : DataMapOfShapeListOfShape from TopTools; |
| 89 | myNewWires : ListOfShape from TopTools; |
| 90 | myNewFaces : ListOfShape from TopTools; |
| 91 | myNewEdges : DataMapOfShapeListOfShape from TopTools; |
| 92 | |
| 93 | myVerticesForSubstitute : DataMapOfShapeShape from TopTools; |
| 94 | |
| 95 | end Loop; |