0024002: Overall code and build procedure refactoring -- automatic
[occt.git] / src / AppParCurves / AppParCurves_MultiCurve.cdl
1 -- Created on: 1991-12-02
2 -- Created by: Laurent PAINNOT
3 -- Copyright (c) 1991-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 MultiCurve from AppParCurves
18
19         ---Purpose: This class describes a MultiCurve approximating a Multiline.
20         --          As a Multiline is a set of n lines, a MultiCurve is a set 
21         --          of n curves. These curves are Bezier curves.
22         --          A MultiCurve is composed of m MultiPoint. 
23         --          The approximating degree of these n curves is the same for 
24         --          each one.
25         --
26         --
27         --   Example of a MultiCurve composed of MultiPoints:
28         -- 
29         --      P1______P2_____P3______P4________........_____PNbMPoints
30         --
31         --      Q1______Q2_____Q3______Q4________........_____QNbMPoints
32         --      .                                               .
33         --      .                                               .
34         --      .                                               .
35         --      R1______R2_____R3______R4________........_____RNbMPoints
36         --
37         --     
38         --      Pi, Qi, ..., Ri are points of dimension 2 or 3.
39         --      
40         --      (Pi, Qi, ...Ri), i= 1,...NbPoles are MultiPoints.
41         --      each MultiPoint has got NbPol Poles.
42
43
44 uses MultiPoint              from AppParCurves,
45      HArray1OfMultiPoint     from AppParCurves,
46      Array1OfMultiPoint      from AppParCurves,
47      Array1OfPnt             from TColgp,
48      Array1OfPnt2d           from TColgp,
49      Pnt                     from gp,
50      Pnt2d                   from gp,
51      Vec                     from gp,
52      Vec2d                   from gp,
53      OStream                 from Standard
54      
55   
56 raises OutOfRange        from Standard,
57        DimensionError    from Standard,
58        ConstructionError from Standard
59
60 is
61
62     Create returns MultiCurve;
63         ---Purpose: returns an indefinite MultiCurve.
64
65
66     Create(NbPol: Integer)
67         ---Purpose: creates a MultiCurve, describing Bezier curves all 
68         --          containing the same number of MultiPoint.
69         --          An exception is raised if Degree < 0.
70
71
72     returns MultiCurve from AppParCurves
73     raises OutOfRange from Standard;
74
75
76     Create(tabMU: Array1OfMultiPoint)
77         ---Purpose: creates a MultiCurve, describing Bezier curves all 
78         --          containing the same number of MultiPoint.
79         --          Each MultiPoint must have NbCurves Poles.
80
81     returns MultiCurve from AppParCurves
82     raises ConstructionError from Standard;
83
84     ---C++: alias "  Standard_EXPORT virtual ~AppParCurves_MultiCurve();"
85
86     SetNbPoles(me: in out; nbPoles: Integer)
87         ---Purpose: The number of poles of the MultiCurve 
88         --          will be set to <nbPoles>.
89
90     is static;
91     
92     
93
94     SetValue(me: in out; Index: Integer; 
95              MPoint: MultiPoint from AppParCurves)
96         ---Purpose: sets the MultiPoint of range Index to the value 
97         --          <MPoint>.
98         --          An exception is raised if Index <0 or Index >NbMPoint.
99
100     raises OutOfRange from Standard,
101            DimensionError from Standard
102     is static;
103     
104     
105
106     NbCurves(me)
107         ---Purpose: Returns the number of curves resulting from the
108         -- approximation of a MultiLine.
109
110     returns Integer
111     is static;
112     
113     
114     NbPoles(me)
115         ---Purpose:  Returns the number of poles on curves resulting from the approximation of a MultiLine.
116     
117     returns Integer
118     is virtual;
119     
120     
121     Degree(me)
122         ---Purpose: returns the degree of the curves.
123     
124     returns Integer
125     is virtual;
126     
127
128     Dimension(me; CuIndex: Integer)
129         ---Purpose: returns the dimension of the CuIndex curve.
130         --          An exception is raised if CuIndex<0 or CuIndex>NbCurves.
131     returns Integer
132     raises OutOfRange from Standard
133     is static;
134     
135
136     Curve(me; CuIndex: Integer; TabPnt: in out Array1OfPnt)
137         ---Purpose: returns the Pole array of the curve of range CuIndex.
138         --          An exception is raised if the dimension of the curve 
139         --          is 2d.
140
141     raises OutOfRange from Standard,
142            DimensionError from Standard
143     is static;
144
145
146     Curve(me; CuIndex: Integer; TabPnt: in out Array1OfPnt2d)
147         ---Purpose: returns the Pole array of the curve of range CuIndex.
148         --          An exception is raised if the dimension of the curve 
149         --          is 3d.
150
151     raises OutOfRange from Standard,
152            DimensionError from Standard
153     is static;
154
155
156     Value(me; Index: Integer)
157         ---Purpose: returns the Index MultiPoint. 
158         --          An exception is raised if Index <0 or Index >Degree+1.
159         ---C++: return const&
160
161     returns MultiPoint from AppParCurves
162     raises OutOfRange from Standard
163     is static;
164
165
166     Pole(me; CuIndex, Nieme: Integer)
167         ---Purpose: returns the Nieme pole of the CuIndex curve.
168         --          the curve must be a 3D curve.
169         ---C++: return const&
170
171     returns Pnt from gp
172     raises OutOfRange from Standard
173     is static;
174
175
176     Pole2d(me; CuIndex, Nieme: Integer)
177         ---Purpose: returns the Nieme pole of the CuIndex curve.
178         --          the curve must be a 2D curve.
179         ---C++: return const&
180
181     returns Pnt2d from gp
182     raises OutOfRange from Standard
183     is static;
184
185
186     Transform(me: in out; CuIndex: Integer; x, dx, y, dy, z, dz: Real)
187         ---Purpose: Applies a transformation to the curve of range 
188         --          <CuIndex>.
189         --          newx = x + dx*oldx
190         --          newy = y + dy*oldy    for all points of the curve.
191         --          newz = z + dz*oldz
192
193     raises OutOfRange from Standard
194     is static;
195
196
197     Transform2d(me: in out; CuIndex: Integer; x, dx, y, dy: Real)
198         ---Purpose: Applies a transformation to the Curve of range 
199         --          <CuIndex>.
200         --          newx = x + dx*oldx
201         --          newy = y + dy*oldy    for all points of the curve.
202
203     raises OutOfRange from Standard
204     is static;
205
206
207     Value(me; CuIndex: Integer; U: Real; Pt: out Pnt)
208         ---Purpose: returns the value of the point with a parameter U
209         --          on the Bezier curve number CuIndex.
210         --          An exception is raised if CuIndex <0 or > NbCurves.
211         --          An exception is raised if the curve dimension is 2d.
212
213     raises OutOfRange from Standard, 
214            DimensionError from Standard
215     is virtual;
216     
217     
218     Value(me; CuIndex: Integer; U: Real; Pt: out Pnt2d)
219         ---Purpose: returns the value of the point with a parameter U
220         --          on the Bezier curve number CuIndex.
221         --          An exception is raised if CuIndex <0 or > NbCurves.
222         --          An exception is raised if the curve dimension is 3d.
223
224     raises OutOfRange from Standard,
225            DimensionError from Standard
226     is virtual;
227
228     
229     D1(me; CuIndex: Integer; U: Real; Pt: out Pnt; V1: out Vec)
230         ---Purpose: returns the value of the point with a parameter U
231         --          on the Bezier curve number CuIndex.
232         --          An exception is raised if CuIndex <0 or > NbCurves.
233         --          An exception is raised if the curve dimension is 3d.
234
235     raises OutOfRange from Standard,
236            DimensionError from Standard
237     is virtual;
238
239
240     D1(me; CuIndex: Integer; U: Real; Pt: out Pnt2d; V1: out Vec2d)
241         ---Purpose: returns the value of the point with a parameter U
242         --          on the Bezier curve number CuIndex.
243         --          An exception is raised if CuIndex <0 or > NbCurves.
244         --          An exception is raised if the curve dimension is 2d.
245
246     raises OutOfRange from Standard,
247            DimensionError from Standard
248     is virtual;
249
250     D2(me; CuIndex: Integer; U: Real; Pt: out Pnt; V1: out Vec; V2: out Vec)
251         ---Purpose: returns the value of the point with a parameter U
252         --          on the Bezier curve number CuIndex.
253         --          An exception is raised if CuIndex <0 or > NbCurves.
254         --          An exception is raised if the curve dimension is 3d.
255
256     raises OutOfRange from Standard,
257            DimensionError from Standard
258     is virtual;
259
260
261     D2(me; CuIndex: Integer; U: Real; Pt: out Pnt2d; 
262            V1: out Vec2d; V2: out Vec2d)
263         ---Purpose: returns the value of the point with a parameter U
264         --          on the Bezier curve number CuIndex.
265         --          An exception is raised if CuIndex <0 or > NbCurves.
266         --          An exception is raised if the curve dimension is 2d.
267
268     raises OutOfRange from Standard,
269            DimensionError from Standard
270     is virtual;
271     
272
273     Dump(me; o: in out OStream)
274         ---Purpose: Prints on the stream o information on the current 
275         --          state of the object.
276         --          Is used to redefine the operator <<.
277
278     is virtual;
279     
280
281 fields
282
283 tabPoint:  HArray1OfMultiPoint from AppParCurves is protected;
284
285
286 end MultiCurve;