1 // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/
20 -- GEOM PARTITION : partition algorithm
22 -- Copyright (C) 2003 CEA/DEN, EDF R&D
26 -- File : Partition_Loop2d.cdl
27 -- Author : Benedicte MARTIN
30 class Loop2d from Partition
32 ---Purpose: Builds the loops from a set of edges on a face.
33 -- It works in supposition that all constant edges
34 -- are split edges of an initialization face and all
35 -- section edges are new on the face
39 Orientation from TopAbs,
40 Boolean from Standard,
45 ListOfShape from TopTools,
46 DataMapOfShapeListOfShape from TopTools,
47 MapOfShape from TopTools
52 Init (me : in out; F : Face from TopoDS)
53 ---Purpose: Init with <F> the set of edges must have
57 AddConstEdge (me : in out; E : Edge from TopoDS)
58 ---Purpose: Add <E> as unique edge in the result.
61 AddSectionEdge (me : in out; E : Edge from TopoDS)
62 ---Purpose: Add <E> as double edge in the result.
66 ---Purpose: Make loops.
70 ---Purpose: Returns the list of wires performed.
71 -- can be an empty list.
72 ---C++: return const &
73 returns ListOfShape from TopTools;
75 WiresToFaces (me : in out; EdgeImage : Image from BRepAlgo)
76 ---Purpose: Build faces from the wires result.
77 -- <EdgeImage> serves to find original edge by new
82 ---Purpose: Returns the list of faces.
83 ---Warning: The method <WiresToFaces> as to be called before.
84 -- can be an empty list.
85 ---C++: return const &
86 returns ListOfShape from TopTools;
91 myFace : Face from TopoDS;
92 myFaceOri : Orientation from TopAbs;
93 myConstEdges : ListOfShape from TopTools;
94 myNewWires : ListOfShape from TopTools;
95 myNewFaces : ListOfShape from TopTools;
97 -- internal wires do not contain constant edges
98 myInternalWL : ListOfShape from TopTools;
100 mySectionEdges : MapOfShape from TopTools;