1 -- File: HLRBRep_LineTool.cdl
2 -- Created: Wed Aug 18 14:58:10 1993
3 -- Author: Christophe MARION
5 ---Copyright: Matra Datavision 1993
7 class LineTool from HLRBRep
9 ---Purpose: The LineTool class provides class methods to
10 -- access the methodes of the Line.
14 CurveType from GeomAbs,
22 BezierCurve from Geom,
23 BSplineCurve from Geom,
24 Array1OfPnt from TColgp,
25 Array1OfReal from TColStd,
26 HArray1OfReal from TColStd,
27 Array1OfInteger from TColStd
31 OutOfRange from Standard,
32 NoSuchObject from Standard,
33 DomainError from Standard
38 -- Global methods - Apply to the whole Line.
41 FirstParameter(myclass; C : Lin from gp) returns Real
45 LastParameter(myclass; C : Lin from gp) returns Real
49 Continuity(myclass; C : Lin from gp) returns Shape from GeomAbs
53 NbIntervals(myclass; C : Lin from gp; S : Shape from GeomAbs) returns Integer
54 ---Purpose: If necessary, breaks the line in intervals of
55 -- continuity <S>. And returns the number of
60 Intervals(myclass; C :Lin from gp; T: out Array1OfReal from TColStd; Sh : Shape from GeomAbs)
61 ---Purpose: Sets the current working interval.
63 OutOfRange from Standard -- if Index < 1 or Index > NbIntervals
68 -- Local methods - Apply to the current interval.
69 -- By default the current interval is the first.
72 IntervalFirst(myclass; C : Lin from gp) returns Real
73 ---Purpose: Returns the first parameter of the current
78 IntervalLast(myclass; C : Lin from gp) returns Real
79 ---Purpose: Returns the last parameter of the current
84 IntervalContinuity(myclass; C : Lin from gp) returns Shape from GeomAbs
88 IsClosed(myclass; C : Lin from gp) returns Boolean
92 IsPeriodic(myclass; C : Lin from gp) returns Boolean
96 Period(myclass; C : Lin from gp) returns Real
98 DomainError from Standard -- if the line is not periodic
102 Value(myclass; C : Lin from gp; U : Real) returns Pnt from gp
103 --- Purpose : Computes the point of parameter U on the line.
107 D0 (myclass; C : Lin from gp; U : Real; P : out Pnt from gp)
108 --- Purpose : Computes the point of parameter U on the line.
112 D1 (myclass; C : Lin from gp; U : Real; P : out Pnt from gp ; V : out Vec from gp)
113 --- Purpose : Computes the point of parameter U on the line with its
116 DomainError from Standard
117 --- Purpose : Raised if the continuity of the current interval
122 D2 (myclass; C : Lin from gp; U : Real; P : out Pnt from gp; V1, V2 : out Vec from gp)
124 -- Returns the point P of parameter U, the first and second
125 -- derivatives V1 and V2.
127 DomainError from Standard
128 --- Purpose : Raised if the continuity of the current interval
133 D3 (myclass; C : Lin from gp; U : Real; P : out Pnt from gp; V1, V2, V3 : out Vec from gp)
135 -- Returns the point P of parameter U, the first, the second
136 -- and the third derivative.
138 DomainError from Standard
139 --- Purpose : Raised if the continuity of the current interval
144 DN (myclass; C : Lin from gp; U : Real; N : Integer) returns Vec from gp
146 -- The returned vector gives the value of the derivative for the
147 -- order of derivation N.
149 DomainError from Standard,
150 --- Purpose : Raised if the continuity of the current interval
152 OutOfRange from Standard
153 --- Purpose : Raised if N < 1.
157 Resolution(myclass; C : Lin from gp; R3d : Real) returns Real
158 ---Purpose : Returns the parametric resolution corresponding
159 -- to the real space resolution <R3d>.
163 GetType(myclass; C : Lin from gp) returns CurveType from GeomAbs
164 ---Purpose: Returns the type of the line in the current
165 -- interval : Line, Circle, Ellipse, Hyperbola,
166 -- Parabola, BezierCurve, BSplineCurve, OtherCurve.
171 -- The following methods must be called when GetType returned
172 -- the corresponding type.
175 Line(myclass; C : Lin from gp) returns Lin from gp
177 NoSuchObject from Standard
181 Circle(myclass; C : Lin from gp) returns Circ from gp
183 NoSuchObject from Standard
187 Ellipse(myclass; C : Lin from gp) returns Elips from gp
189 NoSuchObject from Standard
193 Hyperbola(myclass; C : Lin from gp) returns Hypr from gp
195 NoSuchObject from Standard
199 Parabola(myclass; C : Lin from gp) returns Parab from gp
201 NoSuchObject from Standard
205 Bezier(myclass; C : Lin from gp) returns BezierCurve from Geom
207 NoSuchObject from Standard
211 BSpline(myclass; C : Lin from gp) returns BSplineCurve from Geom
213 NoSuchObject from Standard
217 Degree(myclass; C : Lin from gp) returns Integer
219 NoSuchObject from Standard
223 NbPoles(myclass; C : Lin from gp) returns Integer
225 NoSuchObject from Standard
229 Poles(myclass; C : Lin from gp; TP : in out Array1OfPnt from TColgp)
231 NoSuchObject from Standard,
232 OutOfRange from Standard -- if TP has not length NbPoles
236 IsRational(myclass; C : Lin from gp) returns Boolean
238 NoSuchObject from Standard
242 PolesAndWeights(myclass; C : Lin from gp; TP : in out Array1OfPnt from TColgp;
243 TW : in out Array1OfReal from TColStd)
245 NoSuchObject from Standard,
246 OutOfRange from Standard -- if TW has not length NbPoles
250 NbKnots(myclass; C : Lin from gp) returns Integer
252 NoSuchObject from Standard
256 KnotsAndMultiplicities(myclass; C : Lin from gp;TK : in out Array1OfReal from TColStd;
257 TM : in out Array1OfInteger from TColStd)
259 NoSuchObject from Standard,
260 OutOfRange from Standard -- if TK has not length NbKnots
265 NbSamples(myclass; C: Lin from gp; U0,U1: Real from Standard)
267 returns Integer from Standard;
269 --modified by NIZHNY-MKK Tue Nov 1 18:49:37 2005
270 SamplePars(myclass; C: Lin from gp; U0,U1: Real from Standard;
271 Defl: Real from Standard; NbMin: Integer from Standard;
272 Pars: in out HArray1OfReal from TColStd);