b7fdeffe2d23e7f4f70ef9544e4b6c26b6bf80fe
[occt.git] / src / BRepBlend / BRepBlend_HCurveToolGen.cdl
1 -- Created on: 1995-07-17
2 -- Created by: Laurent BUCHARD
3 -- Copyright (c) 1995-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
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
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.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 generic class HCurveToolGen from BRepBlend (
18      CurveGen  as any)
19
20 uses 
21      Array1OfReal    from TColStd,
22      Shape           from GeomAbs,
23      CurveType       from GeomAbs,
24      Vec             from gp,
25      Pnt             from gp,
26      Circ            from gp,
27      Elips           from gp,
28      Hypr            from gp,
29      Parab           from gp,
30      Lin             from gp,
31      BezierCurve     from Geom,
32      BSplineCurve    from Geom
33      
34 raises
35     
36     OutOfRange          from Standard,
37     NoSuchObject        from Standard,
38     DomainError         from Standard
39  
40 is
41
42     --
43     --     Global methods - Apply to the whole curve.
44     --     
45     
46     FirstParameter(myclass; C: CurveGen) returns Real
47         ---C++: inline
48     ;
49     
50
51     LastParameter(myclass; C: CurveGen) returns Real
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     
75     Continuity(myclass; C: CurveGen) returns Shape from GeomAbs
76         ---Purpose: 
77         ---C++: inline
78     ;
79     
80     NbIntervals(myclass; C: CurveGen; S : Shape from GeomAbs) returns Integer
81         ---Purpose: Returns  the number  of  intervals for  continuity
82         --          <S>. May be one if Continuity(myclass) >= <S>
83         ---C++: inline
84     ;
85     
86     Intervals(myclass; C: CurveGen; T : in out Array1OfReal from TColStd; 
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     
98     IsClosed(myclass; C: CurveGen) returns Boolean
99     ---C++: inline    
100     ;
101      
102     IsPeriodic(myclass; C: CurveGen) returns Boolean
103     ---C++: inline
104     ;
105     
106     Period(myclass; C: CurveGen) returns Real
107     raises
108         DomainError from Standard -- if the curve is not periodic
109     ---C++: inline      
110     ;
111      
112     Value(myclass; C: CurveGen; U : Real) returns Pnt from gp
113          --- Purpose : Computes the point of parameter U on the curve.
114     ---C++: inline
115     ;
116     
117     D0 (myclass; C: CurveGen; U : Real; P : out Pnt from gp)
118          --- Purpose : Computes the point of parameter U on the curve.
119     ---C++: inline
120     ;
121     
122     D1 (myclass; C: CurveGen; U : Real; P : out Pnt from gp ; V : out Vec from gp)
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     
132     D2 (myclass; C: CurveGen; U : Real; P : out Pnt from gp; V1, V2 : out Vec from gp)
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
143     D3 (myclass; C: CurveGen; U : Real; P : out Pnt from gp; V1, V2, V3 : out Vec from gp)
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         
154     DN (myclass; C: CurveGen; U : Real; N : Integer)   returns Vec from gp
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
167     Resolution(myclass; C: CurveGen; R3d : Real) returns Real
168          ---Purpose :  Returns the parametric  resolution corresponding
169          --         to the real space resolution <R3d>.
170     ---C++: inline
171     ;   
172         
173     GetType(myclass; C: CurveGen) returns CurveType from GeomAbs
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
185      Line(myclass; C: CurveGen) returns Lin from gp
186      raises 
187         NoSuchObject from Standard
188     ---C++: inline
189      ;
190      
191      Circle(myclass; C: CurveGen) returns Circ from gp
192      raises 
193         NoSuchObject from Standard
194     ---C++: inline
195      ;
196      
197      Ellipse(myclass; C: CurveGen) returns Elips from gp
198      raises 
199         NoSuchObject from Standard
200     ---C++: inline
201      ;
202      
203      Hyperbola(myclass; C: CurveGen) returns  Hypr from gp
204      raises 
205         NoSuchObject from Standard
206     ---C++: inline
207      ;
208      
209      Parabola(myclass; C: CurveGen) returns Parab from gp
210      raises 
211         NoSuchObject from Standard
212     ---C++: inline
213      ;
214      
215      Bezier(myclass; C: CurveGen) returns BezierCurve from Geom
216      raises 
217         NoSuchObject from Standard
218     ---C++: inline
219      ;
220     
221      BSpline(myclass; C: CurveGen) returns BSplineCurve from Geom
222      raises 
223         NoSuchObject from Standard
224     ---C++: inline
225      ;
226
227     
228
229
230
231     NbSamples(myclass; C: CurveGen; U0,U1: Real from Standard) 
232     returns Integer from Standard;
233
234 end HCurveToolGen;
235
236