0024784: Move documentation in CDL files to proper location
[occt.git] / src / ChFiDS / ChFiDS_Spine.cdl
1 -- Created on: 1993-11-09
2 -- Created by: Laurent BOURESCHE
3 -- Copyright (c) 1993-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 class Spine from ChFiDS inherits TShared from MMgt
18
19         ---Purpose: Contains information necessary for construction of
20         --          a 3D fillet or chamfer:
21         --          
22         --          
23         --          - guideline composed of edges of the solid, tangents
24         --          between them, and borders by faces tangents
25         --          between them. 
26         --          
27         --          Tools for construction of the Sp
28         --          by propagation from an edge of solid 
29         --          are provided in the Builder of Fil3d.
30         --          
31         --          The Spine contains among others the 
32         --          information about the nature of extremities
33         --          of the fillet ( on free border , on section or closed ).
34         --          
35         --          IMPORTANT NOTE  :    the guideline 
36         --          represented in this way is not C2, although the path
37         --          claims it. Several palliative workarounds 
38         --          (see the methods at the end) are planned,
39         --          but they are not enough. It is necessary to change
40         --          the approach and double the Spine of line C2 with
41         --          the known consequences for management of
42         --          interactions between KPart Blend in Fil3d.
43
44
45
46 uses  
47
48     HArray1OfReal    from TColStd,
49     HArray1OfBoolean from TColStd,
50     Pnt              from gp,
51     Vec              from gp,
52     Lin              from gp,
53     Circ             from gp,
54     CurveType        from GeomAbs,
55     Vertex           from TopoDS,
56     Edge             from TopoDS,
57     SequenceOfShape  from TopTools,
58     Curve            from BRepAdaptor,
59     SurfData         from ChFiDS,
60     State            from ChFiDS,
61     HElSpine         from ChFiDS,
62     ListOfHElSpine   from ChFiDS,
63     ErrorStatus      from ChFiDS 
64 is
65
66 ----------------------------
67 -- methodes de construction.
68 ----------------------------
69
70     Create  returns Spine from ChFiDS;
71
72     Create(Tol : Real from Standard) returns Spine from ChFiDS;
73
74     SetEdges(me : mutable; E : Edge from TopoDS) is static;
75     ---Purpose: store edges composing the guideline
76     ---C++: inline
77
78     PutInFirst(me : mutable; E : Edge from TopoDS) is static;
79     ---Purpose: store the edge at the first position before all others
80     ---C++: inline
81
82     NbEdges(me) returns Integer is static;
83     ---C++: inline
84
85
86     Edges(me; I : Integer) returns Edge from TopoDS is static;
87     ---C++: return const &
88     ---C++: inline
89
90     
91     SetFirstStatus(me : mutable; S : State from ChFiDS) is static;
92     ---Purpose: stores if the start of a set of edges starts on a
93     -- section of free border or forms  a closed contour
94     ---C++: inline
95
96
97     SetLastStatus(me : mutable; S : State from ChFiDS) is static;
98    ---Purpose: stores if the end of a set of edges starts on a
99     -- section of free border or forms  a closed contour
100     ---C++: inline
101
102     AppendElSpine(me : mutable; Els : HElSpine from ChFiDS) 
103     is virtual;
104     
105     ElSpine(me; IE : Integer from Standard) 
106     returns HElSpine from  ChFiDS
107     is static;
108
109     ElSpine(me; E : Edge from TopoDS) 
110     returns HElSpine from  ChFiDS
111     is static;
112
113     ElSpine(me; W : Real from Standard) 
114     returns HElSpine from  ChFiDS
115     is static;
116
117     ChangeElSpines(me : mutable) 
118     ---C++: return &
119     returns ListOfHElSpine from ChFiDS
120     is static;
121
122     Reset(me : mutable; AllData : Boolean from Standard = Standard_False)
123     is virtual;
124
125     SplitDone(me) returns Boolean from Standard is static;
126     SplitDone(me : mutable; B : Boolean from Standard) is static;
127
128 ----------------------
129 -- methodes de calcul.
130 ----------------------
131
132     Load(me : mutable) is static;
133     ---Purpose: prepare the guideline depending on the edges that 
134     --          are elementary arks (take parameters from
135     --          a single curvilinear abscissa); to be able to call 
136     --          methods on the geometry (first,last,value,d1,d2)
137     --          it is necessary to start with preparation otherwise an
138     --          exception will be raised
139
140     Resolution(me; R3d : Real) returns Real
141     is static;
142     
143     IsClosed(me) returns Boolean
144     is static;
145
146     FirstParameter(me) returns Real
147     is static;
148
149     LastParameter(me) returns Real 
150     is static;
151
152     SetFirstParameter(me : mutable; Par : Real from Standard)
153     is static;
154
155     SetLastParameter(me : mutable; Par : Real from Standard)
156     is static;
157     
158     FirstParameter(me; IndexSpine : Integer ) returns Real 
159     ---Purpose: gives the total length of all arcs before the 
160     --          number IndexSp
161     is static;
162     
163     LastParameter(me; IndexSpine : Integer ) returns Real 
164     ---Purpose: gives the total length till the ark with number
165     --          IndexSpine (inclus)
166     is static;
167     
168     Length(me;IndexSpine : Integer ) returns Real 
169     ---Purpose: gives the length of ark with number IndexSp
170     is static;
171     
172     IsPeriodic(me) returns Boolean
173     is static;    
174
175     Period(me) returns Real
176     is static;
177
178     Absc(me :mutable; U : Real) returns Real from Standard  
179     is static;
180
181     Absc(me :mutable; U : Real; I : Integer from Standard) 
182     returns Real from Standard  
183     is static;
184
185     Parameter(me :mutable;
186               AbsC     : Real; 
187               U        : out Real; 
188               Oriented : Boolean  from  Standard = Standard_True)  
189     is static;
190
191     Parameter(me :mutable; 
192               Index    : Integer; 
193               AbsC     : Real; 
194               U        : out Real;  
195               Oriented : Boolean  from  Standard = Standard_True)  
196     is static;
197
198     Prepare(me; 
199             L     : in out Real from Standard; 
200             Index : in out  Integer  from  Standard ) 
201     is static private;
202
203     Value(me :mutable; AbsC : Real ) returns Pnt from gp 
204     is static;
205     
206     D0(me :mutable; AbsC : Real ; P : out Pnt from gp) 
207     is static;
208
209     D1(me :mutable; AbsC : Real ; P : out Pnt from gp; V1 : out Vec from gp) 
210     is static;
211     
212     D2(me :mutable; AbsC : Real ; P : out Pnt from gp; 
213        V1,V2 : out Vec from gp)  
214     is static;
215
216     SetCurrent (me : mutable; Index : Integer ) 
217     is static;
218     
219     CurrentElementarySpine (me : mutable; Index : Integer ) 
220     ---Purpose: sets the current curve and returns it 
221     returns Curve from BRepAdaptor is static; 
222     ---C++: return const &
223
224     CurrentIndexOfElementarySpine(me) returns Integer from Standard
225     ---C++: inline    
226     is static;
227
228     GetType(me) returns CurveType from GeomAbs
229     is static;
230
231     Line(me) returns Lin from gp
232     is static;
233      
234     Circle(me) returns Circ from gp
235     is static;
236      
237     FirstStatus(me) returns State from ChFiDS is static;
238     ---Purpose: returns if the set of edges starts on a free boundary
239     --          or if the first vertex is a breakpoint or if the set is
240     --          closed
241     ---C++: inline
242
243     LastStatus(me) returns State from ChFiDS is static;
244     ---Purpose: returns the state at the end of the set
245     ---C++: inline
246
247
248     Status(me; IsFirst : Boolean from Standard) 
249     returns State from ChFiDS is static;
250     ---C++: inline
251
252
253     SetStatus(me : mutable; 
254               S : State from ChFiDS; 
255               IsFirst : Boolean from Standard) is static;
256     ---C++: inline
257
258     IsTangencyExtremity(me; IsFirst : Boolean from Standard) 
259     returns Boolean is static; 
260     ---Purpose:  returns   if the  set  of  edges starts (or   end) on
261     --          Tangency point.
262     ---C++: inline
263
264
265     SetTangencyExtremity(me : mutable; 
266               IsTangency : Boolean from Standard; 
267               IsFirst    : Boolean from Standard) is static;
268     ---C++: inline
269 -----------------------------------------------------------
270 --  Methodes d acces aux vertex  et a leurs parametres     
271 -----------------------------------------------------------
272
273     Absc(me ; V : Vertex from TopoDS) returns Real from Standard  
274     is static;
275     FirstVertex(me) returns Vertex from TopoDS;
276     LastVertex(me) returns Vertex from TopoDS;
277
278 -----------------------------------------------------------
279 --  Methodes de controle des prolongements aux extremites :
280 --  - prolongement par parmetrage etendu,
281 --  - prolongement par la tangente.
282 -----------------------------------------------------------
283
284     SetFirstTgt(me : mutable; W : Real from Standard) is static;
285
286     SetLastTgt(me : mutable; W : Real from Standard) is static;
287
288     HasFirstTgt(me) returns Boolean from Standard is static;
289
290     HasLastTgt(me) returns Boolean from Standard is static;
291
292
293 ---------------------------------------------------------------------
294 --  Methodes d implementation permettant de positionner un flag pour
295 --  le calcul de D2 aux points singuliers de la ligne guide.
296 ---------------------------------------------------------------------
297
298     SetReference(me : mutable; W : Real from Standard) is static;
299     ---Purpose: set a parameter reference for the approx.
300
301     SetReference(me : mutable; I : Integer from Standard) is static;
302     ---Purpose: set  a  parameter  reference  for  the approx,  at the
303     --          middle  of edge I.
304
305     Index(me; 
306           W       : Real from Standard; 
307           Forward : Boolean from Standard =  Standard_True) 
308     returns Integer from Standard
309     is static;
310
311     Index(me; E : Edge from TopoDS)
312     returns Integer from Standard
313     is static;
314
315     UnsetReference(me : mutable) is static;
316
317 -----------------------------------------------------------------------
318 -- methodes concernant le statut d'erreur 
319 -----------------------------------------------------------------------
320  SetErrorStatus(me : mutable; state : ErrorStatus from ChFiDS) is static;
321  
322  ErrorStatus(me) returns ErrorStatus from ChFiDS is static; 
323  
324
325 fields
326  
327 -- donnees generales.
328
329 myCurve      : Curve from BRepAdaptor;
330 indexofcurve : Integer from Standard;
331 firstState   : State from ChFiDS;
332 lastState    : State from ChFiDS;
333 spine        : SequenceOfShape from TopTools;
334 abscissa     : HArray1OfReal from TColStd;
335 --isconstant   : HArray1OfBoolean from TColStd is protected;
336 splitdone    : Boolean from Standard is protected;
337 elspines     : ListOfHElSpine from ChFiDS is protected;
338 tolesp       : Real from Standard;
339
340 -- donnees caraterisant les extremites.
341
342 firstparam   : Real from Standard;
343 lastparam    : Real from Standard;
344 firstprolon  : Boolean from Standard;
345 lastprolon   : Boolean from Standard; 
346 firstistgt   : Boolean from Standard; 
347 lastistgt    : Boolean from Standard;
348
349 firsttgtpar  : Real from Standard;
350 lasttgtpar   : Real from Standard;
351 hasfirsttgt  : Boolean from Standard;
352 haslasttgt   : Boolean from Standard;
353 firstori     : Pnt from gp;
354 lastori      : Pnt from gp;
355 firsttgt     : Vec from gp;
356 lasttgt      : Vec from gp;
357
358 -- detrompeurs de calcul.
359
360 valref       : Real from Standard;
361 hasref       : Boolean from Standard;
362
363 -- statut d'erreur
364 errorstate   : ErrorStatus from ChFiDS; 
365
366 end Spine;