1 -- Created on: 1993-03-31
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 Curve from Adaptor3d
19 ---Purpose: Root class for 3D 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 -- Two derived concrete classes are provided:
25 -- - GeomAdaptor_Curve for a curve from the Geom package
26 -- - Adaptor3d_CurveOnSurface for a curve lying on
27 -- a surface from the Geom package.
31 Array1OfReal from TColStd,
33 CurveType from GeomAbs,
41 BezierCurve from Geom,
42 BSplineCurve from Geom,
47 OutOfRange from Standard,
48 NoSuchObject from Standard,
49 DomainError from Standard
54 -- Global methods - Apply to the whole curve.
57 Delete(me:out) is virtual;
58 ---C++: alias "Standard_EXPORT virtual ~Adaptor3d_Curve(){Delete();}"
60 FirstParameter(me) returns Real
63 LastParameter(me) returns Real
67 -- Services to break the curves to the expected continuity
69 -- If for example you need the curve to be C2 and the method
70 -- Continuity returns you something lower than C2 (say C1 for
73 -- First compute the number of intervals with the requested
74 -- continuity with the method NbIntervals(). Note that if the
75 -- continuity is higher than the one you need NbIntervals will
78 -- Then you get the parameters bounding the intervals with the
79 -- method Intervals, using an array of length at least
82 -- If you need to create a curve with a restricted span you can
83 -- use the method Trim().
86 Continuity(me) returns Shape from GeomAbs
90 NbIntervals(me:in out; S : Shape from GeomAbs) returns Integer
91 ---Purpose: Returns the number of intervals for continuity
92 -- <S>. May be one if Continuity(me) >= <S>
95 Intervals(me:in out; T : in out Array1OfReal from TColStd;
96 S : Shape from GeomAbs)
97 ---Purpose: Stores in <T> the parameters bounding the intervals
100 -- The array must provide enough room to accomodate
101 -- for the parameters. i.e. T.Length() > NbIntervals()
103 OutOfRange from Standard
106 Trim(me; First, Last, Tol : Real) returns HCurve from Adaptor3d
107 ---Purpose: Returns a curve equivalent of <me> between
108 -- parameters <First> and <Last>. <Tol> is used to
109 -- test for 3d points confusion.
111 OutOfRange from Standard
112 ---Purpose: If <First> >= <Last>
116 IsClosed(me) returns Boolean
119 IsPeriodic(me) returns Boolean
122 Period(me) returns Real
124 DomainError from Standard -- if the curve is not periodic
127 Value(me; U : Real) returns Pnt from gp
128 --- Purpose : Computes the point of parameter U on the curve.
131 D0 (me; U : Real; P : out Pnt from gp)
132 --- Purpose : Computes the point of parameter U on the curve.
135 D1 (me; U : Real; P : out Pnt from gp ; V : out Vec from gp)
136 --- Purpose : Computes the point of parameter U on the curve with its
139 DomainError from Standard
140 --- Purpose : Raised if the continuity of the current interval
144 D2 (me; U : Real; P : out Pnt from gp; V1, V2 : out Vec from gp)
146 -- Returns the point P of parameter U, the first and second
147 -- derivatives V1 and V2.
149 DomainError from Standard
150 --- Purpose : Raised if the continuity of the current interval
154 D3 (me; U : Real; P : out Pnt from gp; V1, V2, V3 : out Vec from gp)
156 -- Returns the point P of parameter U, the first, the second
157 -- and the third derivative.
159 DomainError from Standard
160 --- Purpose : Raised if the continuity of the current interval
164 DN (me; U : Real; N : Integer) returns Vec from gp
166 -- The returned vector gives the value of the derivative for the
167 -- order of derivation N.
169 DomainError from Standard,
170 --- Purpose : Raised if the continuity of the current interval
172 OutOfRange from Standard
173 --- Purpose : Raised if N < 1.
176 Resolution(me; R3d : Real) returns Real
177 ---Purpose : Returns the parametric resolution corresponding
178 -- to the real space resolution <R3d>.
181 GetType(me) returns CurveType from GeomAbs
182 ---Purpose: Returns the type of the curve in the current
183 -- interval : Line, Circle, Ellipse, Hyperbola,
184 -- Parabola, BezierCurve, BSplineCurve, OtherCurve.
188 -- The following methods must be called when GetType returned
189 -- the corresponding type.
192 Line(me) returns Lin from gp
194 NoSuchObject from Standard
197 Circle(me) returns Circ from gp
199 NoSuchObject from Standard
202 Ellipse(me) returns Elips from gp
204 NoSuchObject from Standard
207 Hyperbola(me) returns Hypr from gp
209 NoSuchObject from Standard
212 Parabola(me) returns Parab from gp
214 NoSuchObject from Standard
218 Degree(me) returns Integer
220 NoSuchObject from Standard
223 IsRational(me) returns Boolean
225 NoSuchObject from Standard
228 NbPoles(me) returns Integer
230 NoSuchObject from Standard
234 NbKnots(me) returns Integer
236 NoSuchObject from Standard
239 Bezier(me) returns BezierCurve from Geom
241 NoSuchObject from Standard
244 BSpline(me) returns BSplineCurve from Geom
246 NoSuchObject from Standard