0024940: WOK: Cyclic dependency detected between: BOPInt IntTools
[occt.git] / src / IntTools / IntTools_Context.cdl
1 -- Created by: Peter KURNEV
2 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
3 --
4 -- This file is part of Open CASCADE Technology software library.
5 --
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.
11 --
12 -- Alternatively, this file may be used under the terms of Open CASCADE
13 -- commercial license or contractual agreement.
14
15
16 class Context from IntTools  
17     inherits TShared from MMgt
18
19
20 ---Purpose:  
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.
25
26
27 uses  
28
29     Pnt2d from gp,
30     Pnt   from gp, 
31     State from TopAbs,  
32     Curve from Geom,   
33     ProjectPointOnCurve from GeomAPI, 
34     ProjectPointOnSurf  from GeomAPI,
35     Vertex from TopoDS, 
36     Face   from TopoDS,
37     Edge   from TopoDS, 
38     Solid  from TopoDS, 
39     SolidClassifier from BRepClass3d, 
40     FClass2d from IntTools,
41     Curve    from IntTools, 
42     BaseAllocator from BOPCol,
43     DataMapOfShapeAddress from BOPCol, 
44     DataMapOfTransientAddress from BOPCol, 
45     Hatcher from Geom2dHatch, 
46     SurfaceRangeLocalizeData from IntTools
47
48 --raises
49
50 is 
51     Create   
52
53     returns Context from IntTools;
54     ---C++: alias "Standard_EXPORT virtual  ~IntTools_Context();"         
55     Create (theAllocator: BaseAllocator from BOPCol) 
56
57     returns Context from IntTools;
58      
59     FClass2d(me:mutable; 
60         aF: Face from TopoDS) 
61     returns FClass2d from IntTools; 
62     ---C++: return & 
63     ---Purpose:
64     --- Returns a reference to point classifier
65     --- for given face
66     ---
67
68     ProjPS (me:mutable; 
69         aF: Face from TopoDS) 
70     returns ProjectPointOnSurf from GeomAPI;
71     ---C++: return &   
72     ---Purpose:
73     --- Returns a reference to point projector
74     --- for given face
75     ---
76
77     ProjPC (me:mutable; 
78         aE: Edge from TopoDS) 
79     returns ProjectPointOnCurve from GeomAPI;
80     ---C++: return &
81     ---Purpose:
82     --- Returns a reference to point projector
83     --- for given edge
84     ---
85
86     ProjPT (me:mutable; 
87         aC: Curve from Geom) 
88     returns ProjectPointOnCurve from GeomAPI;
89     ---C++: return &
90     ---Purpose:
91     --- Returns a reference to point projector
92     --- for given curve
93     ---
94
95     SurfaceData(me: mutable; 
96         aF: Face from TopoDS)
97     returns SurfaceRangeLocalizeData from IntTools;
98     ---C++: return &
99     ---Purpose:
100     --- Returns a reference to surface localization data
101     --- for given face 
102     
103     SolidClassifier(me:mutable;  
104         aSolid: Solid from TopoDS) 
105     returns SolidClassifier from BRepClass3d; 
106     ---C++: return &    
107     ---Purpose:
108     --- Returns a reference to solid classifier
109     --- for given solid
110     ---
111  
112     Hatcher(me: mutable;  
113         aF: Face from TopoDS) 
114     returns Hatcher from Geom2dHatch;
115     ---C++: return &  
116     ---Purpose:
117     --- Returns a reference to 2D hatcher
118     --- for given face
119     --- 
120
121     ComputePE  (me:mutable;  
122        theP   : Pnt from gp; 
123        theTolP: Real from Standard; 
124        theE   : Edge   from  TopoDS; 
125        theT   :out Real from Standard) 
126     returns Integer from Standard;  
127     ---Purpose:
128     --- Computes parameter of the Point theP on
129     --- the edge aE.
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
133     --- negative value
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)
137     ---
138
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;
144     ---Purpose: 
145     --- Computes parameter of the vertex aV on
146     --- the edge aE.
147     --- Returns zero if the distance between vertex
148     --- and edge is less than sum of tolerances,
149     --- otherwise and for following conditions returns
150     --- negative value
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)
154     ---
155          
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;
162     ---Purpose:
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)
171     --- 
172     
173     StatePointFace(me:mutable;    
174        aF   :  Face   from  TopoDS;
175        aP2D :  Pnt2d  from  gp) 
176     returns State from TopAbs;  
177     ---Purpose:
178     --- Returns the state of the point aP2D
179     --- relative to face aF
180     ---
181          
182     IsPointInFace(me:mutable;    
183        aF   :  Face   from  TopoDS;
184        aP2D :  Pnt2d  from  gp) 
185     returns Boolean from Standard; 
186     ---Purpose:
187     --- Returns true if the point aP2D is
188     --- inside the boundaries of the face aF,
189     --- otherwise returns false
190     ---
191
192     
193     IsPointInOnFace(me:mutable;     
194        aF   :  Face   from  TopoDS;
195        aP2D :  Pnt2d  from  gp) 
196     returns Boolean from Standard;
197     ---Purpose:
198     --- Returns true if the point aP2D is
199     --- inside or on the boundaries of aF
200     ---
201          
202     IsValidPointForFace(me:mutable;
203        aP3D :  Pnt   from  gp; 
204        aF   :  Face  from TopoDS; 
205        aTol :  Real from Standard) 
206     returns Boolean from Standard;
207     ---Purpose:
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
211     --- of the face aF
212     ---
213
214     IsValidPointForFaces(me:mutable;
215        aP3D :  Pnt   from  gp; 
216        aF1  :  Face  from TopoDS; 
217        aF2  :  Face  from TopoDS;
218        aTol :  Real from Standard)   
219     returns Boolean from Standard; 
220     ---Purpose:
221     --- Returns true if IsValidPointForFace returns true
222     --- for both face aF1 and aF2
223     ---
224          
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; 
232     ---Purpose:
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
236     ---
237
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;
246     ---Purpose:
247     --- Returns true if IsValidBlockForFace returns true
248     --- for both faces aF1 and aF2
249     ---
250          
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; 
257     ---Purpose:
258     --- Computes parameter of the vertex aV on
259     --- the curve aIC.
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)
264     --- 
265         
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;
273     ---Purpose:
274     --- Computes parameter of the vertex aV on
275     --- the curve aIC.
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)
280     --- 
281
282     ProjectPointOnEdge (me:mutable;  
283        aP   : Pnt  from  gp;       
284        aE   : Edge from  TopoDS;                    
285        aT   :out Real from  Standard) 
286     returns Boolean from Standard; 
287     ---Purpose:
288     --- Computes parameter of the point aP on
289     --- the edge aE.
290     --- Returns false if projection algorithm failed
291     --- other wiese returns true.
292     ---
293      
294 fields 
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; 
304      
305 end Context;
306