1 -- Copyright (C) 2007-2008 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
22 -- File: GEOMAlgo_Tools3D.cdl
24 -- Author: Peter KURNEV
26 class Tools3D from GEOMAlgo
28 ---Purpose: Auxiliary tools for Algorithms
32 ShapeEnum from TopAbs,
40 ListOfShape from TopTools,
41 IndexedMapOfShape from TopTools,
42 IndexedDataMapOfShapeListOfShape from TopTools,
43 Context from IntTools,
44 ListOfCoupleOfShape from NMTTools
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;
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
65 -- theContext - cashed geometrical tools
66 returns Boolean from Standard;
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
75 -- theContext - cashed geometrical tools
76 returns Boolean from Standard;
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;
89 theF1: Face from TopoDS;
90 theF2:out Face from TopoDS);
91 ---Purpose: Makes new face theF2 from surface and wires
94 MakeContainer(myclass;
95 theType:ShapeEnum from TopAbs;
96 theShape:out Shape from TopoDS);
97 ---Purpose: Makes empty shape theShape of the type theType
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
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;
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;
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;
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;
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;
171 IsInternalFace(myclass;
172 theFace :Face from TopoDS;
173 theEdge :Edge from TopoDS;
174 theFace1 :Face from TopoDS;
175 theFace2 :Face from TopoDS;
176 theContext:out Context from IntTools)
177 ---Purpose: Returns True if the face theFace is inside of the
178 -- couple of faces theFace1, theFace2.
179 -- The faces theFace, theFace1, theFace2 must
180 -- share the edge theEdge
181 returns Boolean from Standard;
183 IsInternalFace(myclass;
184 theFace :Face from TopoDS;
185 theEdge :Edge from TopoDS;
186 theLF :ListOfShape from TopTools;
187 theContext:out Context from IntTools)
188 ---Purpose: Returns True if the face theFace is inside of the
189 -- appropriate couple of faces (from the set theLF) .
190 -- The faces of the set theLF and theFace must
191 -- share the edge theEdge
192 returns Boolean from Standard;
194 IsInternalFace(myclass;
195 theFace :Face from TopoDS;
196 theSolid :Solid from TopoDS;
197 theMEF :IndexedDataMapOfShapeListOfShape from TopTools;
198 theTol :Real from Standard;
199 theContext:out Context from IntTools)
200 ---Purpose: Returns True if the face theFace is inside the
202 -- theMEF - Map Edge/Faces for theSolid
203 -- theTol - value of precision of computation
204 -- theContext- cahed geometrical tools
205 returns Boolean from Standard;
209 theEdge :Edge from TopoDS;
210 theFace :Face from TopoDS;
211 theLCEF :ListOfCoupleOfShape from NMTTools;
212 theFaceOff :out Face from TopoDS);
213 ---Purpose: For the face theFace and its edge theEdge
214 -- finds the face suitable to produce shell.
215 -- theLCEF - set of faces to search. All faces
216 -- from theLCEF must share edge theEdge
218 GetEdgeOnFace (myclass;
219 theEdge :Edge from TopoDS;
220 theFace :Face from TopoDS;
221 theEdgeOnF :out Edge from TopoDS)
222 ---Purpose: For the face theFace gets the edge theEdgeOnF
223 -- that is the same as theEdge
224 -- Returns True if such edge exists
225 -- Returns False if there is no such edge
226 returns Boolean from Standard;
229 theEdge :Edge from TopoDS;
230 theFace :Face from TopoDS;
231 theEdgeOff :out Edge from TopoDS)
232 ---Purpose: Returns True if the face theFace contains
233 -- the edge theEdge but with opposite orientation.
234 -- If the method returns True theEdgeOff is the
236 returns Boolean from Standard;