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 -- File : Partition_Loop2d.cdl
23 -- Author : Benedicte MARTIN
26 class Loop2d from Partition
28 ---Purpose: Builds the loops from a set of edges on a face.
29 -- It works in supposition that all constant edges
30 -- are split edges of an initialization face and all
31 -- section edges are new on the face
35 Orientation from TopAbs,
36 Boolean from Standard,
41 ListOfShape from TopTools,
42 DataMapOfShapeListOfShape from TopTools,
43 MapOfShape from TopTools
48 Init (me : in out; F : Face from TopoDS)
49 ---Purpose: Init with <F> the set of edges must have
53 AddConstEdge (me : in out; E : Edge from TopoDS)
54 ---Purpose: Add <E> as unique edge in the result.
57 AddSectionEdge (me : in out; E : Edge from TopoDS)
58 ---Purpose: Add <E> as double edge in the result.
62 ---Purpose: Make loops.
66 ---Purpose: Returns the list of wires performed.
67 -- can be an empty list.
68 ---C++: return const &
69 returns ListOfShape from TopTools;
71 WiresToFaces (me : in out; EdgeImage : Image from BRepAlgo)
72 ---Purpose: Build faces from the wires result.
73 -- <EdgeImage> serves to find original edge by new
78 ---Purpose: Returns the list of faces.
79 ---Warning: The method <WiresToFaces> as to be called before.
80 -- can be an empty list.
81 ---C++: return const &
82 returns ListOfShape from TopTools;
87 myFace : Face from TopoDS;
88 myFaceOri : Orientation from TopAbs;
89 myConstEdges : ListOfShape from TopTools;
90 myNewWires : ListOfShape from TopTools;
91 myNewFaces : ListOfShape from TopTools;
93 -- internal wires do not contain constant edges
94 myInternalWL : ListOfShape from TopTools;
96 mySectionEdges : MapOfShape from TopTools;