0023625: New functionality building reflect lines on a shape
[occt.git] / src / Contap / Contap_HCurve2dToolGen.cdl
CommitLineData
b311480e 1-- Created on: 1995-07-17
2-- Created by: Laurent BUCHARD
3-- Copyright (c) 1995-1999 Matra Datavision
4-- Copyright (c) 1999-2012 OPEN CASCADE SAS
5--
6-- The content of this file is subject to the Open CASCADE Technology Public
7-- License Version 6.5 (the "License"). You may not use the content of this file
8-- except in compliance with the License. Please obtain a copy of the License
9-- at http://www.opencascade.org and read it completely before using this file.
10--
11-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13--
14-- The Original Code and all software distributed under the License is
15-- distributed on an "AS IS" basis, without warranty of any kind, and the
16-- Initial Developer hereby disclaims all such warranties, including without
17-- limitation, any warranties of merchantability, fitness for a particular
18-- purpose or non-infringement. Please see the License for the specific terms
19-- and conditions governing the rights and limitations under the License.
20
7fd59977 21
22
23generic class HCurve2dToolGen from Contap (
24 CurveGen as any)
25
26uses
27 Array1OfReal from TColStd,
28 Shape from GeomAbs,
29 CurveType from GeomAbs,
30 Vec2d from gp,
31 Pnt2d from gp,
32 Circ2d from gp,
33 Elips2d from gp,
34 Hypr2d from gp,
35 Parab2d from gp,
36 Lin2d from gp,
37 BezierCurve from Geom2d,
38 BSplineCurve from Geom2d
39
40raises
41
42 OutOfRange from Standard,
43 NoSuchObject from Standard,
44 DomainError from Standard
45
46is
47
48 --
49 -- Global methods - Apply to the whole curve.
50 --
51
52 FirstParameter(myclass; C: CurveGen) returns Real
53 ---C++: inline
54 ;
55
56
57 LastParameter(myclass; C: CurveGen) returns Real
58 ---C++: inline
59 ;
60
61 --
62 -- Services to break the curves to the expected continuity
63 --
64 -- If for example you need the curve to be C2 and the method
65 -- Continuity returns you something lower than C2 (say C1 for
66 -- example).
67 --
68 -- First compute the number of intervals with the requested
69 -- continuity with the method NbIntervals(). Note that if the
70 -- continuity is higher than the one you need NbIntervals will
71 -- return 1.
72 --
73 -- Then you get the parameters bounding the intervals with the
74 -- method Intervals, using an array of length at least
75 -- NbIntervals()+1.
76 --
77 -- If you need to create a curve with a restricted span you can
78 -- use the method Trim().
79
80
81 Continuity(myclass; C: CurveGen) returns Shape from GeomAbs
82 ---Purpose:
83 ---C++: inline
84 ;
85
86 NbIntervals(myclass; C: CurveGen; S : Shape from GeomAbs) returns Integer
87 ---Purpose: Returns the number of intervals for continuity
88 -- <S>. May be one if Continuity(myclass) >= <S>
89 ---C++: inline
90 ;
91
92 Intervals(myclass; C: CurveGen; T : in out Array1OfReal from TColStd;
93 S : Shape from GeomAbs)
94 ---Purpose: Stores in <T> the parameters bounding the intervals
95 -- of continuity <S>.
96 --
97 -- The array must provide enough room to accomodate
98 -- for the parameters. i.e. T.Length() > NbIntervals()
99 raises
100 OutOfRange from Standard
101 ---C++: inline
102 ;
103
104 IsClosed(myclass; C: CurveGen) returns Boolean
105 ---C++: inline
106 ;
107
108 IsPeriodic(myclass; C: CurveGen) returns Boolean
109 ---C++: inline
110 ;
111
112 Period(myclass; C: CurveGen) returns Real
113 raises
114 DomainError from Standard -- if the curve is not periodic
115 ---C++: inline
116 ;
117
118 Value(myclass; C: CurveGen; U : Real) returns Pnt2d from gp
119 --- Purpose : Computes the point of parameter U on the curve.
120 ---C++: inline
121 ;
122
123 D0 (myclass; C: CurveGen; U : Real; P : out Pnt2d from gp)
124 --- Purpose : Computes the point of parameter U on the curve.
125 ---C++: inline
126 ;
127
128 D1 (myclass; C: CurveGen; U : Real; P : out Pnt2d from gp ; V : out Vec2d from gp)
129 --- Purpose : Computes the point of parameter U on the curve with its
130 -- first derivative.
131 raises
132 DomainError from Standard
133 --- Purpose : Raised if the continuity of the current interval
134 -- is not C1.
135 ---C++: inline
136 ;
137
138 D2 (myclass; C: CurveGen; U : Real; P : out Pnt2d from gp; V1, V2 : out Vec2d from gp)
139 --- Purpose :
140 -- Returns the point P of parameter U, the first and second
141 -- derivatives V1 and V2.
142 raises
143 DomainError from Standard
144 --- Purpose : Raised if the continuity of the current interval
145 -- is not C2.
146 ---C++: inline
147 ;
148
149 D3 (myclass; C: CurveGen; U : Real; P : out Pnt2d from gp; V1, V2, V3 : out Vec2d from gp)
150 --- Purpose :
151 -- Returns the point P of parameter U, the first, the second
152 -- and the third derivative.
153 raises
154 DomainError from Standard
155 --- Purpose : Raised if the continuity of the current interval
156 -- is not C3.
157 ---C++: inline
158 ;
159
160 DN (myclass; C: CurveGen; U : Real; N : Integer) returns Vec2d from gp
161 --- Purpose :
162 -- The returned vector gives the value of the derivative for the
163 -- order of derivation N.
164 raises
165 DomainError from Standard,
166 --- Purpose : Raised if the continuity of the current interval
167 -- is not CN.
168 OutOfRange from Standard
169 --- Purpose : Raised if N < 1.
170 ---C++: inline
171 ;
172
173 Resolution(myclass; C: CurveGen; R3d : Real) returns Real
174 ---Purpose : Returns the parametric resolution corresponding
175 -- to the real space resolution <R3d>.
176 ---C++: inline
177 ;
178
179 GetType(myclass; C: CurveGen) returns CurveType from GeomAbs
180 ---Purpose: Returns the type of the curve in the current
181 -- interval : Line, Circle, Ellipse, Hyperbola,
182 -- Parabola, BezierCurve, BSplineCurve, OtherCurve.
183 ---C++: inline
184 ;
185
186 --
187 -- The following methods must be called when GetType returned
188 -- the corresponding type.
189 --
190
191 Line(myclass; C: CurveGen) returns Lin2d from gp
192 raises
193 NoSuchObject from Standard
194 ---C++: inline
195 ;
196
197 Circle(myclass; C: CurveGen) returns Circ2d from gp
198 raises
199 NoSuchObject from Standard
200 ---C++: inline
201 ;
202
203 Ellipse(myclass; C: CurveGen) returns Elips2d from gp
204 raises
205 NoSuchObject from Standard
206 ---C++: inline
207 ;
208
209 Hyperbola(myclass; C: CurveGen) returns Hypr2d from gp
210 raises
211 NoSuchObject from Standard
212 ---C++: inline
213 ;
214
215 Parabola(myclass; C: CurveGen) returns Parab2d from gp
216 raises
217 NoSuchObject from Standard
218 ---C++: inline
219 ;
220
221 Bezier(myclass; C: CurveGen) returns BezierCurve from Geom2d
222 raises
223 NoSuchObject from Standard
224 ---C++: inline
225 ;
226
227 BSpline(myclass; C: CurveGen) returns BSplineCurve from Geom2d
228 raises
229 NoSuchObject from Standard
230 ---C++: inline
231 ;
232
233
234
235
236
237 NbSamples(myclass; C: CurveGen; U0,U1: Real from Standard)
238 returns Integer from Standard;
239
240end HCurve2dToolGen;