0024428: Implementation of LGPL license
[occt.git] / src / Adaptor3d / Adaptor3d_OffsetCurve.cdl
CommitLineData
b311480e 1-- Created on: 1993-04-15
2-- Created by: Bruno DUMORTIER
3-- Copyright (c) 1993-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
973c2be1 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.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17class OffsetCurve from Adaptor3d inherits Curve2d from Adaptor2d
18
19 ---Purpose: Defines an Offset curve.
20 --
21
22uses
23 Array1OfReal from TColStd,
24 Shape from GeomAbs,
25 CurveType from GeomAbs,
26 Vec2d from gp,
27 Pnt2d from gp,
28 Circ2d from gp,
29 Elips2d from gp,
30 Hypr2d from gp,
31 Parab2d from gp,
32 Lin2d from gp,
33 BezierCurve from Geom2d,
34 BSplineCurve from Geom2d,
35 HCurve2d from Adaptor2d
36
37
38raises
39 NoSuchObject from Standard,
40 DomainError from Standard,
41 OutOfRange from Standard,
42 TypeMismatch from Standard
43
44is
45
46 --
47 -- Methods specific of OffsetCurve
48 --
49
50 Create returns OffsetCurve from Adaptor3d;
51 ---Purpose: The Offset is set to 0.
52
53 Create(C : HCurve2d from Adaptor2d) returns OffsetCurve from Adaptor3d;
54 ---Purpose: The curve is loaded. The Offset is set to 0.
55
56 Create(C : HCurve2d from Adaptor2d; Offset : Real)
57 returns OffsetCurve from Adaptor3d;
58 ---Purpose: Creates an OffsetCurve curve.
59 -- The Offset is set to Offset.
60 --
61
62 Create(C : HCurve2d from Adaptor2d; Offset : Real; WFirst,WLast : Real)
63 returns OffsetCurve from Adaptor3d;
64 ---Purpose: Create an Offset curve.
65 -- WFirst,WLast define the bounds of the Offset curve.
66
67
68 Load( me:in out ;S : HCurve2d from Adaptor2d)
69 ---Purpose: Changes the curve. The Offset is reset to 0.
70 is static;
71
72 Load (me : in out ; Offset : Real)
73 ---Purpose: Changes the Offset on the current Curve.
74 is static;
75
76 Load (me : in out ; Offset : Real; WFirst,WLast : Real)
77 ---Purpose: Changes the Offset Curve on the current Curve.
78 is static;
79
80 Curve(me) returns HCurve2d from Adaptor2d
81 ---C++: inline
82 ---C++: return const &
83 is static;
84
85 Offset(me) returns Real
86 ---C++: inline
87 is static;
88
89
90 --
91 -- Implementation of Curve2d from Adaptor2d methods
92 --
93
94 --
95 -- Global methods - Apply to the whole curve.
96 --
97
98 FirstParameter(me) returns Real
99 ---C++: inline
100 is redefined static;
101
102 LastParameter(me) returns Real
103 ---C++: inline
104 is redefined static;
105
106 Continuity(me) returns Shape from GeomAbs
107 is redefined static;
108
109 NbIntervals(me; S : Shape from GeomAbs) returns Integer
110 ---Purpose: If necessary, breaks the curve in intervals of
111 -- continuity <S>. And returns the number of
112 -- intervals.
113 is redefined static;
114
115 Intervals(me; T : in out Array1OfReal from TColStd;
116 S : Shape from GeomAbs)
117 ---Purpose: Stores in <T> the parameters bounding the intervals
118 -- of continuity <S>.
119 --
120 -- The array must provide enough room to accomodate
121 -- for the parameters. i.e. T.Length() > NbIntervals()
122 raises
123 OutOfRange from Standard
124 is redefined static;
125
126 Trim(me; First, Last, Tol : Real) returns HCurve2d from Adaptor2d
127 ---Purpose: Returns a curve equivalent of <me> between
128 -- parameters <First> and <Last>. <Tol> is used to
129 -- test for 3d points confusion.
130 raises
131 OutOfRange from Standard
132 ---Purpose: If <First> >= <Last>
133 is redefined static;
134
135 IsClosed(me) returns Boolean
136 is redefined static;
137
138 IsPeriodic(me) returns Boolean
139 is redefined static;
140
141 Period(me) returns Real
142 raises
143 DomainError from Standard -- if the curve is not periodic
144 is redefined static;
145
146 Value(me; U : Real) returns Pnt2d from gp
147 --- Purpose : Computes the point of parameter U on the curve.
148 is redefined static;
149
150 D0 (me; U : Real; P : out Pnt2d from gp)
151 --- Purpose : Computes the point of parameter U on the curve.
152 is redefined static;
153
154 D1 (me; U : Real; P : out Pnt2d from gp ; V : out Vec2d from gp)
155 --- Purpose : Computes the point of parameter U on the curve with its
156 -- first derivative.
157 raises
158 DomainError from Standard
159 --- Purpose : Raised if the continuity of the current interval
160 -- is not C1.
161 is redefined static;
162
163 D2 (me; U : Real; P : out Pnt2d from gp; V1, V2 : out Vec2d from gp)
164 --- Purpose :
165 -- Returns the point P of parameter U, the first and second
166 -- derivatives V1 and V2.
167 raises
168 DomainError from Standard
169 --- Purpose : Raised if the continuity of the current interval
170 -- is not C2.
171 is redefined static;
172
173 D3 (me; U : Real; P : out Pnt2d from gp; V1, V2, V3 : out Vec2d from gp)
174 --- Purpose :
175 -- Returns the point P of parameter U, the first, the second
176 -- and the third derivative.
177 raises
178 DomainError from Standard
179 --- Purpose : Raised if the continuity of the current interval
180 -- is not C3.
181 is redefined static;
182
183 DN (me; U : Real; N : Integer) returns Vec2d from gp
184 --- Purpose :
185 -- The returned vector gives the value of the derivative for the
186 -- order of derivation N.
187 raises
188 DomainError from Standard,
189 --- Purpose : Raised if the continuity of the current interval
190 -- is not CN.
191 OutOfRange from Standard
192 --- Purpose : Raised if N < 1.
193 is redefined static;
194
195 Resolution(me; R3d : Real) returns Real
196 ---Purpose : Returns the parametric resolution corresponding
197 -- to the real space resolution <R3d>.
198 is redefined static;
199
200 GetType(me) returns CurveType from GeomAbs
201 ---Purpose: Returns the type of the curve in the current
202 -- interval : Line, Circle, Ellipse, Hyperbola,
203 -- Parabola, BezierCurve, BSplineCurve, OtherCurve.
204 is redefined static;
205
206 --
207 -- The following methods must be called when GetType returned
208 -- the corresponding type.
209 --
210
211 Line(me) returns Lin2d from gp
212 raises
213 NoSuchObject from Standard
214 is redefined static;
215
216 Circle(me) returns Circ2d from gp
217 raises
218 NoSuchObject from Standard
219 is redefined static;
220
221 Ellipse(me) returns Elips2d from gp
222 raises
223 NoSuchObject from Standard
224 is redefined static;
225
226 Hyperbola(me) returns Hypr2d from gp
227 raises
228 NoSuchObject from Standard
229 is redefined static;
230
231 Parabola(me) returns Parab2d from gp
232 raises
233 NoSuchObject from Standard
234 is redefined static;
235
236
237 Degree(me) returns Integer
238 raises
239 NoSuchObject from Standard
240 is redefined static;
241
242 IsRational(me) returns Boolean
243 raises
244 NoSuchObject from Standard
245 is redefined static;
246
247 NbPoles(me) returns Integer
248 raises
249 NoSuchObject from Standard
250 is redefined static;
251
252
253 NbKnots(me) returns Integer
254 raises
255 NoSuchObject from Standard
256 is redefined static;
257
258
259 Bezier(me) returns BezierCurve from Geom2d
260 raises
261 NoSuchObject from Standard
262 is redefined static;
263
264 BSpline(me) returns BSplineCurve from Geom2d
265 raises
266 NoSuchObject from Standard
267 is redefined static;
268
269fields
270
271 myCurve : HCurve2d from Adaptor2d;
272 myOffset : Real;
273 myFirst : Real;
274 myLast : Real;
275
276end OffsetCurve;
277