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