Salome HOME
Merge from BR_Dev_For_4_0 branch (from tag mergeto_BR_QT4_Dev_17Jan08)
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_Tools3D.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 -- File:        GEOMAlgo_Tools3D.cdl
21 -- Created:     
22 -- Author:      Peter KURNEV  
23
24 class Tools3D from GEOMAlgo 
25
26         ---Purpose:  Auxiliary tools for Algorithms   
27
28 uses  
29     State     from TopAbs,
30     ShapeEnum from TopAbs, 
31     Pnt from gp, 
32     Shape  from TopoDS, 
33     Vertex from TopoDS,
34     Edge   from TopoDS, 
35     Face   from TopoDS,  
36     Solid  from TopoDS, 
37      
38     ListOfShape       from TopTools, 
39     IndexedMapOfShape from TopTools, 
40     IndexedDataMapOfShapeListOfShape from TopTools, 
41     Context from IntTools,  
42     ListOfCoupleOfShape from NMTTools
43     
44 --raises
45
46 is 
47     IsSplitToReverse(myclass;  
48                 theSplit   :  Shape from TopoDS; 
49                 theShape   :  Shape from TopoDS; 
50                 theContext:out Context from IntTools)  
51         ---Purpose: Returns True if the shape theSplit has opposite 
52         --          direction than theShape 
53         --          theContext - cashed geometrical tools
54         returns Boolean from Standard; 
55          
56     IsSplitToReverse(myclass;  
57                 theSplit  :  Face from TopoDS; 
58                 theShape  :  Face from TopoDS; 
59                 theContext:out Context from IntTools) 
60         ---Purpose: Returns True if normal direction of the face   
61         --          theShape is not the same as for the face  
62         --          theSplit 
63         --          theContext - cashed geometrical tools 
64         returns Boolean from Standard; 
65      
66     IsSplitToReverse(myclass;  
67                 theEdge   :  Edge from TopoDS; 
68                 theSplit  :  Edge from TopoDS; 
69                 theContext:out Context from IntTools) 
70         ---Purpose: Returns True if tangent direction of the edge   
71         --          theEdge is not the same as for the edge  
72         --          theSplit    
73         --          theContext - cashed geometrical tools 
74         returns Boolean from Standard;  
75          
76     Sense  (myclass;  
77                 theF1:  Face from TopoDS; 
78                 theF2:  Face from TopoDS) 
79         ---Purpose: For the couple of faces theF1, theF2 
80         --          computes sense value                 
81         --          Returns 0 if the faces are not sensible                      
82         --          Returns 1 if the faces have same sense                       
83         --          Returns 2 if the faces have opposite sense                   
84         returns Integer from Standard; 
85
86     CopyFace(myclass;  
87                 theF1:  Face from TopoDS; 
88                 theF2:out Face from TopoDS); 
89         ---Purpose: Makes new face theF2 from surface and wires  
90         --          of the face theF1 
91          
92     MakeContainer(myclass; 
93                 theType:ShapeEnum from TopAbs; 
94                 theShape:out Shape from TopoDS); 
95         ---Purpose: Makes empty shape theShape of the type theType        
96                  
97                 
98     MakeConnexityBlock(myclass; 
99                 theLS      :ListOfShape from TopTools;   
100                 theMapAvoid:IndexedMapOfShape from TopTools;                     
101                 theLSCB    :out ListOfShape from TopTools);   
102         ---Purpose: For the list of faces theLS build block  
103         --          theLSCB in terms of connexity by edges   
104         --          theMapAvoid - set of edges to avoid for 
105         --          the treatment 
106         
107     ComputeStateByOnePoint(myclass; 
108                 theShape :Shape from TopoDS;  
109                 theSolid :Solid from TopoDS;  
110                 theTol   :Real from Standard;       
111                 theContext:out Context from IntTools) 
112         ---Purpose: Computes the 3-D state of the shape theShape 
113         --          toward solid theSolid. 
114         --          theTol - value of precision of computation   
115         --          theContext- cahed geometrical tools  
116         --          Returns 3-D state. 
117         returns State from TopAbs;  
118
119     ComputeState(myclass; 
120                 thePoint :Pnt  from gp;  
121                 theSolid :Solid from TopoDS;  
122                 theTol   :Real from Standard;       
123                 theContext:out Context from IntTools) 
124         ---Purpose: Computes the 3-D state of the point thePoint 
125         --          toward solid theSolid. 
126         --          theTol - value of precision of computation   
127         --          theContext- cahed geometrical tools  
128         --          Returns 3-D state. 
129         returns State from TopAbs;  
130         
131     ComputeState(myclass; 
132                 theVertex:Vertex from TopoDS;  
133                 theSolid :Solid from TopoDS;  
134                 theTol   :Real from Standard;       
135                 theContext:out Context from IntTools) 
136         ---Purpose: Computes the 3-D state of the vertex theVertex 
137         --          toward solid theSolid. 
138         --          theTol - value of precision of computation   
139         --          theContext- cahed geometrical tools  
140         --          Returns 3-D state. 
141         returns State from TopAbs;  
142         
143     ComputeState(myclass; 
144                 theEdge  :Edge  from TopoDS;  
145                 theSolid :Solid from TopoDS;  
146                 theTol   :Real from Standard;       
147                 theContext:out Context from IntTools) 
148         ---Purpose: Computes the 3-D state of the edge theEdge 
149         --          toward solid theSolid. 
150         --          theTol - value of precision of computation   
151         --          theContext- cahed geometrical tools  
152         --          Returns 3-D state. 
153         returns State from TopAbs;  
154         
155     ComputeState(myclass; 
156                 theFace  :Face  from TopoDS;  
157                 theSolid :Solid from TopoDS;  
158                 theTol   :Real from Standard;  
159                 theBounds:IndexedMapOfShape from TopTools;               
160                 theContext:out Context from IntTools) 
161         ---Purpose: Computes the 3-D state of the face theFace 
162         --          toward solid theSolid. 
163         --          theTol - value of precision of computation   
164         --          theBounds - set of edges of theFace to avoid          
165         --          theContext- cahed geometrical tools  
166         --          Returns 3-D state. 
167         returns State from TopAbs; 
168
169     IsInternalFace(myclass; 
170                 theFace  :Face from TopoDS; 
171                 theEdge  :Edge from TopoDS; 
172                 theFace1 :Face from TopoDS; 
173                 theFace2 :Face from TopoDS) 
174         ---Purpose: Returns True if the face theFace is inside of the  
175         --          couple of faces theFace1, theFace2. 
176         --          The faces theFace, theFace1, theFace2  must 
177         --          share the edge theEdge       
178         returns Boolean from Standard; 
179          
180     IsInternalFace(myclass; 
181                 theFace :Face  from TopoDS; 
182                 theEdge :Edge  from TopoDS; 
183                 theLF   :ListOfShape from TopTools)  
184         ---Purpose: Returns True if the face theFace is inside of the  
185         --          appropriate couple of faces (from the set theLF)    . 
186         --          The faces of the set theLF and theFace  must 
187         --          share the edge theEdge      
188         returns Boolean from Standard;  
189          
190     IsInternalFace(myclass; 
191                 theFace  :Face  from TopoDS; 
192                 theSolid :Solid from TopoDS; 
193                 theMEF   :IndexedDataMapOfShapeListOfShape from TopTools;
194                 theTol   :Real from Standard;       
195                 theContext:out Context from IntTools)  
196         ---Purpose: Returns True if the face theFace is inside the  
197         --          solid theSolid. 
198         --          theMEF - Map Edge/Faces for theSolid                 
199         --          theTol - value of precision of computation   
200         --          theContext- cahed geometrical tools   
201         returns Boolean from Standard; 
202         
203     
204     GetFaceOff(myclass;  
205                 theEdge    :Edge  from TopoDS;  
206                 theFace    :Face  from TopoDS; 
207                 theLCEF    :ListOfCoupleOfShape from NMTTools; 
208                 theFaceOff :out Face  from TopoDS); 
209         ---Purpose:  For the face theFace and its edge theEdge 
210         --           finds the face suitable to produce shell. 
211         --           theLCEF - set of faces to search. All faces 
212         --           from theLCEF must share edge theEdge 
213          
214     GetEdgeOnFace (myclass;  
215                 theEdge    :Edge  from TopoDS;  
216                 theFace    :Face  from TopoDS;  
217                 theEdgeOnF :out Edge  from TopoDS)  
218         ---Purpose: For the face theFace gets the edge theEdgeOnF 
219         --          that is the same as theEdge 
220         --          Returns True if such edge exists             
221         --          Returns False if there is no such edge       
222         returns Boolean from Standard; 
223          
224     GetEdgeOff (myclass;  
225                 theEdge    :Edge  from TopoDS;  
226                 theFace    :Face  from TopoDS;  
227                 theEdgeOff :out Edge  from TopoDS) 
228         ---Purpose: Returns True if the face theFace contains 
229         --          the edge theEdge but with opposite orientation. 
230         --          If the method  returns True theEdgeOff is the 
231         --          edge founded         
232         returns Boolean from Standard; 
233
234 --fields
235 end Tools3D; 
236