b311480e |
1 | -- Created on: 1992-03-25 |
2 | -- Created by: Isabelle GRIGNON |
3 | -- Copyright (c) 1992-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 | generic class IWLine from IntWalk |
24 | (TheStartPoint as any) |
25 | |
26 | inherits TShared from MMgt |
27 | |
28 | ---Purpose: Definition of a polyline resulting of the IWalking algoritm. |
29 | -- Each point verifies : |
30 | -- F(x(u,v),y(u,v),z(u,v))=0, F=implicit function. |
31 | -- (x(u,v),y(u,v),z(u,v)) point on a parametric surface. |
32 | -- This polyline is computed marching from a starting a point |
33 | -- located on the surface 's boundary or inside the surface |
34 | -- domain. |
35 | -- a marching status is returned: |
36 | -- ok --> the polyline starts and ends on a marching |
37 | -- point |
38 | -- tangent --> the polyline ends on a tangent point |
39 | -- outside the boundaries --> the polyline is outside the |
40 | -- surface 's boundaries .it ends on the natural boundaries |
41 | -- because no marching points where found to stop |
42 | -- beware : the directions are not oriented. |
43 | |
44 | uses Couple from IntSurf, |
45 | SequenceOfCouple from IntSurf, |
46 | PntOn2S from IntSurf, |
47 | LineOn2S from IntSurf, |
48 | Vec from gp |
49 | |
50 | |
51 | raises OutOfRange from Standard, |
52 | DomainError from Standard |
53 | |
54 | |
55 | is |
56 | |
57 | Create |
58 | |
59 | returns mutable IWLine; |
60 | |
61 | |
62 | Reverse(me : mutable) |
63 | ---Purpose: reverse the points in the line. Hasfirst, HasLast are kept. |
64 | is static; |
65 | |
66 | Cut(me : mutable; Index : Integer from Standard) |
67 | ---Purpose: Cut the line at the point of rank Index. |
68 | ---C++: inline |
69 | is static; |
70 | |
71 | AddPoint(me : mutable; P : PntOn2S from IntSurf) |
72 | ---Purpose: Add a point in the line. |
73 | ---C++: inline |
74 | is static; |
75 | |
76 | AddStatusFirst(me : mutable; Closed, HasFirst : Boolean from Standard) |
77 | ---Purpose: |
78 | ---C++: inline |
79 | is static; |
80 | |
81 | AddStatusFirst(me : mutable; Closed, HasLast : Boolean from Standard; |
82 | Index : Integer from Standard; |
83 | P : TheStartPoint) |
84 | ---Purpose: |
85 | ---C++: inline |
86 | is static; |
87 | |
88 | |
89 | AddStatusFirstLast(me : mutable; |
90 | Closed, HasFirst, HasLast: Boolean from Standard) |
91 | ---Purpose: |
92 | ---C++: inline |
93 | is static; |
94 | |
95 | AddStatusLast(me : mutable; HasLast : Boolean from Standard) |
96 | ---Purpose: |
97 | ---C++: inline |
98 | is static; |
99 | |
100 | AddStatusLast(me : mutable; HasLast : Boolean from Standard; |
101 | Index : Integer from Standard; |
102 | P : TheStartPoint) |
103 | ---Purpose: |
104 | ---C++: inline |
105 | is static; |
106 | |
107 | AddIndexPassing(me : mutable; Index : Integer from Standard) |
108 | |
109 | ---Purpose: associer a l 'indice du point sur la ligne l'indice du point |
110 | -- passant dans l'iterateur de depart |
111 | |
112 | ---C++: inline |
113 | is static; |
114 | |
115 | |
116 | SetTangentVector(me: mutable; V: Vec from gp; |
117 | Index: Integer from Standard) |
118 | |
119 | ---C++: inline |
120 | is static; |
121 | |
122 | SetTangencyAtBegining(me: mutable; IsTangent: Boolean from Standard) |
123 | |
124 | ---C++: inline |
125 | is static; |
126 | |
127 | SetTangencyAtEnd(me: mutable; IsTangent: Boolean from Standard) |
128 | |
129 | ---C++: inline |
130 | is static; |
131 | |
132 | |
133 | NbPoints(me) |
134 | |
135 | ---Purpose: Returns the number of points of the line (including first |
136 | -- point and end point : see HasLastPoint and HasFirstPoint). |
137 | |
138 | returns Integer from Standard |
139 | ---C++: inline |
140 | |
141 | is static; |
142 | |
143 | |
144 | Value(me; Index: Integer from Standard) |
145 | |
146 | ---Purpose: Returns the point of range Index. |
147 | -- If index <= 0 or Index > NbPoints, an exception is raised. |
148 | |
149 | returns PntOn2S from IntSurf |
150 | ---C++: return const& |
151 | ---C++: inline |
152 | |
153 | raises OutOfRange from Standard |
154 | |
155 | is static; |
156 | |
157 | |
158 | Line(me) |
159 | |
160 | ---Purpose: Returns the LineOn2S contained in the walking line. |
161 | |
162 | returns mutable LineOn2S from IntSurf |
163 | ---C++: return const& |
164 | ---C++: inline |
165 | |
166 | is static; |
167 | |
168 | |
169 | IsClosed(me) |
170 | |
171 | ---Purpose: Returns True if the line is closed. |
172 | |
173 | returns Boolean from Standard |
174 | ---C++: inline |
175 | |
176 | is static; |
177 | |
178 | |
179 | HasFirstPoint(me) |
180 | |
181 | ---Purpose: Returns True if the first point of the line is a |
182 | -- marching point . when is HasFirstPoint==False ,the line |
183 | -- begins on the natural bound of the surface.the line can be |
184 | -- too long |
185 | |
186 | returns Boolean from Standard |
187 | ---C++: inline |
188 | |
189 | is static; |
190 | |
191 | |
192 | HasLastPoint(me) |
193 | |
194 | ---Purpose: Returns True if the end point of the line is a |
195 | -- marching point (Point from IntWS). |
196 | -- when is HasFirstPoint==False ,the line ends |
197 | -- on the natural bound of the surface.the line can be |
198 | -- too long. |
199 | |
200 | returns Boolean from Standard |
201 | ---C++: inline |
202 | |
203 | is static; |
204 | |
205 | |
206 | FirstPoint(me) |
207 | |
208 | ---Purpose: Returns the first point of the line when it is a |
209 | -- marching point. |
210 | -- An exception is raised if HasFirstPoint returns False. |
211 | |
212 | returns any TheStartPoint |
213 | ---C++: return const& |
214 | ---C++: inline |
215 | |
216 | raises DomainError from Standard |
217 | |
218 | is static; |
219 | |
220 | |
221 | FirstPointIndex(me) |
222 | |
223 | ---Purpose: Returns the Index of first point of the line when it is a |
224 | -- marching point.This index is the index in the |
225 | -- PointStartIterator. |
226 | -- An exception is raised if HasFirstPoint returns False. |
227 | |
228 | returns Integer from Standard |
229 | ---C++: inline |
230 | |
231 | raises DomainError from Standard |
232 | |
233 | is static; |
234 | |
235 | |
236 | LastPoint(me) |
237 | |
238 | ---Purpose: Returns the last point of the line when it is a |
239 | -- marching point. |
240 | -- An exception is raised if HasLastPoint returns False. |
241 | |
242 | returns any TheStartPoint |
243 | ---C++: return const& |
244 | ---C++: inline |
245 | |
246 | raises DomainError from Standard |
247 | |
248 | is static; |
249 | |
250 | |
251 | LastPointIndex(me) |
252 | |
253 | ---Purpose: Returns the index of last point of the line when it is a |
254 | -- marching point.This index is the index in the |
255 | -- PointStartIterator. |
256 | -- An exception is raised if HasLastPoint returns False. |
257 | |
258 | returns Integer from Standard |
259 | ---C++: inline |
260 | |
261 | raises DomainError from Standard |
262 | |
263 | is static; |
264 | |
265 | |
266 | NbPassingPoint(me) |
267 | |
268 | ---Purpose: returns the number of points belonging to Pnts1 which are |
269 | -- passing point. |
270 | |
271 | returns Integer from Standard |
272 | ---C++: inline |
273 | |
274 | is static; |
275 | |
276 | |
277 | PassingPoint(me; Index: Integer from Standard; |
278 | IndexLine, IndexPnts : out Integer from Standard) |
279 | |
280 | ---Purpose: returns the index of the point belonging to the line which |
281 | -- is associated to the passing point belonging to Pnts1 |
282 | -- an exception is raised if Index > NbPassingPoint() |
283 | |
284 | raises OutOfRange from Standard |
285 | ---C++: inline |
286 | |
287 | is static; |
288 | |
289 | |
290 | |
291 | TangentVector(me; Index: out Integer from Standard) |
292 | |
293 | returns Vec from gp |
294 | ---C++: return const& |
295 | ---C++: inline |
296 | |
297 | is static; |
298 | |
299 | |
300 | IsTangentAtBegining(me) |
301 | |
302 | returns Boolean from Standard |
303 | ---C++: inline |
304 | |
305 | is static; |
306 | |
307 | |
308 | IsTangentAtEnd(me) |
309 | |
310 | returns Boolean from Standard |
311 | ---C++: inline |
312 | |
313 | is static; |
314 | |
315 | |
316 | fields |
317 | |
318 | line : LineOn2S from IntSurf; |
319 | couple : SequenceOfCouple from IntSurf; |
320 | closed : Boolean from Standard; |
321 | hasFirst : Boolean from Standard; |
322 | hasLast : Boolean from Standard; |
323 | firstIndex : Integer from Standard; |
324 | lastIndex : Integer from Standard; |
325 | theFirstPoint : TheStartPoint; |
326 | theLastPoint : TheStartPoint; |
327 | indextg : Integer from Standard; |
328 | vcttg : Vec from gp; |
329 | istgtbeg : Boolean from Standard; |
330 | istgtend : Boolean from Standard; |
331 | |
332 | end IWLine; |