1 -- Created by: Peter KURNEV
2 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
4 -- This file is part of Open CASCADE Technology software library.
6 -- This library is free software; you can redistribute it and/or modify it under
7 -- the terms of the GNU Lesser General Public License version 2.1 as published
8 -- by the Free Software Foundation, with special exception defined in the file
9 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 -- distribution for complete text of the license and disclaimer of any warranty.
12 -- Alternatively, this file may be used under the terms of Open CASCADE
13 -- commercial license or contractual agreement.
16 class Context from IntTools
17 inherits TShared from MMgt
21 -- The intersection Context contains geometrical
22 -- and topological toolkit (classifiers, projectors, etc).
23 -- The intersection Context is for caching the tools
24 -- to increase the performance.
33 ProjectPointOnCurve from GeomAPI,
34 ProjectPointOnSurf from GeomAPI,
39 SolidClassifier from BRepClass3d,
40 FClass2d from IntTools,
42 BaseAllocator from BOPCol,
43 DataMapOfShapeAddress from BOPCol,
44 DataMapOfTransientAddress from BOPCol,
45 Hatcher from Geom2dHatch,
46 SurfaceRangeLocalizeData from IntTools
53 returns Context from IntTools;
54 ---C++: alias "Standard_EXPORT virtual ~IntTools_Context();"
55 Create (theAllocator: BaseAllocator from BOPCol)
57 returns Context from IntTools;
61 returns FClass2d from IntTools;
64 --- Returns a reference to point classifier
70 returns ProjectPointOnSurf from GeomAPI;
73 --- Returns a reference to point projector
79 returns ProjectPointOnCurve from GeomAPI;
82 --- Returns a reference to point projector
88 returns ProjectPointOnCurve from GeomAPI;
91 --- Returns a reference to point projector
95 SurfaceData(me: mutable;
97 returns SurfaceRangeLocalizeData from IntTools;
100 --- Returns a reference to surface localization data
103 SolidClassifier(me:mutable;
104 aSolid: Solid from TopoDS)
105 returns SolidClassifier from BRepClass3d;
108 --- Returns a reference to solid classifier
113 aF: Face from TopoDS)
114 returns Hatcher from Geom2dHatch;
117 --- Returns a reference to 2D hatcher
121 ComputePE (me:mutable;
123 theTolP: Real from Standard;
124 theE : Edge from TopoDS;
125 theT :out Real from Standard)
126 returns Integer from Standard;
128 --- Computes parameter of the Point theP on
130 --- Returns zero if the distance between point
131 --- and edge is less than sum of tolerance value of edge and theTopP,
132 --- otherwise and for following conditions returns
134 --- 1. the edge is degenerated (-1)
135 --- 2. the edge does not contain 3d curve and pcurves (-2)
136 --- 3. projection algorithm failed (-3)
139 ComputeVE (me:mutable;
140 aV : Vertex from TopoDS;
141 aE : Edge from TopoDS;
142 aT :out Real from Standard)
143 returns Integer from Standard;
145 --- Computes parameter of the vertex aV on
147 --- Returns zero if the distance between vertex
148 --- and edge is less than sum of tolerances,
149 --- otherwise and for following conditions returns
151 --- 1. the edge is degenerated (-1)
152 --- 2. the edge does not contain 3d curve and pcurves (-2)
153 --- 3. projection algorithm failed (-3)
156 ComputeVF (me:mutable;
157 aV : Vertex from TopoDS;
158 aF : Face from TopoDS;
159 U : out Real from Standard;
160 V : out Real from Standard)
161 returns Integer from Standard;
163 --- Computes UV parameters of the vertex aV on face aF
164 --- Returns zero if the distance between vertex and face is
165 --- less than or equal the sum of tolerances and the projection
166 --- point lays inside boundaries of the face.
167 --- For following conditions returns negative value
168 --- 1. projection algorithm failed (-1)
169 --- 2. distance is more than sum of tolerances (-2)
170 --- 3. projection point out or on the boundaries of face (-3)
173 StatePointFace(me:mutable;
174 aF : Face from TopoDS;
175 aP2D : Pnt2d from gp)
176 returns State from TopAbs;
178 --- Returns the state of the point aP2D
179 --- relative to face aF
182 IsPointInFace(me:mutable;
183 aF : Face from TopoDS;
184 aP2D : Pnt2d from gp)
185 returns Boolean from Standard;
187 --- Returns true if the point aP2D is
188 --- inside the boundaries of the face aF,
189 --- otherwise returns false
192 IsPointInFace(me:mutable;
194 aF : Face from TopoDS;
195 aTol : Real from Standard)
196 returns Boolean from Standard;
198 --- Returns true if the point aP2D is
199 --- inside the boundaries of the face aF,
200 --- otherwise returns false
203 IsPointInOnFace(me:mutable;
204 aF : Face from TopoDS;
205 aP2D : Pnt2d from gp)
206 returns Boolean from Standard;
208 --- Returns true if the point aP2D is
209 --- inside or on the boundaries of aF
212 IsValidPointForFace(me:mutable;
214 aF : Face from TopoDS;
215 aTol : Real from Standard)
216 returns Boolean from Standard;
218 --- Returns true if the distance between point aP3D
219 --- and face aF is less or equal to tolerance aTol
220 --- and projection point is inside or on the boundaries
224 IsValidPointForFaces(me:mutable;
226 aF1 : Face from TopoDS;
227 aF2 : Face from TopoDS;
228 aTol : Real from Standard)
229 returns Boolean from Standard;
231 --- Returns true if IsValidPointForFace returns true
232 --- for both face aF1 and aF2
235 IsValidBlockForFace (me:mutable;
236 aT1 : Real from Standard;
237 aT2 : Real from Standard;
238 aIC : Curve from IntTools;
239 aF : Face from TopoDS;
240 aTol : Real from Standard)
241 returns Boolean from Standard;
243 --- Returns true if IsValidPointForFace returns true
244 --- for some 3d point that lay on the curve aIC bounded by
245 --- parameters aT1 and aT2
248 IsValidBlockForFaces (me:mutable;
249 aT1 : Real from Standard;
250 aT2 : Real from Standard;
251 aIC : Curve from IntTools;
252 aF1 : Face from TopoDS;
253 aF2 : Face from TopoDS;
254 aTol : Real from Standard)
255 returns Boolean from Standard;
257 --- Returns true if IsValidBlockForFace returns true
258 --- for both faces aF1 and aF2
261 IsVertexOnLine(me:mutable;
262 aV : Vertex from TopoDS;
263 aIC : Curve from IntTools;
264 aTolC: Real from Standard;
265 aT :out Real from Standard)
266 returns Boolean from Standard;
268 --- Computes parameter of the vertex aV on
270 --- Returns true if the distance between vertex and
271 --- curve is less than sum of tolerance of aV and aTolC,
272 --- otherwise or if projection algorithm failed
273 --- returns false (in this case aT isn't significant)
276 IsVertexOnLine(me:mutable;
277 aV : Vertex from TopoDS;
278 aTolV: Real from Standard;
279 aIC : Curve from IntTools;
280 aTolC: Real from Standard;
281 aT :out Real from Standard)
282 returns Boolean from Standard;
284 --- Computes parameter of the vertex aV on
286 --- Returns true if the distance between vertex and
287 --- curve is less than sum of tolerance of aV and aTolC,
288 --- otherwise or if projection algorithm failed
289 --- returns false (in this case aT isn't significant)
292 ProjectPointOnEdge (me:mutable;
294 aE : Edge from TopoDS;
295 aT :out Real from Standard)
296 returns Boolean from Standard;
298 --- Computes parameter of the point aP on
300 --- Returns false if projection algorithm failed
301 --- other wiese returns true.
305 myAllocator : BaseAllocator from BOPCol is protected;
306 myFClass2dMap:DataMapOfShapeAddress from BOPCol is protected;
307 myProjPSMap :DataMapOfShapeAddress from BOPCol is protected;
308 myProjPCMap :DataMapOfShapeAddress from BOPCol is protected;
309 mySClassMap :DataMapOfShapeAddress from BOPCol is protected;
310 myProjPTMap :DataMapOfTransientAddress from BOPCol is protected;
311 myHatcherMap :DataMapOfShapeAddress from BOPCol is protected;
312 myProjSDataMap:DataMapOfShapeAddress from BOPCol is protected;
313 myCreateFlag :Integer from Standard is protected;