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