7fd59977 |
1 | -- File: GeomAdaptor_Curve.cdl |
2 | -- Created: Tue Sep 1 10:58:10 1992 |
3 | -- Author: Modelistation |
4 | ---Copyright: Matra Datavision 1992 |
5 | |
6 | class Curve from GeomAdaptor inherits Curve from Adaptor3d |
7 | |
8 | ---Purpose: This class provides an interface between the services provided by any |
9 | -- curve from the package Geom and those required of the curve by algorithms which use it. |
10 | |
11 | uses Vec from gp, |
12 | Pnt from gp, |
13 | Circ from gp, |
14 | Elips from gp, |
15 | Hypr from gp, |
16 | Parab from gp, |
17 | Lin from gp, |
18 | Array1OfReal from TColStd, |
19 | Curve from Geom, |
20 | BezierCurve from Geom, |
21 | BSplineCurve from Geom, |
22 | CurveType from GeomAbs, |
23 | Shape from GeomAbs, |
24 | HCurve from Adaptor3d |
25 | |
26 | raises NoSuchObject from Standard, |
27 | ConstructionError from Standard, |
28 | OutOfRange from Standard, |
29 | DomainError from Standard |
30 | |
31 | |
32 | is |
33 | |
34 | Create |
35 | returns Curve from GeomAdaptor; |
36 | ---C++: inline |
37 | |
38 | Create(C : Curve from Geom) |
39 | returns Curve from GeomAdaptor; |
40 | ---C++: inline |
41 | |
42 | Create(C : Curve from Geom; UFirst,ULast : Real) |
43 | returns Curve from GeomAdaptor |
44 | raises |
45 | ConstructionError from Standard; |
46 | ---Purpose: ConstructionError is raised if Ufirst>Ulast |
47 | ---C++: inline |
48 | |
49 | Load(me : in out; C : Curve from Geom); |
50 | ---C++: inline |
51 | |
52 | Load(me : in out; C : Curve from Geom; UFirst,ULast : Real) |
53 | raises |
54 | ConstructionError from Standard; |
041bfce9 |
55 | ---C++: inline |
7fd59977 |
56 | ---Purpose: ConstructionError is raised if Ufirst>Ulast |
57 | |
58 | Curve(me) returns Curve from Geom |
59 | ---Purpose: |
60 | -- Provides a curve inherited from Hcurve from Adaptor. |
61 | -- This is inherited to provide easy to use constructors. |
62 | ---C++: return const& |
63 | ---C++: inline |
64 | is static; |
65 | |
66 | |
67 | |
68 | FirstParameter(me) returns Real |
69 | ---C++: inline |
70 | is redefined static; |
71 | |
72 | LastParameter(me) returns Real |
73 | ---C++: inline |
74 | is redefined static; |
75 | |
76 | Continuity(me) returns Shape from GeomAbs |
77 | is redefined static; |
78 | |
79 | NbIntervals(me:in out; S : Shape from GeomAbs) returns Integer |
80 | ---Purpose: Returns the number of intervals for continuity |
81 | -- <S>. May be one if Continuity(me) >= <S> |
82 | is redefined static; |
83 | |
84 | Intervals(me: in out; T : in out Array1OfReal from TColStd; |
85 | S : Shape from GeomAbs) |
86 | ---Purpose: Stores in <T> the parameters bounding the intervals |
87 | -- of continuity <S>. |
88 | -- |
89 | -- The array must provide enough room to accomodate |
90 | -- for the parameters. i.e. T.Length() > NbIntervals() |
91 | raises |
92 | OutOfRange from Standard |
93 | is redefined static; |
94 | |
95 | Trim(me; First, Last, Tol : Real) returns HCurve from Adaptor3d |
96 | ---Purpose: Returns a curve equivalent of <me> between |
97 | -- parameters <First> and <Last>. <Tol> is used to |
98 | -- test for 3d points confusion. |
99 | raises |
100 | OutOfRange from Standard |
101 | ---Purpose: If <First> >= <Last> |
102 | is redefined static; |
103 | |
104 | IsClosed(me) returns Boolean |
105 | is redefined static; |
106 | |
107 | IsPeriodic(me) returns Boolean |
108 | is redefined static; |
109 | |
110 | Period(me) returns Real |
111 | raises |
112 | DomainError from Standard -- if the curve is not periodic |
113 | is redefined static; |
114 | |
115 | |
116 | Value(me; U : Real) returns Pnt from gp |
117 | --- Purpose : Computes the point of parameter U on the curve |
118 | is redefined static; |
119 | |
120 | D0 (me; U : Real; P : out Pnt from gp) |
121 | --- Purpose : Computes the point of parameter U. |
122 | is redefined static; |
123 | |
124 | D1 (me; U : Real; P : out Pnt from gp ; V : out Vec from gp) |
125 | --- Purpose : Computes the point of parameter U on the curve |
126 | -- with its first derivative. |
127 | -- |
128 | -- Warning : On the specific case of BSplineCurve: |
129 | -- if the curve is cut in interval of continuity at least C1, the |
130 | -- derivatives are computed on the current interval. |
131 | -- else the derivatives are computed on the basis curve. |
132 | is redefined static; |
133 | |
134 | D2 (me; U : Real; P : out Pnt from gp; V1, V2 : out Vec from gp) |
135 | --- Purpose : |
136 | -- Returns the point P of parameter U, the first and second |
137 | -- derivatives V1 and V2. |
138 | -- |
139 | -- Warning : On the specific case of BSplineCurve: |
140 | -- if the curve is cut in interval of continuity at least C2, the |
141 | -- derivatives are computed on the current interval. |
142 | -- else the derivatives are computed on the basis curve. |
143 | is redefined static; |
144 | |
145 | D3 (me; U : Real; P : out Pnt from gp; V1, V2, V3 : out Vec from gp) |
146 | --- Purpose : |
147 | -- Returns the point P of parameter U, the first, the second |
148 | -- and the third derivative. |
149 | -- |
150 | -- Warning : On the specific case of BSplineCurve: |
151 | -- if the curve is cut in interval of continuity at least C3, the |
152 | -- derivatives are computed on the current interval. |
153 | -- else the derivatives are computed on the basis curve. |
154 | is redefined static; |
155 | |
156 | DN (me; U : Real; N : Integer) returns Vec from gp |
157 | --- Purpose : |
158 | -- The returned vector gives the value of the derivative for the |
159 | -- order of derivation N. |
160 | -- Warning : On the specific case of BSplineCurve: |
161 | -- if the curve is cut in interval of continuity CN, the |
162 | -- derivatives are computed on the current interval. |
163 | -- else the derivatives are computed on the basis curve. |
164 | raises |
165 | OutOfRange from Standard |
166 | --- Purpose : Raised if N < 1. |
167 | is redefined static; |
168 | |
169 | |
170 | Resolution(me; R3d :Real) returns Real |
171 | ---Purpose : returns the parametric resolution |
172 | is redefined static; |
173 | |
174 | |
175 | GetType(me) returns CurveType from GeomAbs |
176 | ---C++: inline |
177 | is redefined static; |
178 | |
179 | Line(me) returns Lin from gp |
180 | raises |
181 | NoSuchObject from Standard |
182 | is redefined static; |
183 | |
184 | Circle(me) returns Circ from gp |
185 | raises |
186 | NoSuchObject from Standard |
187 | is redefined static; |
188 | |
189 | Ellipse(me) returns Elips from gp |
190 | raises |
191 | NoSuchObject from Standard |
192 | is redefined static; |
193 | |
194 | Hyperbola(me) returns Hypr from gp |
195 | raises |
196 | NoSuchObject from Standard |
197 | is redefined static; |
198 | |
199 | Parabola(me) returns Parab from gp |
200 | raises |
201 | NoSuchObject from Standard |
202 | is redefined static; |
203 | |
204 | |
205 | Degree(me) returns Integer |
206 | raises |
207 | NoSuchObject from Standard |
208 | is redefined static; |
209 | ---Purpose: |
210 | -- this should NEVER make a copy |
211 | -- of the underlying curve to read |
212 | -- the relevant information |
213 | -- |
214 | IsRational(me) returns Boolean |
215 | raises |
216 | NoSuchObject from Standard |
217 | is redefined static; |
218 | |
219 | ---Purpose: |
220 | -- this should NEVER make a copy |
221 | -- of the underlying curve to read |
222 | -- the relevant information |
223 | -- |
224 | NbPoles(me) returns Integer |
225 | raises |
226 | NoSuchObject from Standard |
227 | is redefined static; |
228 | |
229 | ---Purpose: |
230 | -- this should NEVER make a copy |
231 | -- of the underlying curve to read |
232 | -- the relevant information |
233 | -- |
234 | NbKnots(me) returns Integer |
235 | raises |
236 | NoSuchObject from Standard |
237 | is redefined static; |
238 | ---Purpose: |
239 | -- this should NEVER make a copy |
240 | -- of the underlying curve to read |
241 | -- the relevant information |
242 | -- |
243 | |
244 | Bezier(me) returns BezierCurve from Geom |
245 | raises |
246 | NoSuchObject from Standard |
247 | is redefined static; |
248 | ---Purpose : this will NOT make a copy of the |
249 | -- Bezier Curve : If you want to modify |
250 | -- the Curve please make a copy yourself |
251 | -- Also it will NOT trim the surface to |
252 | -- myFirst/Last. |
253 | |
254 | BSpline(me) returns BSplineCurve from Geom |
255 | raises |
256 | NoSuchObject from Standard |
257 | is redefined static; |
258 | ---Purpose : this will NOT make a copy of the |
259 | -- BSpline Curve : If you want to modify |
260 | -- the Curve please make a copy yourself |
261 | -- Also it will NOT trim the surface to |
262 | -- myFirst/Last. |
263 | |
264 | |
265 | LocalContinuity(me; U1, U2 : Real) returns Shape from GeomAbs |
266 | is static private; |
041bfce9 |
267 | |
268 | load(me : in out; C : Curve from Geom; UFirst,ULast : Real) |
269 | is private; |
7fd59977 |
270 | |
271 | fields |
272 | |
273 | myCurve : Curve from Geom ; |
274 | myTypeCurve : CurveType from GeomAbs ; |
275 | myFirst : Real from Standard ; |
276 | myLast : Real from Standard; |
277 | |
278 | friends |
279 | class Surface from GeomAdaptor |
280 | |
281 | end Curve; |
282 | |