1 -- Created on: 1993-04-02
2 -- Created by: Bruno DUMORTIER
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License 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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 deferred class Curve2d from Adaptor2d
19 ---Purpose: Root class for 2D curves on which geometric
21 -- An adapted curve is an interface between the
22 -- services provided by a curve, and those required of
23 -- the curve by algorithms, which use it.
24 -- A derived concrete class is provided:
25 -- Geom2dAdaptor_Curve for a curve from the Geom2d package.
29 Array1OfReal from TColStd,
31 CurveType from GeomAbs,
39 BezierCurve from Geom2d,
40 BSplineCurve from Geom2d,
41 HCurve2d from Adaptor2d
45 OutOfRange from Standard,
46 NoSuchObject from Standard,
47 DomainError from Standard
52 -- Global methods - Apply to the whole curve.
55 Delete(me:out) is virtual;
56 ---C++: alias "Standard_EXPORT virtual ~Adaptor2d_Curve2d(){Delete();}"
58 FirstParameter(me) returns Real
61 LastParameter(me) returns Real
64 Continuity(me) returns Shape from GeomAbs
67 NbIntervals(me; S : Shape from GeomAbs) returns Integer
68 ---Purpose: If necessary, breaks the curve in intervals of
69 -- continuity <S>. And returns the number of
73 Intervals(me; T : in out Array1OfReal from TColStd;
74 S : Shape from GeomAbs)
75 ---Purpose: Stores in <T> the parameters bounding the intervals
78 -- The array must provide enough room to accomodate
79 -- for the parameters. i.e. T.Length() > NbIntervals()
81 OutOfRange from Standard
84 Trim(me; First, Last, Tol : Real) returns HCurve2d from Adaptor2d
85 ---Purpose: Returns a curve equivalent of <me> between
86 -- parameters <First> and <Last>. <Tol> is used to
87 -- test for 3d points confusion.
89 OutOfRange from Standard
90 ---Purpose: If <First> >= <Last>
94 -- Local methods - Apply to the current interval.
95 -- By default the current interval is the first.
98 IsClosed(me) returns Boolean
101 IsPeriodic(me) returns Boolean
104 Period(me) returns Real
106 DomainError from Standard -- if the curve is not periodic
109 Value(me; U : Real) returns Pnt2d from gp
110 --- Purpose : Computes the point of parameter U on the curve.
113 D0 (me; U : Real; P : out Pnt2d from gp)
114 --- Purpose : Computes the point of parameter U on the curve.
117 D1 (me; U : Real; P : out Pnt2d from gp ; V : out Vec2d from gp)
118 --- Purpose : Computes the point of parameter U on the curve with its
121 DomainError from Standard
122 --- Purpose : Raised if the continuity of the current interval
126 D2 (me; U : Real; P : out Pnt2d from gp; V1, V2 : out Vec2d from gp)
128 -- Returns the point P of parameter U, the first and second
129 -- derivatives V1 and V2.
131 DomainError from Standard
132 --- Purpose : Raised if the continuity of the current interval
136 D3 (me; U : Real; P : out Pnt2d from gp; V1, V2, V3 : out Vec2d from gp)
138 -- Returns the point P of parameter U, the first, the second
139 -- and the third derivative.
141 DomainError from Standard
142 --- Purpose : Raised if the continuity of the current interval
146 DN (me; U : Real; N : Integer) returns Vec2d from gp
148 -- The returned vector gives the value of the derivative for the
149 -- order of derivation N.
151 DomainError from Standard,
152 --- Purpose : Raised if the continuity of the current interval
154 OutOfRange from Standard
155 --- Purpose : Raised if N < 1.
158 Resolution(me; R3d : Real) returns Real
159 ---Purpose : Returns the parametric resolution corresponding
160 -- to the real space resolution <R3d>.
163 GetType(me) returns CurveType from GeomAbs
164 ---Purpose: Returns the type of the curve in the current
165 -- interval : Line, Circle, Ellipse, Hyperbola,
166 -- Parabola, BezierCurve, BSplineCurve, OtherCurve.
170 -- The following methods must be called when GetType returned
171 -- the corresponding type.
174 Line(me) returns Lin2d from gp
176 NoSuchObject from Standard
179 Circle(me) returns Circ2d from gp
181 NoSuchObject from Standard
184 Ellipse(me) returns Elips2d from gp
186 NoSuchObject from Standard
189 Hyperbola(me) returns Hypr2d from gp
191 NoSuchObject from Standard
194 Parabola(me) returns Parab2d from gp
196 NoSuchObject from Standard
200 Degree(me) returns Integer
202 NoSuchObject from Standard
205 IsRational(me) returns Boolean
207 NoSuchObject from Standard
210 NbPoles(me) returns Integer
212 NoSuchObject from Standard
216 NbKnots(me) returns Integer
218 NoSuchObject from Standard
221 NbSamples(me) returns Integer from Standard is virtual;
223 Bezier(me) returns BezierCurve from Geom2d
225 NoSuchObject from Standard
228 BSpline(me) returns BSplineCurve from Geom2d
230 NoSuchObject from Standard