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