1 -- Created on: 1993-04-02
2 -- Created by: Bruno DUMORTIER
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
23 deferred class Curve2d from Adaptor2d
25 ---Purpose: Root class for 2D curves on which geometric
27 -- An adapted curve is an interface between the
28 -- services provided by a curve, and those required of
29 -- the curve by algorithms, which use it.
30 -- A derived concrete class is provided:
31 -- Geom2dAdaptor_Curve for a curve from the Geom2d package.
35 Array1OfReal from TColStd,
37 CurveType from GeomAbs,
45 BezierCurve from Geom2d,
46 BSplineCurve from Geom2d,
47 HCurve2d from Adaptor2d
51 OutOfRange from Standard,
52 NoSuchObject from Standard,
53 DomainError from Standard
58 -- Global methods - Apply to the whole curve.
61 Delete(me:out) is virtual;
62 ---C++: alias "Standard_EXPORT virtual ~Adaptor2d_Curve2d(){Delete();}"
64 FirstParameter(me) returns Real
67 LastParameter(me) returns Real
70 Continuity(me) returns Shape from GeomAbs
73 NbIntervals(me; S : Shape from GeomAbs) returns Integer
74 ---Purpose: If necessary, breaks the curve in intervals of
75 -- continuity <S>. And returns the number of
79 Intervals(me; T : in out Array1OfReal from TColStd;
80 S : Shape from GeomAbs)
81 ---Purpose: Stores in <T> the parameters bounding the intervals
84 -- The array must provide enough room to accomodate
85 -- for the parameters. i.e. T.Length() > NbIntervals()
87 OutOfRange from Standard
90 Trim(me; First, Last, Tol : Real) returns HCurve2d from Adaptor2d
91 ---Purpose: Returns a curve equivalent of <me> between
92 -- parameters <First> and <Last>. <Tol> is used to
93 -- test for 3d points confusion.
95 OutOfRange from Standard
96 ---Purpose: If <First> >= <Last>
100 -- Local methods - Apply to the current interval.
101 -- By default the current interval is the first.
104 IsClosed(me) returns Boolean
107 IsPeriodic(me) returns Boolean
110 Period(me) returns Real
112 DomainError from Standard -- if the curve is not periodic
115 Value(me; U : Real) returns Pnt2d from gp
116 --- Purpose : Computes the point of parameter U on the curve.
119 D0 (me; U : Real; P : out Pnt2d from gp)
120 --- Purpose : Computes the point of parameter U on the curve.
123 D1 (me; U : Real; P : out Pnt2d from gp ; V : out Vec2d from gp)
124 --- Purpose : Computes the point of parameter U on the curve with its
127 DomainError from Standard
128 --- Purpose : Raised if the continuity of the current interval
132 D2 (me; U : Real; P : out Pnt2d from gp; V1, V2 : out Vec2d from gp)
134 -- Returns the point P of parameter U, the first and second
135 -- derivatives V1 and V2.
137 DomainError from Standard
138 --- Purpose : Raised if the continuity of the current interval
142 D3 (me; U : Real; P : out Pnt2d from gp; V1, V2, V3 : out Vec2d from gp)
144 -- Returns the point P of parameter U, the first, the second
145 -- and the third derivative.
147 DomainError from Standard
148 --- Purpose : Raised if the continuity of the current interval
152 DN (me; U : Real; N : Integer) returns Vec2d from gp
154 -- The returned vector gives the value of the derivative for the
155 -- order of derivation N.
157 DomainError from Standard,
158 --- Purpose : Raised if the continuity of the current interval
160 OutOfRange from Standard
161 --- Purpose : Raised if N < 1.
164 Resolution(me; R3d : Real) returns Real
165 ---Purpose : Returns the parametric resolution corresponding
166 -- to the real space resolution <R3d>.
169 GetType(me) returns CurveType from GeomAbs
170 ---Purpose: Returns the type of the curve in the current
171 -- interval : Line, Circle, Ellipse, Hyperbola,
172 -- Parabola, BezierCurve, BSplineCurve, OtherCurve.
176 -- The following methods must be called when GetType returned
177 -- the corresponding type.
180 Line(me) returns Lin2d from gp
182 NoSuchObject from Standard
185 Circle(me) returns Circ2d from gp
187 NoSuchObject from Standard
190 Ellipse(me) returns Elips2d from gp
192 NoSuchObject from Standard
195 Hyperbola(me) returns Hypr2d from gp
197 NoSuchObject from Standard
200 Parabola(me) returns Parab2d from gp
202 NoSuchObject from Standard
206 Degree(me) returns Integer
208 NoSuchObject from Standard
211 IsRational(me) returns Boolean
213 NoSuchObject from Standard
216 NbPoles(me) returns Integer
218 NoSuchObject from Standard
222 NbKnots(me) returns Integer
224 NoSuchObject from Standard
228 Bezier(me) returns BezierCurve from Geom2d
230 NoSuchObject from Standard
233 BSpline(me) returns BSplineCurve from Geom2d
235 NoSuchObject from Standard