0024763: Convertation of the generic classes to the non-generic. Part 6
[occt.git] / src / Contap / Contap_HCurve2dTool.cdl
CommitLineData
b311480e 1-- Created on: 1995-07-17
2-- Created by: Laurent BUCHARD
3-- Copyright (c) 1995-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--
d5f74e42 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
973c2be1 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
e2065c2f 17class HCurve2dTool from Contap
7fd59977 18
19uses
e2065c2f 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
7fd59977 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
e2065c2f 46 FirstParameter(myclass; C: HCurve2d from Adaptor2d) returns Real
7fd59977 47 ---C++: inline
48 ;
49
50
e2065c2f 51 LastParameter(myclass; C: HCurve2d from Adaptor2d) returns Real
7fd59977 52 ---C++: inline
53 ;
54
55 --
56 -- Services to break the curves to the expected continuity
57 --
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
60 -- example).
61 --
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
65 -- return 1.
66 --
67 -- Then you get the parameters bounding the intervals with the
68 -- method Intervals, using an array of length at least
69 -- NbIntervals()+1.
70 --
71 -- If you need to create a curve with a restricted span you can
72 -- use the method Trim().
73
74
e2065c2f 75 Continuity(myclass; C: HCurve2d from Adaptor2d) returns Shape from GeomAbs
7fd59977 76 ---Purpose:
77 ---C++: inline
78 ;
79
e2065c2f 80 NbIntervals(myclass; C: HCurve2d from Adaptor2d; S : Shape from GeomAbs) returns Integer
7fd59977 81 ---Purpose: Returns the number of intervals for continuity
82 -- <S>. May be one if Continuity(myclass) >= <S>
83 ---C++: inline
84 ;
85
e2065c2f 86 Intervals(myclass; C: HCurve2d from Adaptor2d; T : in out Array1OfReal from TColStd;
7fd59977 87 S : Shape from GeomAbs)
88 ---Purpose: Stores in <T> the parameters bounding the intervals
89 -- of continuity <S>.
90 --
91 -- The array must provide enough room to accomodate
92 -- for the parameters. i.e. T.Length() > NbIntervals()
93 raises
94 OutOfRange from Standard
95 ---C++: inline
96 ;
97
e2065c2f 98 IsClosed(myclass; C: HCurve2d from Adaptor2d) returns Boolean
7fd59977 99 ---C++: inline
100 ;
101
e2065c2f 102 IsPeriodic(myclass; C: HCurve2d from Adaptor2d) returns Boolean
7fd59977 103 ---C++: inline
104 ;
105
e2065c2f 106 Period(myclass; C: HCurve2d from Adaptor2d) returns Real
7fd59977 107 raises
108 DomainError from Standard -- if the curve is not periodic
109 ---C++: inline
110 ;
111
e2065c2f 112 Value(myclass; C: HCurve2d from Adaptor2d; U : Real) returns Pnt2d from gp
7fd59977 113 --- Purpose : Computes the point of parameter U on the curve.
114 ---C++: inline
115 ;
116
e2065c2f 117 D0 (myclass; C: HCurve2d from Adaptor2d; U : Real; P : out Pnt2d from gp)
7fd59977 118 --- Purpose : Computes the point of parameter U on the curve.
119 ---C++: inline
120 ;
121
e2065c2f 122 D1 (myclass; C: HCurve2d from Adaptor2d; U : Real; P : out Pnt2d from gp ; V : out Vec2d from gp)
7fd59977 123 --- Purpose : Computes the point of parameter U on the curve with its
124 -- first derivative.
125 raises
126 DomainError from Standard
127 --- Purpose : Raised if the continuity of the current interval
128 -- is not C1.
129 ---C++: inline
130 ;
131
e2065c2f 132 D2 (myclass; C: HCurve2d from Adaptor2d; U : Real; P : out Pnt2d from gp; V1, V2 : out Vec2d from gp)
7fd59977 133 --- Purpose :
134 -- Returns the point P of parameter U, the first and second
135 -- derivatives V1 and V2.
136 raises
137 DomainError from Standard
138 --- Purpose : Raised if the continuity of the current interval
139 -- is not C2.
140 ---C++: inline
141 ;
142
e2065c2f 143 D3 (myclass; C: HCurve2d from Adaptor2d; U : Real; P : out Pnt2d from gp; V1, V2, V3 : out Vec2d from gp)
7fd59977 144 --- Purpose :
145 -- Returns the point P of parameter U, the first, the second
146 -- and the third derivative.
147 raises
148 DomainError from Standard
149 --- Purpose : Raised if the continuity of the current interval
150 -- is not C3.
151 ---C++: inline
152 ;
153
e2065c2f 154 DN (myclass; C: HCurve2d from Adaptor2d; U : Real; N : Integer) returns Vec2d from gp
7fd59977 155 --- Purpose :
156 -- The returned vector gives the value of the derivative for the
157 -- order of derivation N.
158 raises
159 DomainError from Standard,
160 --- Purpose : Raised if the continuity of the current interval
161 -- is not CN.
162 OutOfRange from Standard
163 --- Purpose : Raised if N < 1.
164 ---C++: inline
165 ;
166
e2065c2f 167 Resolution(myclass; C: HCurve2d from Adaptor2d; R3d : Real) returns Real
7fd59977 168 ---Purpose : Returns the parametric resolution corresponding
169 -- to the real space resolution <R3d>.
170 ---C++: inline
171 ;
172
e2065c2f 173 GetType(myclass; C: HCurve2d from Adaptor2d) returns CurveType from GeomAbs
7fd59977 174 ---Purpose: Returns the type of the curve in the current
175 -- interval : Line, Circle, Ellipse, Hyperbola,
176 -- Parabola, BezierCurve, BSplineCurve, OtherCurve.
177 ---C++: inline
178 ;
179
180 --
181 -- The following methods must be called when GetType returned
182 -- the corresponding type.
183 --
184
e2065c2f 185 Line(myclass; C: HCurve2d from Adaptor2d) returns Lin2d from gp
7fd59977 186 raises
187 NoSuchObject from Standard
188 ---C++: inline
189 ;
190
e2065c2f 191 Circle(myclass; C: HCurve2d from Adaptor2d) returns Circ2d from gp
7fd59977 192 raises
193 NoSuchObject from Standard
194 ---C++: inline
195 ;
196
e2065c2f 197 Ellipse(myclass; C: HCurve2d from Adaptor2d) returns Elips2d from gp
7fd59977 198 raises
199 NoSuchObject from Standard
200 ---C++: inline
201 ;
202
e2065c2f 203 Hyperbola(myclass; C: HCurve2d from Adaptor2d) returns Hypr2d from gp
7fd59977 204 raises
205 NoSuchObject from Standard
206 ---C++: inline
207 ;
208
e2065c2f 209 Parabola(myclass; C: HCurve2d from Adaptor2d) returns Parab2d from gp
7fd59977 210 raises
211 NoSuchObject from Standard
212 ---C++: inline
213 ;
214
e2065c2f 215 Bezier(myclass; C: HCurve2d from Adaptor2d) returns BezierCurve from Geom2d
7fd59977 216 raises
217 NoSuchObject from Standard
218 ---C++: inline
219 ;
220
e2065c2f 221 BSpline(myclass; C: HCurve2d from Adaptor2d) returns BSplineCurve from Geom2d
7fd59977 222 raises
223 NoSuchObject from Standard
224 ---C++: inline
225 ;
226
227
228
229
230
e2065c2f 231 NbSamples(myclass; C: HCurve2d from Adaptor2d; U0,U1: Real from Standard)
7fd59977 232 returns Integer from Standard;
233
e2065c2f 234end HCurve2dTool;