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