Salome HOME
sources v1.2
[modules/geom.git] / src / PARTITION / Partition_Inter3d.cdl
1 --  GEOM PARTITION : partition algorithm
2 --
3 --  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 --  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 -- 
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. 
10 -- 
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. 
15 -- 
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 
19 -- 
20 --  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 --
22 --
23 --
24 --  File   : Partition_Inter3d.cdl
25 --  Author : Benedicte MARTIN
26 --  Module : GEOM
27
28 class Inter3d from Partition 
29
30         ---Purpose: Computes the intersection face face in a set of faces
31         --          Store the result in a SD as AsDes.
32
33 uses
34     Edge from TopoDS,
35     Vertex from TopoDS,
36     DataMapOfShapeShape       from TopTools,
37     MapOfShape                from TopTools,
38     Boolean                   from Standard,
39     AsDes                     from BRepAlgo,
40     Image                     from BRepAlgo,
41     Shape                     from TopoDS,
42     Face                      from TopoDS,
43     ListOfShape               from TopTools,
44     Real                      from Standard,
45     State                     from TopAbs,
46     DataMapOfShapeListOfShape from TopTools 
47
48 is
49     Create returns Inter3d from Partition;
50     
51     Create(AsDes : mutable AsDes from BRepAlgo);
52
53     CompletPart3d (me : in out; SetOfFaces1 : ListOfShape from TopTools;
54                                 FaceShapeMap: DataMapOfShapeShape from TopTools)
55         is static;
56
57     FacesPartition (me : in out; F1, F2 : Face  from TopoDS)
58         is static;
59
60         ----------------------------
61         ---Category: Result Querying
62         ----------------------------
63
64     IsDone(me ; F1,F2 : Face from TopoDS) 
65         returns Boolean from Standard is static;
66         ---Purpose: return True if F1-F2 pair has been processed
67
68     TouchedFaces(me : in out) returns MapOfShape from TopTools
69         ---C++: return &
70         is static;
71         ---Purpose: return map of 
72
73     AsDes(me) returns AsDes from BRepAlgo
74         is static;
75
76     NewEdges(me : in out) returns MapOfShape from TopTools
77         ---C++:  return &
78         is static;
79
80         -------------------------------
81         ---Category: Same domain shapes
82         -------------------------------
83
84     HasSameDomainF(me; F : Shape from TopoDS)
85         returns Boolean from Standard;
86         ---Purpose: Return true if F has same domain faces
87     
88     IsSameDomainF(me; F1, F2 : Shape from TopoDS)
89         returns Boolean from Standard;
90         ---Purpose: Return true if F1 and F2 are same domain faces
91     
92     SameDomain(me; F : Face from TopoDS)
93         returns ListOfShape from TopTools;
94         ---C++:  return const &
95         ---Purpose: Return same domain faces of F
96     
97     ReplaceSameDomainV (me; V : Vertex from TopoDS;
98                             E : Edge   from TopoDS)
99         returns Vertex from TopoDS;
100         ---Purpose: return same domain vertex of  V if it was replaced
101         --          and make this vertex to be on E too, else return V
102
103         --------------------------
104         ---Category: Section edges
105         --------------------------
106
107     SectionEdgesAD (me) returns AsDes from BRepAlgo
108         is static;
109     
110     IsSectionEdge (me; E : Edge from TopoDS) 
111         returns Boolean from Standard;
112         ---Purpose: return True if E is an edge of an initial face and
113         --          E intersects aother face
114     
115     HasSectionEdge (me; F : Face from TopoDS)
116         returns Boolean from Standard;
117         ---Purpose: return True if  F  is  intersected  by  an edge of 
118         --          other face
119
120     IsSplitOn (me; NewE, OldE : Edge from TopoDS;
121                    F : Face from TopoDS)
122         returns Boolean from Standard;
123         ---Purpose: return True if NewE is split of OldE on F;
124         --          no check if NewE is split of OldE :)
125     
126     SectionEdgeFaces (me; SecE : Edge from TopoDS)
127         returns ListOfShape from TopTools;
128         ---C++:  return const&
129         ---Purpose: return faces cut by section edge
130     
131         --------------------
132         ---Category: Private
133         --------------------
134
135     Inter3D (me: in out; F1, F2 :        Face        from TopoDS;
136                          LInt   : in out ListOfShape from TopTools)
137         is static private;
138     
139     StorePart3d(me : in out; F1,F2 : Face        from TopoDS;
140                              LInt1 : ListOfShape from TopTools)
141         is static private;    
142     
143     SetDone(me : in out; F1,F2 : Face from TopoDS)
144         is static private;
145
146     Affiche (me; SetOfFaces : ListOfShape from TopTools)
147         is static private;
148     
149 fields
150
151     myAsDes        : AsDes                     from BRepAlgo;
152     myDone         : DataMapOfShapeListOfShape from TopTools;    
153     myTouched      : MapOfShape                from TopTools;
154     myNewEdges     : MapOfShape                from TopTools;
155
156         -- section edges: existing edges  that are intersection lines,
157         -- may be partially. 
158         -- Store as 
159         -- FACE -> SECTION EDGES, SECTION EDGE -> OTHER SECTION EDGE
160     mySectionEdgesAD : AsDes                   from BRepAlgo;
161     
162     -- same domain shapes
163      -- faces
164     mySameDomainFM : DataMapOfShapeListOfShape from TopTools;
165      -- vertex -> vertex replacement
166     mySameDomainVM : DataMapOfShapeShape       from TopTools;
167
168 end Inter3d;