Salome HOME
44be26eaf61842557db6ee2290dcbe470c5a033b
[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 faces cut by new or section edges
72
73     NewEdges(me : in out) returns MapOfShape from TopTools
74         ---C++:  return &
75         is static;
76         ---Purpose: return new and section edges
77
78     AsDes(me) returns AsDes from BRepAlgo
79         is static;
80         ---Purpose: return an object containing info about
81         --             Ascendants     | Descendants
82         --          ------------------+---------------------
83         --          1. faces          | edges cutting them
84         --          2. sectoin edges  | new vertices on them
85
86
87         -------------------------------
88         ---Category: Same domain shapes
89         -------------------------------
90
91     HasSameDomainF(me; F : Shape from TopoDS)
92         returns Boolean from Standard;
93         ---Purpose: Return true if F has same domain faces
94     
95     IsSameDomainF(me; F1, F2 : Shape from TopoDS)
96         returns Boolean from Standard;
97         ---Purpose: Return true if F1 and F2 are same domain faces
98     
99     SameDomain(me; F : Face from TopoDS)
100         returns ListOfShape from TopTools;
101         ---C++:  return const &
102         ---Purpose: Return same domain faces of F
103     
104     ReplaceSameDomainV (me; V : Vertex from TopoDS;
105                             E : Edge   from TopoDS)
106         returns Vertex from TopoDS;
107         ---Purpose: return same domain vertex of  V if it was replaced
108         --          and make this vertex to be on E too, else return V
109
110         --------------------------
111         ---Category: Section edges
112         --------------------------
113
114     SectionEdgesAD (me) returns AsDes from BRepAlgo
115         is static;
116     
117     IsSectionEdge (me; E : Edge from TopoDS) 
118         returns Boolean from Standard;
119         ---Purpose: return True if E is an edge of an initial face and
120         --          E intersects aother face
121     
122     HasSectionEdge (me; F : Face from TopoDS)
123         returns Boolean from Standard;
124         ---Purpose: return True if  F  is  intersected  by  an edge of 
125         --          other face
126
127     IsSplitOn (me; NewE, OldE : Edge from TopoDS;
128                    F : Face from TopoDS)
129         returns Boolean from Standard;
130         ---Purpose: return True if NewE is split of OldE on F;
131         --          no check if NewE is split of OldE :)
132     
133     SectionEdgeFaces (me; SecE : Edge from TopoDS)
134         returns ListOfShape from TopTools;
135         ---C++:  return const&
136         ---Purpose: return faces cut by section edge
137     
138         --------------------
139         ---Category: Private
140         --------------------
141
142     Inter3D (me: in out; F1, F2 :        Face        from TopoDS;
143                          LInt   : in out ListOfShape from TopTools)
144         is static private;
145     
146     StorePart3d(me : in out; F1,F2 : Face        from TopoDS;
147                              LInt1 : ListOfShape from TopTools)
148         is static private;    
149     
150     SetDone(me : in out; F1,F2 : Face from TopoDS)
151         is static private;
152
153     Affiche (me; SetOfFaces : ListOfShape from TopTools)
154         is static private;
155     
156 fields
157
158     myAsDes        : AsDes                     from BRepAlgo;
159     myDone         : DataMapOfShapeListOfShape from TopTools;    
160     myTouched      : MapOfShape                from TopTools;
161     myNewEdges     : MapOfShape                from TopTools;
162
163         -- section edges: existing edges  that are intersection lines,
164         -- may be partially. 
165         -- Store as 
166         -- FACE -> SECTION EDGES, SECTION EDGE -> OTHER SECTION EDGE
167     mySectionEdgesAD : AsDes                   from BRepAlgo;
168     
169     -- same domain shapes
170      -- faces
171     mySameDomainFM : DataMapOfShapeListOfShape from TopTools;
172      -- vertex -> vertex replacement
173     mySameDomainVM : DataMapOfShapeShape       from TopTools;
174
175 end Inter3d;