1 -- Created on: 1994-02-23
3 -- Copyright (c) 1994-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 HCurve2d from Adaptor2d inherits TShared from MMgt
19 ---Purpose: Root class for 2D curves manipulated by handles, on
20 -- which geometric algorithms work.
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 specific class is provided:
25 -- Geom2dAdaptor_HCurve for a curve from the Geom2d package.
31 Array1OfReal from TColStd,
33 CurveType from GeomAbs,
41 BezierCurve from Geom2d,
42 BSplineCurve from Geom2d,
43 Curve2d from Adaptor2d
47 OutOfRange from Standard,
48 NoSuchObject from Standard,
49 DomainError from Standard,
50 NotImplemented from Standard
55 -- Access to the curve
58 Curve2d(me) returns Curve2d from Adaptor2d
59 ---Purpose: Returns a reference to the Curve2d inside the HCurve2d.
61 ---C++: return const &
65 -- Curve methods, they are provided for convenience. Each
66 -- method M() is defined inline as :
68 -- Adaptor_HCurve::M() { Curve().M(); }
70 -- See the class Curve for comments on the methods.
73 -- Global methods - Apply to the whole curve.
76 FirstParameter(me) returns Real ;
78 LastParameter(me) returns Real ;
81 Continuity(me) returns Shape from GeomAbs ;
85 NbIntervals(me ; S : Shape from GeomAbs) returns Integer ;
89 Intervals(me; T : in out Array1OfReal from TColStd;
90 S : Shape from GeomAbs)
93 OutOfRange from Standard
96 Trim(me; First, Last, Tol : Real) returns HCurve2d from Adaptor2d
99 OutOfRange from Standard
100 ---Purpose: If <First> >= <Last>
104 -- Local methods - Apply to the current interval.
105 -- By default the current interval is the first.
108 IsClosed(me) returns Boolean ;
112 IsPeriodic(me) returns Boolean ;
116 Period(me) returns Real ;
120 Value(me; U : Real) returns Pnt2d from gp ;
124 D0 (me; U : Real; P : out Pnt2d from gp) ;
128 D1 (me; U : Real; P : out Pnt2d from gp ; V : out Vec2d from gp) ;
132 D2 (me; U : Real; P : out Pnt2d from gp;
133 V1, V2 : out Vec2d from gp) ;
137 D3 (me; U : Real; P : out Pnt2d from gp;
138 V1, V2, V3 : out Vec2d from gp) ;
142 DN (me; U : Real; N : Integer) returns Vec2d from gp ;
146 Resolution(me; R3d : Real) returns Real ;
150 GetType(me) returns CurveType from GeomAbs ;
155 -- The following methods must be called when GetType returned
156 -- the corresponding type.
159 Line(me) returns Lin2d from gp ;
163 Circle(me) returns Circ2d from gp ;
167 Ellipse(me) returns Elips2d from gp ;
171 Hyperbola(me) returns Hypr2d from gp ;
175 Parabola(me) returns Parab2d from gp ;
179 Degree(me) returns Integer
182 NoSuchObject from Standard ;
184 IsRational(me) returns Boolean
187 NoSuchObject from Standard ;
190 NbPoles(me) returns Integer
193 NoSuchObject from Standard ;
196 NbKnots(me) returns Integer
199 NoSuchObject from Standard ;
202 Bezier(me) returns BezierCurve from Geom2d
205 NoSuchObject from Standard;
207 BSpline(me) returns BSplineCurve from Geom2d
210 NoSuchObject from Standard,
211 OutOfRange from Standard -- if TK has not length NbKnots