1 -- File: Geom2dAdaptor_Curve.cdl
2 -- Created: Thu Jun 3 18:51:05 1993
3 -- Author: Bruno DUMORTIER
5 ---Copyright: Matra Datavision 1993
7 class Curve from Geom2dAdaptor inherits Curve2d from Adaptor2d
9 ---Purpose: An interface between the services provided by any
10 -- curve from the package Geom2d and those required
11 -- of the curve by algorithms which use it.
20 Array1OfReal from TColStd,
22 BezierCurve from Geom2d,
23 BSplineCurve from Geom2d,
24 CurveType from GeomAbs,
26 HCurve2d from Adaptor2d
29 raises NoSuchObject from Standard,
30 ConstructionError from Standard,
31 OutOfRange from Standard,
32 DomainError from Standard
37 Create returns Curve from Geom2dAdaptor;
39 Create(C : Curve from Geom2d) returns Curve from Geom2dAdaptor;
41 Create(C : Curve from Geom2d; UFirst,ULast : Real)
42 returns Curve from Geom2dAdaptor
44 ConstructionError from Standard;
45 ---Purpose: ConstructionError is raised if Ufirst>Ulast
47 Load(me : in out; C : Curve from Geom2d);
50 Load(me : in out; C : Curve from Geom2d; UFirst,ULast : Real)
52 ConstructionError from Standard;
54 ---Purpose: ConstructionError is raised if Ufirst>Ulast
56 Curve(me) returns Curve from Geom2d
63 FirstParameter(me) returns Real
67 LastParameter(me) returns Real
71 Continuity(me) returns Shape from GeomAbs
74 NbIntervals(me; S : Shape from GeomAbs) returns Integer
75 ---Purpose: If necessary, breaks the curve in intervals of
76 -- continuity <S>. And returns the number of
80 Intervals(me; T : in out Array1OfReal from TColStd;
81 S : Shape from GeomAbs)
82 ---Purpose: Stores in <T> the parameters bounding the intervals
85 -- The array must provide enough room to accomodate
86 -- for the parameters. i.e. T.Length() > NbIntervals()
88 OutOfRange from Standard
91 Trim(me; First, Last, Tol : Real) returns HCurve2d from Adaptor2d
92 ---Purpose: Returns a curve equivalent of <me> between
93 -- parameters <First> and <Last>. <Tol> is used to
94 -- test for 3d points confusion.
96 OutOfRange from Standard
97 ---Purpose: If <First> >= <Last>
100 IsClosed(me) returns Boolean
103 IsPeriodic(me) returns Boolean
106 Period(me) returns Real
108 DomainError from Standard -- if the curve is not periodic
112 Value(me; U : Real) returns Pnt2d from gp
113 --- Purpose : Computes the point of parameter U on the curve
116 D0 (me; U : Real; P : out Pnt2d from gp)
117 --- Purpose : Computes the point of parameter U.
120 D1 (me; U : Real; P : out Pnt2d from gp ; V : out Vec2d from gp)
121 --- Purpose : Computes the point of parameter U on the curve with its
125 DomainError from Standard
126 --- Purpose : Raised if the continuity of the current interval
130 D2 (me; U : Real; P : out Pnt2d from gp; V1, V2 : out Vec2d from gp)
132 -- Returns the point P of parameter U, the first and second
133 -- derivatives V1 and V2.
135 DomainError from Standard
136 --- Purpose : Raised if the continuity of the current interval
140 D3 (me; U : Real; P : out Pnt2d from gp; V1, V2, V3 : out Vec2d from gp)
142 -- Returns the point P of parameter U, the first, the second
143 -- and the third derivative.
145 DomainError from Standard
146 --- Purpose : Raised if the continuity of the current interval
150 DN (me; U : Real; N : Integer) returns Vec2d from gp
152 -- The returned vector gives the value of the derivative for the
153 -- order of derivation N.
155 DomainError from Standard,
156 --- Purpose : Raised if the continuity of the current interval
158 OutOfRange from Standard
159 --- Purpose : Raised if N < 1.
163 Resolution(me; Ruv :Real) returns Real
164 ---Purpose : returns the parametric resolution
168 GetType(me) returns CurveType from GeomAbs
172 Line(me) returns Lin2d from gp
174 NoSuchObject from Standard
177 Circle(me) returns Circ2d from gp
179 NoSuchObject from Standard
182 Ellipse(me) returns Elips2d from gp
184 NoSuchObject from Standard
187 Hyperbola(me) returns Hypr2d from gp
189 NoSuchObject from Standard
192 Parabola(me) returns Parab2d from gp
194 NoSuchObject from Standard
198 Degree(me) returns Integer
200 NoSuchObject from Standard
203 IsRational(me) returns Boolean
205 NoSuchObject from Standard
208 NbPoles(me) returns Integer
210 NoSuchObject from Standard
214 NbKnots(me) returns Integer
216 NoSuchObject from Standard
221 Bezier(me) returns BezierCurve from Geom2d
223 NoSuchObject from Standard
226 BSpline(me) returns BSplineCurve from Geom2d
228 NoSuchObject from Standard
231 LocalContinuity(me; U1, U2 : Real) returns Shape from GeomAbs
234 load(me : in out; C : Curve from Geom2d; UFirst,ULast : Real)
239 myCurve : Curve from Geom2d ;
240 myTypeCurve : CurveType from GeomAbs ;
241 myFirst : Real from Standard ;
242 myLast : Real from Standard;