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
193 IsPointInOnFace(me:mutable;
194 aF : Face from TopoDS;
195 aP2D : Pnt2d from gp)
196 returns Boolean from Standard;
198 --- Returns true if the point aP2D is
199 --- inside or on the boundaries of aF
202 IsValidPointForFace(me:mutable;
204 aF : Face from TopoDS;
205 aTol : Real from Standard)
206 returns Boolean from Standard;
208 --- Returns true if the distance between point aP3D
209 --- and face aF is less or equal to tolerance aTol
210 --- and projection point is inside or on the boundaries
214 IsValidPointForFaces(me:mutable;
216 aF1 : Face from TopoDS;
217 aF2 : Face from TopoDS;
218 aTol : Real from Standard)
219 returns Boolean from Standard;
221 --- Returns true if IsValidPointForFace returns true
222 --- for both face aF1 and aF2
225 IsValidBlockForFace (me:mutable;
226 aT1 : Real from Standard;
227 aT2 : Real from Standard;
228 aIC : Curve from IntTools;
229 aF : Face from TopoDS;
230 aTol : Real from Standard)
231 returns Boolean from Standard;
233 --- Returns true if IsValidPointForFace returns true
234 --- for some 3d point that lay on the curve aIC bounded by
235 --- parameters aT1 and aT2
238 IsValidBlockForFaces (me:mutable;
239 aT1 : Real from Standard;
240 aT2 : Real from Standard;
241 aIC : Curve from IntTools;
242 aF1 : Face from TopoDS;
243 aF2 : Face from TopoDS;
244 aTol : Real from Standard)
245 returns Boolean from Standard;
247 --- Returns true if IsValidBlockForFace returns true
248 --- for both faces aF1 and aF2
251 IsVertexOnLine(me:mutable;
252 aV : Vertex from TopoDS;
253 aIC : Curve from IntTools;
254 aTolC: Real from Standard;
255 aT :out Real from Standard)
256 returns Boolean from Standard;
258 --- Computes parameter of the vertex aV on
260 --- Returns true if the distance between vertex and
261 --- curve is less than sum of tolerance of aV and aTolC,
262 --- otherwise or if projection algorithm failed
263 --- returns false (in this case aT isn't significant)
266 IsVertexOnLine(me:mutable;
267 aV : Vertex from TopoDS;
268 aTolV: Real from Standard;
269 aIC : Curve from IntTools;
270 aTolC: Real from Standard;
271 aT :out Real from Standard)
272 returns Boolean from Standard;
274 --- Computes parameter of the vertex aV on
276 --- Returns true if the distance between vertex and
277 --- curve is less than sum of tolerance of aV and aTolC,
278 --- otherwise or if projection algorithm failed
279 --- returns false (in this case aT isn't significant)
282 ProjectPointOnEdge (me:mutable;
284 aE : Edge from TopoDS;
285 aT :out Real from Standard)
286 returns Boolean from Standard;
288 --- Computes parameter of the point aP on
290 --- Returns false if projection algorithm failed
291 --- other wiese returns true.
295 myAllocator : BaseAllocator from BOPCol is protected;
296 myFClass2dMap:DataMapOfShapeAddress from BOPCol is protected;
297 myProjPSMap :DataMapOfShapeAddress from BOPCol is protected;
298 myProjPCMap :DataMapOfShapeAddress from BOPCol is protected;
299 mySClassMap :DataMapOfShapeAddress from BOPCol is protected;
300 myProjPTMap :DataMapOfTransientAddress from BOPCol is protected;
301 myHatcherMap :DataMapOfShapeAddress from BOPCol is protected;
302 myProjSDataMap:DataMapOfShapeAddress from BOPCol is protected;
303 myCreateFlag :Integer from Standard is protected;