0023442: Provide the access to the functionality of Geom2dHatch_Hacher via IntTools_C...
[occt.git] / src / IntTools / IntTools_Context.cdl
CommitLineData
b311480e 1-- Created on: 2002-04-03
2-- Created by: Peter KURNEV
3-- Copyright (c) 2002-2012 OPEN CASCADE SAS
4--
5-- The content of this file is subject to the Open CASCADE Technology Public
6-- License Version 6.5 (the "License"). You may not use the content of this file
7-- except in compliance with the License. Please obtain a copy of the License
8-- at http://www.opencascade.org and read it completely before using this file.
9--
10-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12--
13-- The Original Code and all software distributed under the License is
14-- distributed on an "AS IS" basis, without warranty of any kind, and the
15-- Initial Developer hereby disclaims all such warranties, including without
16-- limitation, any warranties of merchantability, fitness for a particular
17-- purpose or non-infringement. Please see the License for the specific terms
18-- and conditions governing the rights and limitations under the License.
19
7fd59977 20
21
4f189102
P
22class Context from IntTools
23 inherits TShared from MMgt
7fd59977 24
25 ---Purpose:
26 --- The class is to provide direct access
27 --- to the frequently using objects like
28 --- IntTools_FClass2d,
29 --- GeomAPI_ProjectPointOnSurf, etc.
30 --- The instance of the class allows to avoid repeated
31 --- computations by mapping internal objects in the
32 -- instance.
33
34uses
35 State from TopAbs,
36 Pnt2d from gp,
37 Pnt from gp,
38 Curve from Geom,
39 ProjectPointOnCurve from GeomAPI,
40 ProjectPointOnSurf from GeomAPI,
41 Vertex from TopoDS,
42 Face from TopoDS,
43 Edge from TopoDS,
44 Solid from TopoDS,
45 SolidClassifier from BRepClass3d,
46 IndexedDataMapOfShapeAddress from TopTools,
47 IndexedDataMapOfTransientAddress from IntTools,
48 FClass2d from IntTools,
49 SurfaceRangeLocalizeData from IntTools,
3f524765 50 Curve from IntTools,
51 Hatcher from Geom2dHatch
7fd59977 52
53--raises
54
55is
56 Create
4f189102
P
57 returns mutable Context from IntTools;
58 ---C++: alias "Standard_EXPORT virtual ~IntTools_Context();"
7fd59977 59 ---Purpose:
60 --- Empty constructor
4f189102
P
61
62 FClass2d(me: mutable;
7fd59977 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
4f189102 71 ProjPS (me: mutable;
7fd59977 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
4f189102 80 ProjPC (me: mutable;
7fd59977 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
4f189102 89 ProjPT (me: mutable;
7fd59977 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 ---
3f524765 97
4f189102 98 SurfaceData(me: mutable;
7fd59977 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
4f189102 107 SolidClassifier(me: mutable;
7fd59977 108 aSolid: Solid from TopoDS)
109 returns SolidClassifier from BRepClass3d;
110 ---C++: return &
111 ---Purpose:
112 --- Returns a reference to solid classifier
113 --- for given solid
114 ---
3f524765 115 --modified by NIZNHY-PKV Mon Sep 24 07:52:54 2012f
116 Hatcher(me: mutable;
117 aF: Face from TopoDS)
118 returns Hatcher from Geom2dHatch;
119 ---C++: return &
120 ---Purpose:
121 --- Returns a reference to 2D hatcher
122 --- for given face
123 ---
124 --modified by NIZNHY-PKV Mon Sep 24 07:52:54 2012t
125
126
7fd59977 127
128 --- API Block
129 ---
4f189102 130 ComputeVE (me:mutable;
7fd59977 131 aV : Vertex from TopoDS;
132 aE : Edge from TopoDS;
133 aT :out Real from Standard)
134 returns Integer from Standard;
135 ---Purpose:
136 --- Computes parameter of the vertex aV on
137 --- the edge aE.
138 --- Returns zero if the distance between vertex
139 --- and edge is less than sum of tolerances,
140 --- otherwise and for following conditions returns
141 --- negative value
142 --- 1. the edge is degenerated (-1)
143 --- 2. the edge does not contain 3d curve and pcurves (-2)
144 --- 3. projection algorithm failed (-3)
145 ---
146
4f189102 147 ComputeVE (me:mutable;
7fd59977 148 aV : Vertex from TopoDS;
149 aE : Edge from TopoDS;
150 aT :out Real from Standard;
151 bToUpdateVertex:out Boolean from Standard;
152 aDist :out Real from Standard)
153 returns Integer from Standard;
154 ---Purpose:
155 --- Computes parameter aT of the vertex aV on
156 --- the edge aE.
157 --- Returns zero if the distance between vertex
158 --- and edge is less than sum of tolerances,
159 --- otherwise and for following conditions returns
160 --- negative value
161 --- 1. the edge is degenerated (-1)
162 --- 2. the edge does not contain 3d curve and pcurves (-2)
163 --- 3. projection algorithm failed (-3)
164 ---
165 --- Output parameters
166 ---
167 --- bToUpdateVertex - the flag that indicates whether the
168 --- vertex tolerance should be modified or not
169 --- aDist - the value of the distance between the vertex
170 --- and the edge
7fd59977 171
4f189102 172 ComputeVS (me:mutable;
7fd59977 173 aV : Vertex from TopoDS;
174 aF : Face from TopoDS;
175 U : out Real from Standard;
176 V : out Real from Standard)
177 returns Integer from Standard;
178 ---Purpose:
179 --- Computes UV parameters of the vertex aV on face aF
180 --- Returns zero if the distance between vertex and face is
181 --- less than or equal the sum of tolerances and the projection
182 --- point lays inside boundaries of the face.
183 --- For following conditions returns negative value
184 --- 1. projection algorithm failed (-1)
185 --- 2. distance is more than sum of tolerances (-2)
186 --- 3. projection point out or on the boundaries of face (-3)
187 ---
188
4f189102 189 StatePointFace(me:mutable;
7fd59977 190 aF : Face from TopoDS;
191 aP2D : Pnt2d from gp)
192 returns State from TopAbs;
193 ---Purpose:
194 --- Returns the state of the point aP2D
195 --- relative to face aF
196 ---
197
4f189102 198 IsPointInFace(me:mutable;
7fd59977 199 aF : Face from TopoDS;
200 aP2D : Pnt2d from gp)
201 returns Boolean from Standard;
202 ---Purpose:
203 --- Returns true if the point aP2D is
204 --- inside the boundaries of the face aF,
205 --- otherwise returns false
206 ---
207
4f189102 208 IsPointInOnFace(me:mutable;
7fd59977 209 aF : Face from TopoDS;
210 aP2D : Pnt2d from gp)
211 returns Boolean from Standard;
212 ---Purpose:
213 --- Returns true if the point aP2D is
214 --- inside or on the boundaries of aF
215 ---
216
4f189102 217 IsValidPointForFace(me:mutable ;
7fd59977 218 aP3D : Pnt from gp;
219 aF : Face from TopoDS;
220 aTol : Real from Standard)
221 returns Boolean from Standard;
222 ---Purpose:
223 --- Returns true if the distance between point aP3D
224 --- and face aF is less or equal to tolerance aTol
225 --- and projection point is inside or on the boundaries
226 --- of the face aF
227 ---
228
4f189102 229 IsValidPointForFaces(me:mutable;
7fd59977 230 aP3D : Pnt from gp;
231 aF1 : Face from TopoDS;
232 aF2 : Face from TopoDS;
233 aTol : Real from Standard)
234 returns Boolean from Standard;
235 ---Purpose:
236 --- Returns true if IsValidPointForFace returns true
237 --- for both face aF1 and aF2
238 ---
239
4f189102 240 IsValidBlockForFace (me:mutable;
7fd59977 241 aT1 : Real from Standard;
242 aT2 : Real from Standard;
243 aIC : Curve from IntTools;
244 aF : Face from TopoDS;
245 aTol : Real from Standard)
246 returns Boolean from Standard;
247 ---Purpose:
248 --- Returns true if IsValidPointForFace returns true
249 --- for some 3d point that lay on the curve aIC bounded by
250 --- parameters aT1 and aT2
251 ---
252
4f189102 253 IsValidBlockForFaces (me:mutable;
7fd59977 254 aT1 : Real from Standard;
255 aT2 : Real from Standard;
256 aIC : Curve from IntTools;
257 aF1 : Face from TopoDS;
258 aF2 : Face from TopoDS;
259 aTol : Real from Standard)
260 returns Boolean from Standard;
261 ---Purpose:
262 --- Returns true if IsValidBlockForFace returns true
263 --- for both faces aF1 and aF2
264 ---
265
4f189102 266 IsVertexOnLine(me:mutable;
7fd59977 267 aV : Vertex from TopoDS;
268 aIC : Curve from IntTools;
269 aTolC: Real from Standard;
270 aT :out Real from Standard)
271 returns Boolean from Standard;
272 ---Purpose:
273 --- Computes parameter of the vertex aV on
274 --- the curve aIC.
275 --- Returns true if the distance between vertex and
276 --- curve is less than sum of tolerance of aV and aTolC,
277 --- otherwise or if projection algorithm failed
278 --- returns false (in this case aT isn't significant)
279 ---
280
4f189102 281 IsVertexOnLine(me:mutable;
7fd59977 282 aV : Vertex from TopoDS;
283 aTolV: Real from Standard;
284 aIC : Curve from IntTools;
285 aTolC: Real from Standard;
286 aT :out Real from Standard)
287 returns Boolean from Standard;
288 ---Purpose:
289 --- Computes parameter of the vertex aV on
290 --- the curve aIC.
291 --- Returns true if the distance between vertex and
292 --- curve is less than sum of tolerance of aV and aTolC,
293 --- otherwise or if projection algorithm failed
294 --- returns false (in this case aT isn't significant)
295 ---
296
4f189102 297 ProjectPointOnEdge (me:mutable;
7fd59977 298 aP : Pnt from gp;
299 aE : Edge from TopoDS;
300 aT :out Real from Standard)
301 returns Boolean from Standard;
302 ---Purpose:
303 --- Computes parameter of the point aP on
304 --- the edge aE.
305 --- Returns false if projection algorithm failed
306 --- other wiese returns true.
307 ---
308
309fields
3f524765 310 myFClass2dMap : IndexedDataMapOfShapeAddress from TopTools is protected;
311 myProjPSMap : IndexedDataMapOfShapeAddress from TopTools is protected;
312 myProjPCMap : IndexedDataMapOfShapeAddress from TopTools is protected;
313 myProjPTMap : IndexedDataMapOfTransientAddress from IntTools is protected;
314 mySClassMap : IndexedDataMapOfShapeAddress from TopTools is protected;
315 myProjSDataMap: IndexedDataMapOfShapeAddress from TopTools is protected;
316 myHatcherMap : IndexedDataMapOfShapeAddress from TopTools is protected;
7fd59977 317
318end Context;
319