0024428: Implementation of LGPL license
[occt.git] / src / AppParCurves / AppParCurves_MultiCurve.cdl
CommitLineData
b311480e 1-- Created on: 1991-12-02
2-- Created by: Laurent PAINNOT
3-- Copyright (c) 1991-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
973c2be1 8-- This library is free software; you can redistribute it and / or modify it
9-- under the terms of the GNU Lesser General Public 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.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17class 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
44uses 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
56raises OutOfRange from Standard,
57 DimensionError from Standard,
58 ConstructionError from Standard
59
60is
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
85 Delete(me:out) is virtual;
86 ---C++: alias "Standard_EXPORT virtual ~AppParCurves_MultiCurve(){Delete();}"
87
88 SetNbPoles(me: in out; nbPoles: Integer)
89 ---Purpose: The number of poles of the MultiCurve
90 -- will be set to <nbPoles>.
91
92 is static;
93
94
95
96 SetValue(me: in out; Index: Integer;
97 MPoint: MultiPoint from AppParCurves)
98 ---Purpose: sets the MultiPoint of range Index to the value
99 -- <MPoint>.
100 -- An exception is raised if Index <0 or Index >NbMPoint.
101
102 raises OutOfRange from Standard,
103 DimensionError from Standard
104 is static;
105
106
107
108 NbCurves(me)
109 ---Purpose: Returns the number of curves resulting from the
110 -- approximation of a MultiLine.
111
112 returns Integer
113 is static;
114
115
116 NbPoles(me)
117 ---Purpose: Returns the number of poles on curves resulting from the approximation of a MultiLine.
118
119 returns Integer
120 is virtual;
121
122
123 Degree(me)
124 ---Purpose: returns the degree of the curves.
125
126 returns Integer
127 is virtual;
128
129
130 Dimension(me; CuIndex: Integer)
131 ---Purpose: returns the dimension of the CuIndex curve.
132 -- An exception is raised if CuIndex<0 or CuIndex>NbCurves.
133 returns Integer
134 raises OutOfRange from Standard
135 is static;
136
137
138 Curve(me; CuIndex: Integer; TabPnt: in out Array1OfPnt)
139 ---Purpose: returns the Pole array of the curve of range CuIndex.
140 -- An exception is raised if the dimension of the curve
141 -- is 2d.
142
143 raises OutOfRange from Standard,
144 DimensionError from Standard
145 is static;
146
147
148 Curve(me; CuIndex: Integer; TabPnt: in out Array1OfPnt2d)
149 ---Purpose: returns the Pole array of the curve of range CuIndex.
150 -- An exception is raised if the dimension of the curve
151 -- is 3d.
152
153 raises OutOfRange from Standard,
154 DimensionError from Standard
155 is static;
156
157
158 Value(me; Index: Integer)
159 ---Purpose: returns the Index MultiPoint.
160 -- An exception is raised if Index <0 or Index >Degree+1.
161 ---C++: return const&
162
163 returns MultiPoint from AppParCurves
164 raises OutOfRange from Standard
165 is static;
166
167
168 Pole(me; CuIndex, Nieme: Integer)
169 ---Purpose: returns the Nieme pole of the CuIndex curve.
170 -- the curve must be a 3D curve.
171 ---C++: return const&
172
173 returns Pnt from gp
174 raises OutOfRange from Standard
175 is static;
176
177
178 Pole2d(me; CuIndex, Nieme: Integer)
179 ---Purpose: returns the Nieme pole of the CuIndex curve.
180 -- the curve must be a 2D curve.
181 ---C++: return const&
182
183 returns Pnt2d from gp
184 raises OutOfRange from Standard
185 is static;
186
187
188 Transform(me: in out; CuIndex: Integer; x, dx, y, dy, z, dz: Real)
189 ---Purpose: Applies a transformation to the curve of range
190 -- <CuIndex>.
191 -- newx = x + dx*oldx
192 -- newy = y + dy*oldy for all points of the curve.
193 -- newz = z + dz*oldz
194
195 raises OutOfRange from Standard
196 is static;
197
198
199 Transform2d(me: in out; CuIndex: Integer; x, dx, y, dy: Real)
200 ---Purpose: Applies a transformation to the Curve of range
201 -- <CuIndex>.
202 -- newx = x + dx*oldx
203 -- newy = y + dy*oldy for all points of the curve.
204
205 raises OutOfRange from Standard
206 is static;
207
208
209 Value(me; CuIndex: Integer; U: Real; Pt: out Pnt)
210 ---Purpose: returns the value of the point with a parameter U
211 -- on the Bezier curve number CuIndex.
212 -- An exception is raised if CuIndex <0 or > NbCurves.
213 -- An exception is raised if the curve dimension is 2d.
214
215 raises OutOfRange from Standard,
216 DimensionError from Standard
217 is virtual;
218
219
220 Value(me; CuIndex: Integer; U: Real; Pt: out Pnt2d)
221 ---Purpose: returns the value of the point with a parameter U
222 -- on the Bezier curve number CuIndex.
223 -- An exception is raised if CuIndex <0 or > NbCurves.
224 -- An exception is raised if the curve dimension is 3d.
225
226 raises OutOfRange from Standard,
227 DimensionError from Standard
228 is virtual;
229
230
231 D1(me; CuIndex: Integer; U: Real; Pt: out Pnt; V1: out Vec)
232 ---Purpose: returns the value of the point with a parameter U
233 -- on the Bezier curve number CuIndex.
234 -- An exception is raised if CuIndex <0 or > NbCurves.
235 -- An exception is raised if the curve dimension is 3d.
236
237 raises OutOfRange from Standard,
238 DimensionError from Standard
239 is virtual;
240
241
242 D1(me; CuIndex: Integer; U: Real; Pt: out Pnt2d; V1: out Vec2d)
243 ---Purpose: returns the value of the point with a parameter U
244 -- on the Bezier curve number CuIndex.
245 -- An exception is raised if CuIndex <0 or > NbCurves.
246 -- An exception is raised if the curve dimension is 2d.
247
248 raises OutOfRange from Standard,
249 DimensionError from Standard
250 is virtual;
251
252 D2(me; CuIndex: Integer; U: Real; Pt: out Pnt; V1: out Vec; V2: out Vec)
253 ---Purpose: returns the value of the point with a parameter U
254 -- on the Bezier curve number CuIndex.
255 -- An exception is raised if CuIndex <0 or > NbCurves.
256 -- An exception is raised if the curve dimension is 3d.
257
258 raises OutOfRange from Standard,
259 DimensionError from Standard
260 is virtual;
261
262
263 D2(me; CuIndex: Integer; U: Real; Pt: out Pnt2d;
264 V1: out Vec2d; V2: out Vec2d)
265 ---Purpose: returns the value of the point with a parameter U
266 -- on the Bezier curve number CuIndex.
267 -- An exception is raised if CuIndex <0 or > NbCurves.
268 -- An exception is raised if the curve dimension is 2d.
269
270 raises OutOfRange from Standard,
271 DimensionError from Standard
272 is virtual;
273
274
275 Dump(me; o: in out OStream)
276 ---Purpose: Prints on the stream o information on the current
277 -- state of the object.
278 -- Is used to redefine the operator <<.
279
280 is virtual;
281
282
283fields
284
285tabPoint: HArray1OfMultiPoint from AppParCurves is protected;
286
287
288end MultiCurve;