1 -- Created on: 1995-07-17
2 -- Created by: Laurent BUCHARD
3 -- Copyright (c) 1995-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
9 -- under the terms of the GNU Lesser General Public 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 generic class HCurve2dToolGen from BRepBlend (
21 Array1OfReal from TColStd,
23 CurveType from GeomAbs,
31 BezierCurve from Geom2d,
32 BSplineCurve from Geom2d
36 OutOfRange from Standard,
37 NoSuchObject from Standard,
38 DomainError from Standard
43 -- Global methods - Apply to the whole curve.
46 FirstParameter(myclass; C: CurveGen) returns Real
51 LastParameter(myclass; C: CurveGen) returns Real
56 -- Services to break the curves to the expected continuity
58 -- If for example you need the curve to be C2 and the method
59 -- Continuity returns you something lower than C2 (say C1 for
62 -- First compute the number of intervals with the requested
63 -- continuity with the method NbIntervals(). Note that if the
64 -- continuity is higher than the one you need NbIntervals will
67 -- Then you get the parameters bounding the intervals with the
68 -- method Intervals, using an array of length at least
71 -- If you need to create a curve with a restricted span you can
72 -- use the method Trim().
75 Continuity(myclass; C: CurveGen) returns Shape from GeomAbs
80 NbIntervals(myclass; C: CurveGen; S : Shape from GeomAbs) returns Integer
81 ---Purpose: Returns the number of intervals for continuity
82 -- <S>. May be one if Continuity(myclass) >= <S>
86 Intervals(myclass; C: CurveGen; T : in out Array1OfReal from TColStd;
87 S : Shape from GeomAbs)
88 ---Purpose: Stores in <T> the parameters bounding the intervals
91 -- The array must provide enough room to accomodate
92 -- for the parameters. i.e. T.Length() > NbIntervals()
94 OutOfRange from Standard
98 IsClosed(myclass; C: CurveGen) returns Boolean
102 IsPeriodic(myclass; C: CurveGen) returns Boolean
106 Period(myclass; C: CurveGen) returns Real
108 DomainError from Standard -- if the curve is not periodic
112 Value(myclass; C: CurveGen; U : Real) returns Pnt2d from gp
113 --- Purpose : Computes the point of parameter U on the curve.
117 D0 (myclass; C: CurveGen; U : Real; P : out Pnt2d from gp)
118 --- Purpose : Computes the point of parameter U on the curve.
122 D1 (myclass; C: CurveGen; U : Real; P : out Pnt2d from gp ; V : out Vec2d from gp)
123 --- Purpose : Computes the point of parameter U on the curve with its
126 DomainError from Standard
127 --- Purpose : Raised if the continuity of the current interval
132 D2 (myclass; C: CurveGen; 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
143 D3 (myclass; C: CurveGen; U : Real; P : out Pnt2d from gp; V1, V2, V3 : out Vec2d from gp)
145 -- Returns the point P of parameter U, the first, the second
146 -- and the third derivative.
148 DomainError from Standard
149 --- Purpose : Raised if the continuity of the current interval
154 DN (myclass; C: CurveGen; U : Real; N : Integer) returns Vec2d from gp
156 -- The returned vector gives the value of the derivative for the
157 -- order of derivation N.
159 DomainError from Standard,
160 --- Purpose : Raised if the continuity of the current interval
162 OutOfRange from Standard
163 --- Purpose : Raised if N < 1.
167 Resolution(myclass; C: CurveGen; R3d : Real) returns Real
168 ---Purpose : Returns the parametric resolution corresponding
169 -- to the real space resolution <R3d>.
173 GetType(myclass; C: CurveGen) returns CurveType from GeomAbs
174 ---Purpose: Returns the type of the curve in the current
175 -- interval : Line, Circle, Ellipse, Hyperbola,
176 -- Parabola, BezierCurve, BSplineCurve, OtherCurve.
181 -- The following methods must be called when GetType returned
182 -- the corresponding type.
185 Line(myclass; C: CurveGen) returns Lin2d from gp
187 NoSuchObject from Standard
191 Circle(myclass; C: CurveGen) returns Circ2d from gp
193 NoSuchObject from Standard
197 Ellipse(myclass; C: CurveGen) returns Elips2d from gp
199 NoSuchObject from Standard
203 Hyperbola(myclass; C: CurveGen) returns Hypr2d from gp
205 NoSuchObject from Standard
209 Parabola(myclass; C: CurveGen) returns Parab2d from gp
211 NoSuchObject from Standard
215 Bezier(myclass; C: CurveGen) returns BezierCurve from Geom2d
217 NoSuchObject from Standard
221 BSpline(myclass; C: CurveGen) returns BSplineCurve from Geom2d
223 NoSuchObject from Standard
231 NbSamples(myclass; C: CurveGen; U0,U1: Real from Standard)
232 returns Integer from Standard;