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 FirstParameter(me) returns Real
60 LastParameter(me) returns Real
64 -- Services to break the curves to the expected continuity
66 -- If for example you need the curve to be C2 and the method
67 -- Continuity returns you something lower than C2 (say C1 for
70 -- First compute the number of intervals with the requested
71 -- continuity with the method NbIntervals(). Note that if the
72 -- continuity is higher than the one you need NbIntervals will
75 -- Then you get the parameters bounding the intervals with the
76 -- method Intervals, using an array of length at least
79 -- If you need to create a curve with a restricted span you can
80 -- use the method Trim().
83 Continuity(me) returns Shape from GeomAbs
87 NbIntervals(me; S : Shape from GeomAbs) returns Integer
88 ---Purpose: Returns the number of intervals for continuity
89 -- <S>. May be one if Continuity(me) >= <S>
92 Intervals(me; T : in out Array1OfReal from TColStd;
93 S : Shape from GeomAbs)
94 ---Purpose: Stores in <T> the parameters bounding the intervals
97 -- The array must provide enough room to accomodate
98 -- for the parameters. i.e. T.Length() > NbIntervals()
100 OutOfRange from Standard
103 Trim(me; First, Last, Tol : Real) returns HCurve from Adaptor3d
104 ---Purpose: Returns a curve equivalent of <me> between
105 -- parameters <First> and <Last>. <Tol> is used to
106 -- test for 3d points confusion.
108 OutOfRange from Standard
109 ---Purpose: If <First> >= <Last>
113 IsClosed(me) returns Boolean
116 IsPeriodic(me) returns Boolean
119 Period(me) returns Real
121 DomainError from Standard -- if the curve is not periodic
124 Value(me; U : Real) returns Pnt from gp
125 --- Purpose : Computes the point of parameter U on the curve.
128 D0 (me; U : Real; P : out Pnt from gp)
129 --- Purpose : Computes the point of parameter U on the curve.
132 D1 (me; U : Real; P : out Pnt from gp ; V : out Vec from gp)
133 --- Purpose : Computes the point of parameter U on the curve with its
136 DomainError from Standard
137 --- Purpose : Raised if the continuity of the current interval
141 D2 (me; U : Real; P : out Pnt from gp; V1, V2 : out Vec from gp)
143 -- Returns the point P of parameter U, the first and second
144 -- derivatives V1 and V2.
146 DomainError from Standard
147 --- Purpose : Raised if the continuity of the current interval
151 D3 (me; U : Real; P : out Pnt from gp; V1, V2, V3 : out Vec from gp)
153 -- Returns the point P of parameter U, the first, the second
154 -- and the third derivative.
156 DomainError from Standard
157 --- Purpose : Raised if the continuity of the current interval
161 DN (me; U : Real; N : Integer) returns Vec from gp
163 -- The returned vector gives the value of the derivative for the
164 -- order of derivation N.
166 DomainError from Standard,
167 --- Purpose : Raised if the continuity of the current interval
169 OutOfRange from Standard
170 --- Purpose : Raised if N < 1.
173 Resolution(me; R3d : Real) returns Real
174 ---Purpose : Returns the parametric resolution corresponding
175 -- to the real space resolution <R3d>.
178 GetType(me) returns CurveType from GeomAbs
179 ---Purpose: Returns the type of the curve in the current
180 -- interval : Line, Circle, Ellipse, Hyperbola,
181 -- Parabola, BezierCurve, BSplineCurve, OtherCurve.
185 -- The following methods must be called when GetType returned
186 -- the corresponding type.
189 Line(me) returns Lin from gp
191 NoSuchObject from Standard
194 Circle(me) returns Circ from gp
196 NoSuchObject from Standard
199 Ellipse(me) returns Elips from gp
201 NoSuchObject from Standard
204 Hyperbola(me) returns Hypr from gp
206 NoSuchObject from Standard
209 Parabola(me) returns Parab from gp
211 NoSuchObject from Standard
215 Degree(me) returns Integer
217 NoSuchObject from Standard
220 IsRational(me) returns Boolean
222 NoSuchObject from Standard
225 NbPoles(me) returns Integer
227 NoSuchObject from Standard
231 NbKnots(me) returns Integer
233 NoSuchObject from Standard
236 Bezier(me) returns BezierCurve from Geom
238 NoSuchObject from Standard
241 BSpline(me) returns BSplineCurve from Geom
243 NoSuchObject from Standard
246 ---C++: alias " Standard_EXPORT virtual ~Adaptor3d_Curve();"