0024171: Eliminate CLang compiler warning -Wreorder
[occt.git] / src / ProjLib / ProjLib_ProjectedCurve.cdl
1 -- Created on: 1993-08-25
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 class ProjectedCurve from ProjLib inherits Curve2d from Adaptor2d 
24     
25
26
27 uses
28
29      Projector       from ProjLib,
30      Shape           from GeomAbs,
31      CurveType       from GeomAbs,
32      Vec2d           from gp,
33      Pnt2d           from gp,
34      Circ2d          from gp,
35      Elips2d         from gp,
36      Hypr2d          from gp,
37      Parab2d         from gp,
38      Lin2d           from gp,
39      HCurve          from Adaptor3d,
40      HCurve2d        from Adaptor2d,
41      HSurface        from Adaptor3d,
42      BezierCurve     from Geom2d,
43      BSplineCurve    from Geom2d,
44      Array1OfReal    from TColStd
45      
46      
47 raises
48     
49     OutOfRange          from Standard,
50     NoSuchObject        from Standard,
51     DomainError         from Standard,
52     NotImplemented      from Standard
53     
54  
55 is
56
57     Create returns ProjectedCurve;
58     
59     Create(S : HSurface from Adaptor3d) 
60     returns ProjectedCurve;
61     
62     Create(S : HSurface from Adaptor3d; 
63            C : HCurve   from Adaptor3d) 
64     returns ProjectedCurve; 
65       
66     Create(S   : HSurface from Adaptor3d; 
67            C   : HCurve   from Adaptor3d;
68            Tol : Real     from Standard) 
69     returns ProjectedCurve; 
70       
71     
72     Load(me : in out ; Tolerance : Real) 
73     ---Purpose: Changes the tolerance used to project
74     --          the curve on the surface
75     is static;
76     
77     Load(me : in out; S : HSurface from Adaptor3d)
78         ---Purpose: Changes the Surface.
79     is static;
80     
81     Load(me : in out; C : HCurve from Adaptor3d)
82         ---Purpose: Changes the Curve.
83     is static;
84     
85     GetSurface(me) returns HSurface from Adaptor3d
86         ---C++: return const &
87     is static;
88
89     GetCurve(me) returns  HCurve from Adaptor3d 
90         ---C++: return const &
91     is static;
92     
93     GetTolerance(me) returns Real from Standard
94         ---Purpose: returns the tolerance reached if an approximation
95         --          is Done.
96     is static;
97
98     --
99     --     Global methods - Apply to the whole curve.
100     --     
101     
102     FirstParameter(me) returns Real
103     is redefined static;
104
105     LastParameter(me) returns Real
106     is redefined static;
107     
108     Continuity(me) returns Shape from GeomAbs
109     is redefined static;
110     
111     NbIntervals(me ; S : Shape from GeomAbs) returns Integer
112         ---Purpose: If necessary,  breaks the  curve in  intervals  of
113         --          continuity  <S>.    And  returns   the number   of
114         --          intervals.
115     is redefined static;
116     
117     Intervals(me; T : in out Array1OfReal from TColStd; 
118                   S : Shape from GeomAbs)
119         ---Purpose: Stores in <T> the  parameters bounding the intervals
120         --          of continuity <S>.
121         --          
122         --          The array must provide  enough room to  accomodate
123         --          for the parameters. i.e. T.Length() > NbIntervals()
124     raises
125         OutOfRange from Standard 
126     is redefined static;
127     
128     Trim(me; First, Last, Tol : Real) returns HCurve2d from Adaptor2d
129         ---Purpose: Returns    a  curve equivalent   of  <me>  between
130         --          parameters <First>  and <Last>. <Tol>  is used  to
131         --          test for 3d points confusion.
132     raises
133         OutOfRange from Standard
134         ---Purpose: If <First> >= <Last> 
135     is redefined static;
136     
137     IsClosed(me) returns Boolean
138     is redefined static;
139      
140     IsPeriodic(me) returns Boolean
141     is redefined static;
142     
143     Period(me) returns Real
144     raises
145         DomainError from Standard -- if the curve is not periodic
146     is redefined static;
147      
148     Value(me; U : Real) returns Pnt2d from gp
149          --- Purpose : Computes the point of parameter U on the curve.
150     is redefined static;
151     
152     D0 (me; U : Real; P : out Pnt2d from gp)
153          --- Purpose : Computes the point of parameter U on the curve.
154     is redefined static;
155     
156     D1 (me; U : Real; P : out Pnt2d from gp ; V : out Vec2d from gp)
157          --- Purpose : Computes the point of parameter U on the curve with its
158          --  first derivative.
159      raises 
160         DomainError from Standard
161         --- Purpose : Raised if the continuity of the current interval
162         --  is not C1.
163     is redefined static;
164     
165     D2 (me; U : Real; P : out Pnt2d from gp; V1, V2 : out Vec2d from gp)
166         --- Purpose :
167         --  Returns the point P of parameter U, the first and second
168         --  derivatives V1 and V2.
169      raises 
170         DomainError from Standard
171         --- Purpose : Raised if the continuity of the current interval
172         --  is not C2.
173      is redefined static;
174
175     D3 (me; U : Real; P : out Pnt2d from gp; V1, V2, V3 : out Vec2d from gp)
176         --- Purpose :
177         --  Returns the point P of parameter U, the first, the second 
178         --  and the third derivative.
179      raises 
180         DomainError from Standard
181         --- Purpose : Raised if the continuity of the current interval
182         --  is not C3.
183      is redefined static;
184         
185     DN (me; U : Real; N : Integer)   returns Vec2d from gp
186         --- Purpose :
187         --  The returned vector gives the value of the derivative for the 
188         --  order of derivation N.
189      raises  
190         DomainError from Standard,
191         --- Purpose : Raised if the continuity of the current interval
192         --  is not CN.
193         OutOfRange from Standard
194         --- Purpose : Raised if N < 1.            
195      is redefined static;
196
197     Resolution(me; R3d : Real) returns Real
198          ---Purpose :  Returns the parametric  resolution corresponding
199          --         to the real space resolution <R3d>.
200     is redefined static;   
201         
202     GetType(me) returns CurveType from GeomAbs
203         ---Purpose: Returns  the  type of the   curve  in the  current
204         --          interval :   Line,   Circle,   Ellipse, Hyperbola,
205         --          Parabola, BezierCurve, BSplineCurve, OtherCurve.
206     is redefined static;
207
208     --
209     --     The following methods must  be called when GetType returned
210     --     the corresponding type.
211     --     
212
213      Line(me) returns Lin2d from gp
214      raises 
215         NoSuchObject from Standard
216      is redefined static;
217      
218      Circle(me) returns Circ2d from gp
219      raises 
220         NoSuchObject from Standard
221      is redefined static;
222      
223      Ellipse(me) returns Elips2d from gp
224      raises 
225         NoSuchObject from Standard
226      is redefined static;
227      
228      Hyperbola(me) returns  Hypr2d from gp
229      raises 
230         NoSuchObject from Standard
231      is redefined static;
232      
233      Parabola(me) returns Parab2d from gp
234      raises 
235         NoSuchObject from Standard
236      is redefined static;
237      
238      Degree(me) returns Integer
239      raises 
240         NoSuchObject from Standard
241      is redefined static;
242      
243      IsRational(me) returns Boolean
244      raises 
245         NoSuchObject from Standard
246      is redefined static;
247      
248      NbPoles(me) returns Integer
249      raises 
250         NoSuchObject from Standard
251      is redefined static;
252      
253     
254      NbKnots(me) returns Integer
255      raises 
256         NoSuchObject from Standard
257      is redefined static;
258      
259      
260
261
262      Bezier(me) returns BezierCurve from Geom2d
263      raises 
264         NoSuchObject from Standard
265      is redefined static;
266      ---Purpose:  Warning ! This will  NOT make a copy  of the -- Bezier Curve -
267      --         If you want to modify -- the Curve  please make a copy
268      --         yourself --  Also it will  NOT trim the surface  to --
269      --         myFirst/Last.
270     
271      BSpline(me) returns BSplineCurve from Geom2d
272      raises 
273         NoSuchObject from Standard
274      is redefined static;
275       ---Purpose:  Warning ! This will NOT make a copy of the BSpline Curve - If
276       --         you want to  modify the   Curve  please make a   copy
277       --         yourself Also it   will  NOT  trim   the surface   to
278       --         myFirst/Last.
279      
280     
281 fields
282
283      myTolerance : Real ;
284      mySurface   : HSurface   from Adaptor3d ;
285      myCurve     : HCurve     from Adaptor3d ;
286      myResult    : Projector  from ProjLib ;
287      
288 end ProjectedCurve;