1 -- Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 -- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 -- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 -- This library is free software; you can redistribute it and/or
7 -- modify it under the terms of the GNU Lesser General Public
8 -- License as published by the Free Software Foundation; either
9 -- version 2.1 of the License.
11 -- This library is distributed in the hope that it will be useful,
12 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
13 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 -- Lesser General Public License for more details.
16 -- You should have received a copy of the GNU Lesser General Public
17 -- License along with this library; if not, write to the Free Software
18 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 -- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 -- GEOM PARTITION : partition algorithm
24 -- File : Partition_Loop2d.cdl
25 -- Author : Benedicte MARTIN
28 class Loop2d from Partition
30 ---Purpose: Builds the loops from a set of edges on a face.
31 -- It works in supposition that all constant edges
32 -- are split edges of an initialization face and all
33 -- section edges are new on the face
37 Orientation from TopAbs,
38 Boolean from Standard,
43 ListOfShape from TopTools,
44 DataMapOfShapeListOfShape from TopTools,
45 MapOfShape from TopTools
50 Init (me : in out; F : Face from TopoDS)
51 ---Purpose: Init with <F> the set of edges must have
55 AddConstEdge (me : in out; E : Edge from TopoDS)
56 ---Purpose: Add <E> as unique edge in the result.
59 AddSectionEdge (me : in out; E : Edge from TopoDS)
60 ---Purpose: Add <E> as double edge in the result.
64 ---Purpose: Make loops.
68 ---Purpose: Returns the list of wires performed.
69 -- can be an empty list.
70 ---C++: return const &
71 returns ListOfShape from TopTools;
73 WiresToFaces (me : in out; EdgeImage : Image from BRepAlgo)
74 ---Purpose: Build faces from the wires result.
75 -- <EdgeImage> serves to find original edge by new
80 ---Purpose: Returns the list of faces.
81 ---Warning: The method <WiresToFaces> as to be called before.
82 -- can be an empty list.
83 ---C++: return const &
84 returns ListOfShape from TopTools;
89 myFace : Face from TopoDS;
90 myFaceOri : Orientation from TopAbs;
91 myConstEdges : ListOfShape from TopTools;
92 myNewWires : ListOfShape from TopTools;
93 myNewFaces : ListOfShape from TopTools;
95 -- internal wires do not contain constant edges
96 myInternalWL : ListOfShape from TopTools;
98 mySectionEdges : MapOfShape from TopTools;