Commit | Line | Data |
---|---|---|
b311480e | 1 | -- Created on: 1995-07-02 |
2 | -- Created by: Laurent BUCHARD | |
3 | -- Copyright (c) 1995-1999 Matra Datavision | |
4 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS | |
5 | -- | |
6 | -- The content of this file is subject to the Open CASCADE Technology Public | |
7 | -- License Version 6.5 (the "License"). You may not use the content of this file | |
8 | -- except in compliance with the License. Please obtain a copy of the License | |
9 | -- at http://www.opencascade.org and read it completely before using this file. | |
10 | -- | |
11 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its | |
12 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. | |
13 | -- | |
14 | -- The Original Code and all software distributed under the License is | |
15 | -- distributed on an "AS IS" basis, without warranty of any kind, and the | |
16 | -- Initial Developer hereby disclaims all such warranties, including without | |
17 | -- limitation, any warranties of merchantability, fitness for a particular | |
18 | -- purpose or non-infringement. Please see the License for the specific terms | |
19 | -- and conditions governing the rights and limitations under the License. | |
20 | ||
7fd59977 | 21 | |
22 | ||
23 | class HInterTool from IntPatch | |
24 | ||
25 | ---Purpose: Tool for the intersection between 2 surfaces. | |
26 | -- Regroupe pour l instant les methodes hors Adaptor3d... | |
27 | ||
28 | uses | |
29 | HVertex from Adaptor3d, | |
30 | HCurve2d from Adaptor2d, | |
31 | HSurface from Adaptor3d, | |
32 | Pnt2d from gp, | |
33 | Pnt from gp | |
34 | ||
35 | is | |
36 | ||
1ef32e96 | 37 | Create returns HInterTool from IntPatch; |
7fd59977 | 38 | |
39 | -- Pour polyedres | |
40 | ||
41 | SingularOnUMin(myclass; S:HSurface from Adaptor3d) | |
42 | returns Boolean from Standard; | |
43 | ---C++: inline | |
44 | ||
45 | SingularOnUMax(myclass; S:HSurface from Adaptor3d) | |
46 | returns Boolean from Standard; | |
47 | ---C++: inline | |
48 | ||
49 | SingularOnVMin(myclass; S:HSurface from Adaptor3d) | |
50 | returns Boolean from Standard; | |
51 | ---C++: inline | |
52 | ||
53 | SingularOnVMax(myclass; S:HSurface from Adaptor3d) | |
54 | returns Boolean from Standard; | |
55 | ---C++: inline | |
56 | ||
57 | NbSamplesU(myclass; S: HSurface from Adaptor3d; u1,u2: Real from Standard) | |
58 | returns Integer from Standard; | |
59 | ||
60 | NbSamplesV(myclass; S: HSurface from Adaptor3d; v1,v2: Real from Standard) | |
61 | returns Integer from Standard; | |
62 | ||
63 | -- Methodes pour recherche des points interieurs | |
64 | ||
1ef32e96 | 65 | NbSamplePoints(me: in out; S: HSurface from Adaptor3d) |
7fd59977 | 66 | |
67 | returns Integer from Standard; | |
68 | ||
69 | ||
1ef32e96 | 70 | SamplePoint(me; S: HSurface from Adaptor3d; |
7fd59977 | 71 | Index: Integer from Standard; |
72 | U,V: out Real from Standard); | |
73 | ||
74 | ||
75 | -- Classify(myclass; S: HSurface from Adaptor3d; | |
76 | -- U,V: Real from Standard) | |
77 | -- | |
78 | -- returns State from TopAbs; | |
79 | ||
80 | ||
81 | -- Methodes sur un arc de restriction | |
82 | ||
83 | HasBeenSeen(myclass; C: HCurve2d from Adaptor2d) | |
84 | ||
85 | ---Purpose: Returns True if all the intersection point and edges | |
86 | -- are known on the Arc. | |
87 | -- The intersection point are given as vertices. | |
88 | -- The intersection edges are given as intervals between | |
89 | -- two vertices. | |
90 | ||
91 | returns Boolean from Standard; | |
92 | ||
93 | NbSamplesOnArc(myclass; A: HCurve2d from Adaptor2d) | |
94 | ||
95 | ---Purpose: returns the number of points which is used to make | |
96 | -- a sample on the arc. this number is a function of | |
97 | -- the Surface and the CurveOnSurface complexity. | |
98 | ||
99 | returns Integer from Standard; | |
100 | ||
101 | ||
102 | Bounds(myclass; C: HCurve2d from Adaptor2d; | |
103 | Ufirst,Ulast: out Real from Standard); | |
104 | ||
105 | ---Purpose: Returns the parametric limits on the arc C. | |
106 | -- These limits must be finite : they are either | |
107 | -- the real limits of the arc, for a finite arc, | |
108 | -- or a bounding box for an infinite arc. | |
109 | ||
110 | ||
111 | Project(myclass; C: HCurve2d from Adaptor2d; | |
112 | P: Pnt2d from gp; | |
113 | Paramproj: out Real from Standard; | |
114 | Ptproj : out Pnt2d from gp) | |
115 | ||
116 | ---Purpose: Projects the point P on the arc C. | |
117 | -- If the methods returns Standard_True, the projection is | |
118 | -- successful, and Paramproj is the parameter on the arc | |
119 | -- of the projected point, Ptproj is the projected Point. | |
120 | -- If the method returns Standard_False, Param proj and Ptproj | |
121 | -- are not significant. | |
122 | -- | |
123 | ||
124 | returns Boolean from Standard; | |
125 | ||
126 | ||
127 | -- Methods on a vertex | |
128 | ||
129 | ||
130 | Tolerance(myclass; V: HVertex from Adaptor3d; C: HCurve2d from Adaptor2d) | |
131 | ||
132 | ---Purpose: Returns the parametric tolerance used to consider | |
133 | -- that the vertex and another point meet, i-e | |
134 | -- if Abs(parameter(Vertex) - parameter(OtherPnt))<= | |
135 | -- Tolerance, the points are "merged". | |
136 | ||
137 | returns Real from Standard; | |
138 | ||
139 | ||
140 | Parameter(myclass; V: HVertex from Adaptor3d; C: HCurve2d from Adaptor2d) | |
141 | ||
142 | ---Purpose: Returns the parameter of the vertex V on the arc A. | |
143 | ||
144 | returns Real from Standard; | |
145 | ||
146 | ||
147 | -- The following methods are used when HasBeenSeen returns Standard_True | |
148 | ||
149 | NbPoints(myclass; C: HCurve2d from Adaptor2d) | |
150 | ||
151 | ---Purpose: Returns the number of intersection points on the arc A. | |
152 | ||
153 | returns Integer from Standard; | |
154 | ||
155 | ||
156 | Value(myclass; C: HCurve2d from Adaptor2d; Index: Integer from Standard; | |
157 | Pt: out Pnt from gp; Tol: out Real from Standard; | |
158 | U: out Real from Standard); | |
159 | ||
160 | ---Purpose: Returns the value (Pt), the tolerance (Tol), and | |
161 | -- the parameter (U) on the arc A , of the intersection | |
162 | -- point of range Index. | |
163 | ||
164 | ||
165 | IsVertex(myclass; C: HCurve2d from Adaptor2d; | |
166 | Index: Integer from Standard) | |
167 | ||
168 | ---Purpose: Returns True if the intersection point of range Index | |
169 | -- corresponds with a vertex on the arc A. | |
170 | ||
171 | returns Boolean from Standard; | |
172 | ||
173 | ||
174 | Vertex(myclass; C: HCurve2d from Adaptor2d; Index: Integer from Standard; | |
175 | V: out HVertex from Adaptor3d); | |
176 | ||
177 | ---Purpose: When IsVertex returns True, this method returns the | |
178 | -- vertex on the arc A. | |
179 | ||
180 | ||
181 | NbSegments(myclass; C: HCurve2d from Adaptor2d) | |
182 | ||
183 | ---Purpose: returns the number of part of A solution of the | |
184 | -- of intersection problem. | |
185 | ||
186 | returns Integer from Standard; | |
187 | ||
188 | ||
189 | HasFirstPoint(myclass; C: HCurve2d from Adaptor2d; | |
190 | Index: Integer from Standard; | |
191 | IndFirst: out Integer from Standard) | |
192 | ||
193 | ---Purpose: Returns True when the segment of range Index is not | |
194 | -- open at the left side. In that case, IndFirst is the | |
195 | -- range in the list intersection points (see NbPoints) | |
196 | -- of the one which defines the left bound of the segment. | |
197 | -- Otherwise, the method has to return False, and IndFirst | |
198 | -- has no meaning. | |
199 | ||
200 | returns Boolean from Standard; | |
201 | ||
202 | ||
203 | HasLastPoint(myclass; C: HCurve2d from Adaptor2d; | |
204 | Index: Integer from Standard; | |
205 | IndLast: out Integer from Standard) | |
206 | ||
207 | ---Purpose: Returns True when the segment of range Index is not | |
208 | -- open at the right side. In that case, IndLast is the | |
209 | -- range in the list intersection points (see NbPoints) | |
210 | -- of the one which defines the right bound of the segment. | |
211 | -- Otherwise, the method has to return False, and IndLast | |
212 | -- has no meaning. | |
213 | ||
214 | returns Boolean from Standard; | |
215 | ||
216 | ||
217 | IsAllSolution(myclass; C: HCurve2d from Adaptor2d) | |
218 | ||
219 | ---Purpose: Returns True when the whole restriction is solution | |
220 | -- of the intersection problem. | |
221 | ||
222 | returns Boolean from Standard; | |
223 | ||
1ef32e96 RL |
224 | fields |
225 | ||
226 | uinf,vinf,usup,vsup: Real from Standard; | |
7fd59977 | 227 | |
228 | end HInterTool; |