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