Salome HOME
Update mail address
[modules/geom.git] / src / PARTITION / Partition_Loop2d.cdl
1 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 // 
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.
8 // 
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.
13 //
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
17 //
18 -- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 //
20 --  GEOM PARTITION : partition algorithm
21 --
22 --  Copyright (C) 2003  CEA/DEN, EDF R&D
23 --
24 --
25 --
26 --  File   : Partition_Loop2d.cdl
27 --  Author : Benedicte MARTIN
28 --  Module : GEOM
29
30 class Loop2d from Partition
31
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
36
37 uses
38
39     Orientation               from TopAbs,
40     Boolean                   from Standard,
41     Face                      from TopoDS,
42     Image                     from BRepAlgo,
43     Face                      from TopoDS,
44     Edge                      from TopoDS,
45     ListOfShape               from TopTools,
46     DataMapOfShapeListOfShape from TopTools,
47     MapOfShape                from TopTools
48 is
49
50     Create;
51     
52     Init (me : in out; F : Face from TopoDS)
53         ---Purpose: Init with <F> the set of edges must have
54         --          pcurves on <F>. 
55     is static;
56     
57     AddConstEdge  (me : in out; E : Edge from TopoDS)
58         ---Purpose: Add <E> as unique edge in the result.
59     is static;
60
61     AddSectionEdge  (me : in out; E : Edge from TopoDS)
62         ---Purpose: Add <E> as double edge in the result.
63     is static;
64
65     Perform(me : in out)
66         ---Purpose: Make loops.
67     is static;
68     
69     NewWires (me)       
70         ---Purpose: Returns the list of wires performed. 
71         --          can be an empty list.
72         ---C++: return const &
73     returns ListOfShape from TopTools;
74         
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
78         --           one.
79     is static;
80     
81     NewFaces (me)
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;
87
88     
89 fields
90
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;
96
97      -- internal wires do not contain constant edges
98     myInternalWL : ListOfShape from TopTools;
99     
100     mySectionEdges : MapOfShape from TopTools;
101     
102 end Loop2d;