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 | |
37 | |
38 | -- Pour polyedres |
39 | |
40 | SingularOnUMin(myclass; S:HSurface from Adaptor3d) |
41 | returns Boolean from Standard; |
42 | ---C++: inline |
43 | |
44 | SingularOnUMax(myclass; S:HSurface from Adaptor3d) |
45 | returns Boolean from Standard; |
46 | ---C++: inline |
47 | |
48 | SingularOnVMin(myclass; S:HSurface from Adaptor3d) |
49 | returns Boolean from Standard; |
50 | ---C++: inline |
51 | |
52 | SingularOnVMax(myclass; S:HSurface from Adaptor3d) |
53 | returns Boolean from Standard; |
54 | ---C++: inline |
55 | |
56 | NbSamplesU(myclass; S: HSurface from Adaptor3d; u1,u2: Real from Standard) |
57 | returns Integer from Standard; |
58 | |
59 | NbSamplesV(myclass; S: HSurface from Adaptor3d; v1,v2: Real from Standard) |
60 | returns Integer from Standard; |
61 | |
62 | -- Methodes pour recherche des points interieurs |
63 | |
64 | NbSamplePoints(myclass; S: HSurface from Adaptor3d) |
65 | |
66 | returns Integer from Standard; |
67 | |
68 | |
69 | SamplePoint(myclass; S : HSurface from Adaptor3d; |
70 | Index: Integer from Standard; |
71 | U,V: out Real from Standard); |
72 | |
73 | |
74 | -- Classify(myclass; S: HSurface from Adaptor3d; |
75 | -- U,V: Real from Standard) |
76 | -- |
77 | -- returns State from TopAbs; |
78 | |
79 | |
80 | -- Methodes sur un arc de restriction |
81 | |
82 | HasBeenSeen(myclass; C: HCurve2d from Adaptor2d) |
83 | |
84 | ---Purpose: Returns True if all the intersection point and edges |
85 | -- are known on the Arc. |
86 | -- The intersection point are given as vertices. |
87 | -- The intersection edges are given as intervals between |
88 | -- two vertices. |
89 | |
90 | returns Boolean from Standard; |
91 | |
92 | NbSamplesOnArc(myclass; A: HCurve2d from Adaptor2d) |
93 | |
94 | ---Purpose: returns the number of points which is used to make |
95 | -- a sample on the arc. this number is a function of |
96 | -- the Surface and the CurveOnSurface complexity. |
97 | |
98 | returns Integer from Standard; |
99 | |
100 | |
101 | Bounds(myclass; C: HCurve2d from Adaptor2d; |
102 | Ufirst,Ulast: out Real from Standard); |
103 | |
104 | ---Purpose: Returns the parametric limits on the arc C. |
105 | -- These limits must be finite : they are either |
106 | -- the real limits of the arc, for a finite arc, |
107 | -- or a bounding box for an infinite arc. |
108 | |
109 | |
110 | Project(myclass; C: HCurve2d from Adaptor2d; |
111 | P: Pnt2d from gp; |
112 | Paramproj: out Real from Standard; |
113 | Ptproj : out Pnt2d from gp) |
114 | |
115 | ---Purpose: Projects the point P on the arc C. |
116 | -- If the methods returns Standard_True, the projection is |
117 | -- successful, and Paramproj is the parameter on the arc |
118 | -- of the projected point, Ptproj is the projected Point. |
119 | -- If the method returns Standard_False, Param proj and Ptproj |
120 | -- are not significant. |
121 | -- |
122 | |
123 | returns Boolean from Standard; |
124 | |
125 | |
126 | -- Methods on a vertex |
127 | |
128 | |
129 | Tolerance(myclass; V: HVertex from Adaptor3d; C: HCurve2d from Adaptor2d) |
130 | |
131 | ---Purpose: Returns the parametric tolerance used to consider |
132 | -- that the vertex and another point meet, i-e |
133 | -- if Abs(parameter(Vertex) - parameter(OtherPnt))<= |
134 | -- Tolerance, the points are "merged". |
135 | |
136 | returns Real from Standard; |
137 | |
138 | |
139 | Parameter(myclass; V: HVertex from Adaptor3d; C: HCurve2d from Adaptor2d) |
140 | |
141 | ---Purpose: Returns the parameter of the vertex V on the arc A. |
142 | |
143 | returns Real from Standard; |
144 | |
145 | |
146 | -- The following methods are used when HasBeenSeen returns Standard_True |
147 | |
148 | NbPoints(myclass; C: HCurve2d from Adaptor2d) |
149 | |
150 | ---Purpose: Returns the number of intersection points on the arc A. |
151 | |
152 | returns Integer from Standard; |
153 | |
154 | |
155 | Value(myclass; C: HCurve2d from Adaptor2d; Index: Integer from Standard; |
156 | Pt: out Pnt from gp; Tol: out Real from Standard; |
157 | U: out Real from Standard); |
158 | |
159 | ---Purpose: Returns the value (Pt), the tolerance (Tol), and |
160 | -- the parameter (U) on the arc A , of the intersection |
161 | -- point of range Index. |
162 | |
163 | |
164 | IsVertex(myclass; C: HCurve2d from Adaptor2d; |
165 | Index: Integer from Standard) |
166 | |
167 | ---Purpose: Returns True if the intersection point of range Index |
168 | -- corresponds with a vertex on the arc A. |
169 | |
170 | returns Boolean from Standard; |
171 | |
172 | |
173 | Vertex(myclass; C: HCurve2d from Adaptor2d; Index: Integer from Standard; |
174 | V: out HVertex from Adaptor3d); |
175 | |
176 | ---Purpose: When IsVertex returns True, this method returns the |
177 | -- vertex on the arc A. |
178 | |
179 | |
180 | NbSegments(myclass; C: HCurve2d from Adaptor2d) |
181 | |
182 | ---Purpose: returns the number of part of A solution of the |
183 | -- of intersection problem. |
184 | |
185 | returns Integer from Standard; |
186 | |
187 | |
188 | HasFirstPoint(myclass; C: HCurve2d from Adaptor2d; |
189 | Index: Integer from Standard; |
190 | IndFirst: out Integer from Standard) |
191 | |
192 | ---Purpose: Returns True when the segment of range Index is not |
193 | -- open at the left side. In that case, IndFirst is the |
194 | -- range in the list intersection points (see NbPoints) |
195 | -- of the one which defines the left bound of the segment. |
196 | -- Otherwise, the method has to return False, and IndFirst |
197 | -- has no meaning. |
198 | |
199 | returns Boolean from Standard; |
200 | |
201 | |
202 | HasLastPoint(myclass; C: HCurve2d from Adaptor2d; |
203 | Index: Integer from Standard; |
204 | IndLast: out Integer from Standard) |
205 | |
206 | ---Purpose: Returns True when the segment of range Index is not |
207 | -- open at the right side. In that case, IndLast is the |
208 | -- range in the list intersection points (see NbPoints) |
209 | -- of the one which defines the right bound of the segment. |
210 | -- Otherwise, the method has to return False, and IndLast |
211 | -- has no meaning. |
212 | |
213 | returns Boolean from Standard; |
214 | |
215 | |
216 | IsAllSolution(myclass; C: HCurve2d from Adaptor2d) |
217 | |
218 | ---Purpose: Returns True when the whole restriction is solution |
219 | -- of the intersection problem. |
220 | |
221 | returns Boolean from Standard; |
222 | |
223 | |
224 | end HInterTool; |