1 -- Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
3 -- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 -- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 -- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 -- File: GEOMAlgo_Tools3D.cdl
25 -- Author: Peter KURNEV
27 class Tools3D from GEOMAlgo
29 ---Purpose: Auxiliary tools for Algorithms
33 ShapeEnum from TopAbs,
41 ListOfShape from TopTools,
42 IndexedMapOfShape from TopTools,
43 IndexedDataMapOfShapeListOfShape from TopTools,
44 Context from IntTools,
45 ListOfCoupleOfShape from NMTTools
50 IsSplitToReverse(myclass;
51 theSplit : Shape from TopoDS;
52 theShape : Shape from TopoDS;
53 theContext:out Context from IntTools)
54 ---Purpose: Returns True if the shape theSplit has opposite
55 -- direction than theShape
56 -- theContext - cashed geometrical tools
57 returns Boolean from Standard;
59 IsSplitToReverse(myclass;
60 theSplit : Face from TopoDS;
61 theShape : Face from TopoDS;
62 theContext:out Context from IntTools)
63 ---Purpose: Returns True if normal direction of the face
64 -- theShape is not the same as for the face
66 -- theContext - cashed geometrical tools
67 returns Boolean from Standard;
69 IsSplitToReverse(myclass;
70 theEdge : Edge from TopoDS;
71 theSplit : Edge from TopoDS;
72 theContext:out Context from IntTools)
73 ---Purpose: Returns True if tangent direction of the edge
74 -- theEdge is not the same as for the edge
76 -- theContext - cashed geometrical tools
77 returns Boolean from Standard;
80 theF1: Face from TopoDS;
81 theF2: Face from TopoDS)
82 ---Purpose: For the couple of faces theF1, theF2
83 -- computes sense value
84 -- Returns 0 if the faces are not sensible
85 -- Returns 1 if the faces have same sense
86 -- Returns 2 if the faces have opposite sense
87 returns Integer from Standard;
90 theF1: Face from TopoDS;
91 theF2:out Face from TopoDS);
92 ---Purpose: Makes new face theF2 from surface and wires
95 MakeContainer(myclass;
96 theType:ShapeEnum from TopAbs;
97 theShape:out Shape from TopoDS);
98 ---Purpose: Makes empty shape theShape of the type theType
101 MakeConnexityBlock(myclass;
102 theLS :ListOfShape from TopTools;
103 theMapAvoid:IndexedMapOfShape from TopTools;
104 theLSCB :out ListOfShape from TopTools);
105 ---Purpose: For the list of faces theLS build block
106 -- theLSCB in terms of connexity by edges
107 -- theMapAvoid - set of edges to avoid for
110 ComputeStateByOnePoint(myclass;
111 theShape :Shape from TopoDS;
112 theSolid :Solid from TopoDS;
113 theTol :Real from Standard;
114 theContext:out Context from IntTools)
115 ---Purpose: Computes the 3-D state of the shape theShape
116 -- toward solid theSolid.
117 -- theTol - value of precision of computation
118 -- theContext- cahed geometrical tools
119 -- Returns 3-D state.
120 returns State from TopAbs;
122 ComputeState(myclass;
123 thePoint :Pnt from gp;
124 theSolid :Solid from TopoDS;
125 theTol :Real from Standard;
126 theContext:out Context from IntTools)
127 ---Purpose: Computes the 3-D state of the point thePoint
128 -- toward solid theSolid.
129 -- theTol - value of precision of computation
130 -- theContext- cahed geometrical tools
131 -- Returns 3-D state.
132 returns State from TopAbs;
134 ComputeState(myclass;
135 theVertex:Vertex from TopoDS;
136 theSolid :Solid from TopoDS;
137 theTol :Real from Standard;
138 theContext:out Context from IntTools)
139 ---Purpose: Computes the 3-D state of the vertex theVertex
140 -- toward solid theSolid.
141 -- theTol - value of precision of computation
142 -- theContext- cahed geometrical tools
143 -- Returns 3-D state.
144 returns State from TopAbs;
146 ComputeState(myclass;
147 theEdge :Edge from TopoDS;
148 theSolid :Solid from TopoDS;
149 theTol :Real from Standard;
150 theContext:out Context from IntTools)
151 ---Purpose: Computes the 3-D state of the edge theEdge
152 -- toward solid theSolid.
153 -- theTol - value of precision of computation
154 -- theContext- cahed geometrical tools
155 -- Returns 3-D state.
156 returns State from TopAbs;
158 ComputeState(myclass;
159 theFace :Face from TopoDS;
160 theSolid :Solid from TopoDS;
161 theTol :Real from Standard;
162 theBounds:IndexedMapOfShape from TopTools;
163 theContext:out Context from IntTools)
164 ---Purpose: Computes the 3-D state of the face theFace
165 -- toward solid theSolid.
166 -- theTol - value of precision of computation
167 -- theBounds - set of edges of theFace to avoid
168 -- theContext- cahed geometrical tools
169 -- Returns 3-D state.
170 returns State from TopAbs;
172 IsInternalFace(myclass;
173 theFace :Face from TopoDS;
174 theEdge :Edge from TopoDS;
175 theFace1 :Face from TopoDS;
176 theFace2 :Face from TopoDS;
177 theContext:out Context from IntTools)
178 ---Purpose: Returns True if the face theFace is inside of the
179 -- couple of faces theFace1, theFace2.
180 -- The faces theFace, theFace1, theFace2 must
181 -- share the edge theEdge
182 returns Boolean from Standard;
184 IsInternalFace(myclass;
185 theFace :Face from TopoDS;
186 theEdge :Edge from TopoDS;
187 theLF :ListOfShape from TopTools;
188 theContext:out Context from IntTools)
189 ---Purpose: Returns True if the face theFace is inside of the
190 -- appropriate couple of faces (from the set theLF) .
191 -- The faces of the set theLF and theFace must
192 -- share the edge theEdge
193 returns Boolean from Standard;
195 IsInternalFace(myclass;
196 theFace :Face from TopoDS;
197 theSolid :Solid from TopoDS;
198 theMEF :IndexedDataMapOfShapeListOfShape from TopTools;
199 theTol :Real from Standard;
200 theContext:out Context from IntTools)
201 ---Purpose: Returns True if the face theFace is inside the
203 -- theMEF - Map Edge/Faces for theSolid
204 -- theTol - value of precision of computation
205 -- theContext- cahed geometrical tools
206 returns Boolean from Standard;
210 theEdge :Edge from TopoDS;
211 theFace :Face from TopoDS;
212 theLCEF :ListOfCoupleOfShape from NMTTools;
213 theFaceOff :out Face from TopoDS);
214 ---Purpose: For the face theFace and its edge theEdge
215 -- finds the face suitable to produce shell.
216 -- theLCEF - set of faces to search. All faces
217 -- from theLCEF must share edge theEdge
219 GetEdgeOnFace (myclass;
220 theEdge :Edge from TopoDS;
221 theFace :Face from TopoDS;
222 theEdgeOnF :out Edge from TopoDS)
223 ---Purpose: For the face theFace gets the edge theEdgeOnF
224 -- that is the same as theEdge
225 -- Returns True if such edge exists
226 -- Returns False if there is no such edge
227 returns Boolean from Standard;
230 theEdge :Edge from TopoDS;
231 theFace :Face from TopoDS;
232 theEdgeOff :out Edge from TopoDS)
233 ---Purpose: Returns True if the face theFace contains
234 -- the edge theEdge but with opposite orientation.
235 -- If the method returns True theEdgeOff is the
237 returns Boolean from Standard;