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