Salome HOME
Join modifications from branch BR_DEBUG_3_2_0b1
[modules/geom.git] / src / PARTITION / Partition_Loop.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  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
23 --  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
24 -- 
25 --  This library is free software; you can redistribute it and/or 
26 --  modify it under the terms of the GNU Lesser General Public 
27 --  License as published by the Free Software Foundation; either 
28 --  version 2.1 of the License. 
29 -- 
30 --  This library is distributed in the hope that it will be useful, 
31 --  but WITHOUT ANY WARRANTY; without even the implied warranty of 
32 --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
33 --  Lesser General Public License for more details. 
34 -- 
35 --  You should have received a copy of the GNU Lesser General Public 
36 --  License along with this library; if not, write to the Free Software 
37 --  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
38 -- 
39 -- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
40 --
41 --
42 --
43 --  File   : Partition_Loop.cdl
44 --  Author : Benedicte MARTIN
45 --  Module : GEOM
46
47 class Loop from Partition
48
49         ---Purpose: Builds the loops from a set of edges on a face.
50
51 uses
52
53     Face                      from TopoDS,
54     Edge                      from TopoDS,
55     ListOfShape               from TopTools,
56     DataMapOfShapeListOfShape from TopTools
57
58 is
59
60     Create;
61     
62     Init (me : in out; F : Face from TopoDS)
63         ---Purpose: Init with <F> the set of edges must have
64         --          pcurves on <F>. 
65     is static;
66     
67     AddEdge (me : in out; E  : in out Edge from TopoDS;
68                           LV : ListOfShape from TopTools)
69         ---Purpose: Add E with <LV>. <E> will be copied and trim 
70         --          by vertices in <LV>.
71     is static;
72     
73     AddConstEdge  (me : in out; E : Edge from TopoDS)
74         ---Purpose: Add <E> as const edge, E can be in the result.
75     is static;
76
77     Perform(me : in out)
78         ---Purpose: Make loops.
79     is static;
80     
81     NewWires (me)       
82         ---Purpose: Returns the list of wires performed. 
83         --          can be an empty list.
84         ---C++: return const &
85     returns ListOfShape from TopTools;
86         
87     WiresToFaces (me : in out)
88         ---Purpose:  Build faces from the wires result.
89     is static;
90     
91     NewFaces (me)
92         ---Purpose: Returns the list of faces.
93         ---Warning: The method <WiresToFaces> as to be called before.
94         --          can be an empty list.
95         ---C++: return const &
96     returns ListOfShape from TopTools;
97
98     
99 fields
100
101     myFace       : Face                      from TopoDS;
102     myConstEdges : ListOfShape               from TopTools;
103     myNewWires   : ListOfShape               from TopTools;
104     myNewFaces   : ListOfShape               from TopTools;
105          
106 end Loop;