0022627: Change OCCT memory management defaults
[occt.git] / src / Adaptor2d / Adaptor2d_Curve2d.cdl
... / ...
CommitLineData
1-- File: Adaptor2d_Curve2d.cdl
2-- Created: Fri Apr 2 11:52:37 1993
3-- Author: Bruno DUMORTIER
4-- <dub@phylox>
5---Copyright: Matra Datavision 1993
6
7
8deferred class Curve2d from Adaptor2d
9
10 ---Purpose: Root class for 2D curves on which geometric
11 -- algorithms work.
12 -- An adapted curve is an interface between the
13 -- services provided by a curve, and those required of
14 -- the curve by algorithms, which use it.
15 -- A derived concrete class is provided:
16 -- Geom2dAdaptor_Curve for a curve from the Geom2d package.
17
18uses
19
20 Array1OfReal from TColStd,
21 Shape from GeomAbs,
22 CurveType from GeomAbs,
23 Vec2d from gp,
24 Pnt2d from gp,
25 Circ2d from gp,
26 Elips2d from gp,
27 Hypr2d from gp,
28 Parab2d from gp,
29 Lin2d from gp,
30 BezierCurve from Geom2d,
31 BSplineCurve from Geom2d,
32 HCurve2d from Adaptor2d
33
34raises
35
36 OutOfRange from Standard,
37 NoSuchObject from Standard,
38 DomainError from Standard
39
40is
41
42 --
43 -- Global methods - Apply to the whole curve.
44 --
45
46 Delete(me:out) is virtual;
47 ---C++: alias "Standard_EXPORT virtual ~Adaptor2d_Curve2d(){Delete();}"
48
49 FirstParameter(me) returns Real
50 is virtual;
51
52 LastParameter(me) returns Real
53 is virtual;
54
55 Continuity(me) returns Shape from GeomAbs
56 is virtual;
57
58 NbIntervals(me; S : Shape from GeomAbs) returns Integer
59 ---Purpose: If necessary, breaks the curve in intervals of
60 -- continuity <S>. And returns the number of
61 -- intervals.
62 is virtual;
63
64 Intervals(me; T : in out Array1OfReal from TColStd;
65 S : Shape from GeomAbs)
66 ---Purpose: Stores in <T> the parameters bounding the intervals
67 -- of continuity <S>.
68 --
69 -- The array must provide enough room to accomodate
70 -- for the parameters. i.e. T.Length() > NbIntervals()
71 raises
72 OutOfRange from Standard
73 is virtual;
74
75 Trim(me; First, Last, Tol : Real) returns HCurve2d from Adaptor2d
76 ---Purpose: Returns a curve equivalent of <me> between
77 -- parameters <First> and <Last>. <Tol> is used to
78 -- test for 3d points confusion.
79 raises
80 OutOfRange from Standard
81 ---Purpose: If <First> >= <Last>
82 is virtual;
83
84 --
85 -- Local methods - Apply to the current interval.
86 -- By default the current interval is the first.
87 --
88
89 IsClosed(me) returns Boolean
90 is virtual;
91
92 IsPeriodic(me) returns Boolean
93 is virtual;
94
95 Period(me) returns Real
96 raises
97 DomainError from Standard -- if the curve is not periodic
98 is virtual;
99
100 Value(me; U : Real) returns Pnt2d from gp
101 --- Purpose : Computes the point of parameter U on the curve.
102 is virtual;
103
104 D0 (me; U : Real; P : out Pnt2d from gp)
105 --- Purpose : Computes the point of parameter U on the curve.
106 is virtual;
107
108 D1 (me; U : Real; P : out Pnt2d from gp ; V : out Vec2d from gp)
109 --- Purpose : Computes the point of parameter U on the curve with its
110 -- first derivative.
111 raises
112 DomainError from Standard
113 --- Purpose : Raised if the continuity of the current interval
114 -- is not C1.
115 is virtual;
116
117 D2 (me; U : Real; P : out Pnt2d from gp; V1, V2 : out Vec2d from gp)
118 --- Purpose :
119 -- Returns the point P of parameter U, the first and second
120 -- derivatives V1 and V2.
121 raises
122 DomainError from Standard
123 --- Purpose : Raised if the continuity of the current interval
124 -- is not C2.
125 is virtual;
126
127 D3 (me; U : Real; P : out Pnt2d from gp; V1, V2, V3 : out Vec2d from gp)
128 --- Purpose :
129 -- Returns the point P of parameter U, the first, the second
130 -- and the third derivative.
131 raises
132 DomainError from Standard
133 --- Purpose : Raised if the continuity of the current interval
134 -- is not C3.
135 is virtual;
136
137 DN (me; U : Real; N : Integer) returns Vec2d from gp
138 --- Purpose :
139 -- The returned vector gives the value of the derivative for the
140 -- order of derivation N.
141 raises
142 DomainError from Standard,
143 --- Purpose : Raised if the continuity of the current interval
144 -- is not CN.
145 OutOfRange from Standard
146 --- Purpose : Raised if N < 1.
147 is virtual;
148
149 Resolution(me; R3d : Real) returns Real
150 ---Purpose : Returns the parametric resolution corresponding
151 -- to the real space resolution <R3d>.
152 is virtual;
153
154 GetType(me) returns CurveType from GeomAbs
155 ---Purpose: Returns the type of the curve in the current
156 -- interval : Line, Circle, Ellipse, Hyperbola,
157 -- Parabola, BezierCurve, BSplineCurve, OtherCurve.
158 is virtual;
159
160 --
161 -- The following methods must be called when GetType returned
162 -- the corresponding type.
163 --
164
165 Line(me) returns Lin2d from gp
166 raises
167 NoSuchObject from Standard
168 is virtual;
169
170 Circle(me) returns Circ2d from gp
171 raises
172 NoSuchObject from Standard
173 is virtual;
174
175 Ellipse(me) returns Elips2d from gp
176 raises
177 NoSuchObject from Standard
178 is virtual;
179
180 Hyperbola(me) returns Hypr2d from gp
181 raises
182 NoSuchObject from Standard
183 is virtual;
184
185 Parabola(me) returns Parab2d from gp
186 raises
187 NoSuchObject from Standard
188 is virtual;
189
190
191 Degree(me) returns Integer
192 raises
193 NoSuchObject from Standard
194 is virtual;
195
196 IsRational(me) returns Boolean
197 raises
198 NoSuchObject from Standard
199 is virtual;
200
201 NbPoles(me) returns Integer
202 raises
203 NoSuchObject from Standard
204 is virtual;
205
206
207 NbKnots(me) returns Integer
208 raises
209 NoSuchObject from Standard
210 is virtual;
211
212
213 Bezier(me) returns BezierCurve from Geom2d
214 raises
215 NoSuchObject from Standard
216 is virtual;
217
218 BSpline(me) returns BSplineCurve from Geom2d
219 raises
220 NoSuchObject from Standard
221 is virtual;
222
223end Curve2d;
224
225