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