0024624: Lost word in license statement in source files
[occt.git] / src / BOPInt / BOPInt_Context.cdl
CommitLineData
4e57c75e 1-- Created by: Peter KURNEV
973c2be1 2-- Copyright (c) 1999-2014 OPEN CASCADE SAS
4e57c75e 3--
973c2be1 4-- This file is part of Open CASCADE Technology software library.
4e57c75e 5--
d5f74e42 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
973c2be1 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.
4e57c75e 11--
973c2be1 12-- Alternatively, this file may be used under the terms of Open CASCADE
13-- commercial license or contractual agreement.
14
4e57c75e 15class Context from BOPInt
16 inherits TShared from MMgt
17
18
19---Purpose:
20 -- The intersection Context contains geometrical
21 -- and topological toolkit (classifiers, projectors, etc).
22 -- The intersection Context is for caching the tools
23 -- to increase the performance.
24
25
26uses
27
28 Pnt2d from gp,
29 Pnt from gp,
30 State from TopAbs,
31 Curve from Geom,
32 ProjectPointOnCurve from GeomAPI,
33 ProjectPointOnSurf from GeomAPI,
34 Vertex from TopoDS,
35 Face from TopoDS,
36 Edge from TopoDS,
37 Solid from TopoDS,
38 SolidClassifier from BRepClass3d,
39 FClass2d from IntTools,
40 Curve from IntTools,
41 BaseAllocator from BOPCol,
42 DataMapOfShapeAddress from BOPCol,
43 DataMapOfTransientAddress from BOPCol,
44 Hatcher from Geom2dHatch,
45 SurfaceRangeLocalizeData from IntTools
46
47--raises
48
49is
50 Create
51 returns mutable Context from BOPInt;
52 ---C++: alias "Standard_EXPORT virtual ~BOPInt_Context();"
53
54 Create (theAllocator: BaseAllocator from BOPCol)
55 returns Context from BOPInt;
56
57 FClass2d(me:mutable;
58 aF: Face from TopoDS)
59 returns FClass2d from IntTools;
60 ---C++: return &
61 ---Purpose:
62 --- Returns a reference to point classifier
63 --- for given face
64 ---
65
66 ProjPS (me:mutable;
67 aF: Face from TopoDS)
68 returns ProjectPointOnSurf from GeomAPI;
69 ---C++: return &
70 ---Purpose:
71 --- Returns a reference to point projector
72 --- for given face
73 ---
74
75 ProjPC (me:mutable;
76 aE: Edge from TopoDS)
77 returns ProjectPointOnCurve from GeomAPI;
78 ---C++: return &
79 ---Purpose:
80 --- Returns a reference to point projector
81 --- for given edge
82 ---
83
84 ProjPT (me:mutable;
85 aC: Curve from Geom)
86 returns ProjectPointOnCurve from GeomAPI;
87 ---C++: return &
88 ---Purpose:
89 --- Returns a reference to point projector
90 --- for given curve
91 ---
92
93 SurfaceData(me: mutable;
94 aF: Face from TopoDS)
95 returns SurfaceRangeLocalizeData from IntTools;
96 ---C++: return &
97 ---Purpose:
98 --- Returns a reference to surface localization data
99 --- for given face
100
101 SolidClassifier(me:mutable;
102 aSolid: Solid from TopoDS)
103 returns SolidClassifier from BRepClass3d;
104 ---C++: return &
105 ---Purpose:
106 --- Returns a reference to solid classifier
107 --- for given solid
108 ---
109
110 Hatcher(me: mutable;
111 aF: Face from TopoDS)
112 returns Hatcher from Geom2dHatch;
113 ---C++: return &
114 ---Purpose:
115 --- Returns a reference to 2D hatcher
116 --- for given face
117 ---
118
119 ComputePE (me:mutable;
120 theP : Pnt from gp;
121 theTolP: Real from Standard;
122 theE : Edge from TopoDS;
123 theT :out Real from Standard)
124 returns Integer from Standard;
125 ---Purpose:
126 --- Computes parameter of the Point theP on
127 --- the edge aE.
128 --- Returns zero if the distance between point
129 --- and edge is less than sum of tolerance value of edge and theTopP,
130 --- otherwise and for following conditions returns
131 --- negative value
132 --- 1. the edge is degenerated (-1)
133 --- 2. the edge does not contain 3d curve and pcurves (-2)
134 --- 3. projection algorithm failed (-3)
135 ---
136
137 ComputeVE (me:mutable;
138 aV : Vertex from TopoDS;
139 aE : Edge from TopoDS;
140 aT :out Real from Standard)
141 returns Integer from Standard;
142 ---Purpose:
143 --- Computes parameter of the vertex aV on
144 --- the edge aE.
145 --- Returns zero if the distance between vertex
146 --- and edge is less than sum of tolerances,
147 --- otherwise and for following conditions returns
148 --- negative value
149 --- 1. the edge is degenerated (-1)
150 --- 2. the edge does not contain 3d curve and pcurves (-2)
151 --- 3. projection algorithm failed (-3)
152 ---
153
154 --ComputeVE (me:mutable;
155 --aV : Vertex from TopoDS;
156 --aE : Edge from TopoDS;
157 --aT :out Real from Standard;
158 --bToUpdateVertex:out Boolean from Standard;
159 --aDist :out Real from Standard)
160 --returns Integer from Standard;
161 ---Purpose:
162 --- Computes parameter aT of the vertex aV on
163 --- the edge aE.
164 --- Returns zero if the distance between vertex
165 --- and edge is less than sum of tolerances,
166 --- otherwise and for following conditions returns
167 --- negative value
168 --- 1. the edge is degenerated (-1)
169 --- 2. the edge does not contain 3d curve and pcurves (-2)
170 --- 3. projection algorithm failed (-3)
171 ---
172 --- Output parameters
173 --- bToUpdateVertex - the flag that indicates whether the
174 --- vertex tolerance should be modified or not
175 --- aDist - the value of the distance between the vertex
176 --- and the edge
177
178
179
180 ComputeVF (me:mutable;
181 aV : Vertex from TopoDS;
182 aF : Face from TopoDS;
183 U : out Real from Standard;
184 V : out Real from Standard)
185 returns Integer from Standard;
186 ---Purpose:
187 --- Computes UV parameters of the vertex aV on face aF
188 --- Returns zero if the distance between vertex and face is
189 --- less than or equal the sum of tolerances and the projection
190 --- point lays inside boundaries of the face.
191 --- For following conditions returns negative value
192 --- 1. projection algorithm failed (-1)
193 --- 2. distance is more than sum of tolerances (-2)
194 --- 3. projection point out or on the boundaries of face (-3)
195 ---
196
197 StatePointFace(me:mutable;
198 aF : Face from TopoDS;
199 aP2D : Pnt2d from gp)
200 returns State from TopAbs;
201 ---Purpose:
202 --- Returns the state of the point aP2D
203 --- relative to face aF
204 ---
205
206 IsPointInFace(me:mutable;
207 aF : Face from TopoDS;
208 aP2D : Pnt2d from gp)
209 returns Boolean from Standard;
210 ---Purpose:
211 --- Returns true if the point aP2D is
212 --- inside the boundaries of the face aF,
213 --- otherwise returns false
214 ---
215
216
217 IsPointInOnFace(me:mutable;
218 aF : Face from TopoDS;
219 aP2D : Pnt2d from gp)
220 returns Boolean from Standard;
221 ---Purpose:
222 --- Returns true if the point aP2D is
223 --- inside or on the boundaries of aF
224 ---
225
226 IsValidPointForFace(me:mutable;
227 aP3D : Pnt from gp;
228 aF : Face from TopoDS;
229 aTol : Real from Standard)
230 returns Boolean from Standard;
231 ---Purpose:
232 --- Returns true if the distance between point aP3D
233 --- and face aF is less or equal to tolerance aTol
234 --- and projection point is inside or on the boundaries
235 --- of the face aF
236 ---
237
238 IsValidPointForFaces(me:mutable;
239 aP3D : Pnt from gp;
240 aF1 : Face from TopoDS;
241 aF2 : Face from TopoDS;
242 aTol : Real from Standard)
243 returns Boolean from Standard;
244 ---Purpose:
245 --- Returns true if IsValidPointForFace returns true
246 --- for both face aF1 and aF2
247 ---
248
249 IsValidBlockForFace (me:mutable;
250 aT1 : Real from Standard;
251 aT2 : Real from Standard;
252 aIC : Curve from IntTools;
253 aF : Face from TopoDS;
254 aTol : Real from Standard)
255 returns Boolean from Standard;
256 ---Purpose:
257 --- Returns true if IsValidPointForFace returns true
258 --- for some 3d point that lay on the curve aIC bounded by
259 --- parameters aT1 and aT2
260 ---
261
262 IsValidBlockForFaces (me:mutable;
263 aT1 : Real from Standard;
264 aT2 : Real from Standard;
265 aIC : Curve from IntTools;
266 aF1 : Face from TopoDS;
267 aF2 : Face from TopoDS;
268 aTol : Real from Standard)
269 returns Boolean from Standard;
270 ---Purpose:
271 --- Returns true if IsValidBlockForFace returns true
272 --- for both faces aF1 and aF2
273 ---
274
275 IsVertexOnLine(me:mutable;
276 aV : Vertex from TopoDS;
277 aIC : Curve from IntTools;
278 aTolC: Real from Standard;
279 aT :out Real from Standard)
280 returns Boolean from Standard;
281 ---Purpose:
282 --- Computes parameter of the vertex aV on
283 --- the curve aIC.
284 --- Returns true if the distance between vertex and
285 --- curve is less than sum of tolerance of aV and aTolC,
286 --- otherwise or if projection algorithm failed
287 --- returns false (in this case aT isn't significant)
288 ---
289
290 IsVertexOnLine(me:mutable;
291 aV : Vertex from TopoDS;
292 aTolV: Real from Standard;
293 aIC : Curve from IntTools;
294 aTolC: Real from Standard;
295 aT :out Real from Standard)
296 returns Boolean from Standard;
297 ---Purpose:
298 --- Computes parameter of the vertex aV on
299 --- the curve aIC.
300 --- Returns true if the distance between vertex and
301 --- curve is less than sum of tolerance of aV and aTolC,
302 --- otherwise or if projection algorithm failed
303 --- returns false (in this case aT isn't significant)
304 ---
305
306 ProjectPointOnEdge (me:mutable;
307 aP : Pnt from gp;
308 aE : Edge from TopoDS;
309 aT :out Real from Standard)
310 returns Boolean from Standard;
311 ---Purpose:
312 --- Computes parameter of the point aP on
313 --- the edge aE.
314 --- Returns false if projection algorithm failed
315 --- other wiese returns true.
316 ---
317
318fields
319 myAllocator : BaseAllocator from BOPCol is protected;
320 myFClass2dMap:DataMapOfShapeAddress from BOPCol is protected;
321 myProjPSMap :DataMapOfShapeAddress from BOPCol is protected;
322 myProjPCMap :DataMapOfShapeAddress from BOPCol is protected;
323 mySClassMap :DataMapOfShapeAddress from BOPCol is protected;
324 myProjPTMap :DataMapOfTransientAddress from BOPCol is protected;
325 myHatcherMap :DataMapOfShapeAddress from BOPCol is protected;
326 myProjSDataMap:DataMapOfShapeAddress from BOPCol is protected;
327 myCreateFlag :Integer from Standard is protected;
328
329end Context;
330