0024171: Eliminate CLang compiler warning -Wreorder
[occt.git] / src / Adaptor3d / Adaptor3d_SurfaceOfLinearExtrusion.cdl
1 -- Created on: 1993-04-21
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 SurfaceOfLinearExtrusion from Adaptor3d inherits Surface from Adaptor3d 
24
25         --- Purpose: Generalised cylinder. This surface is obtained  by sweeping a  curve in  a given
26         --  direction. The parametrization range  for the parameter U is defined 
27         --  with referenced the curve.  
28         --  The parametrization range for the parameter V is ]-infinite,+infinite[       
29         --  The  position of  the   curve gives  the origin for    the
30         --  parameter V.        
31         --  The continuity of the surface is CN in the V direction.
32
33 uses
34      Array1OfReal    from TColStd,
35      Shape           from GeomAbs,
36      SurfaceType     from GeomAbs,
37      Vec             from gp,
38      Pnt             from gp,
39      Pln             from gp,
40      Cone            from gp,
41      Cylinder        from gp,
42      Sphere          from gp,
43      Torus           from gp,
44      Ax1             from gp,
45      Dir             from gp,
46      BezierSurface   from Geom,
47      BSplineSurface  from Geom,
48      HSurface        from Adaptor3d,
49      HCurve          from Adaptor3d
50      
51 raises
52
53     OutOfRange       from Standard,
54     NoSuchObject     from Standard,
55     DomainError      from Standard
56  
57 is
58     --      
59     --      Methods specific of SurfaceOfLinearExtrusion.
60     --      
61
62     Create returns SurfaceOfLinearExtrusion from Adaptor3d;
63     
64     
65     Create(C : HCurve from Adaptor3d) 
66     returns SurfaceOfLinearExtrusion from Adaptor3d; 
67         ---Purpose: The Curve is loaded.
68     
69     Create(C : HCurve from Adaptor3d; V : Dir from gp)
70     returns SurfaceOfLinearExtrusion  from  Adaptor3d; 
71         ---Purpose: Thew Curve and the Direction are loaded.
72
73     
74     Load( me : in out ; C : HCurve from Adaptor3d)
75         ---Purpose: Changes the Curve
76     is static;
77
78     Load( me : in out ; V : Dir from gp)
79         ---Purpose: Changes the Direction
80     is static;
81
82     
83     --     
84     --       Implementation of Surface from Adaptor3d methods.
85     --       
86     
87     --
88     --     Global methods - Apply to the whole surface.
89     --     
90     
91     FirstUParameter(me) returns Real
92     is redefined static;
93
94     LastUParameter(me) returns Real
95     is redefined static;
96     
97     FirstVParameter(me) returns Real
98     is redefined static;
99
100     LastVParameter(me) returns Real
101     is redefined static;
102     
103     UContinuity(me) returns Shape from GeomAbs
104     is redefined static;
105     
106     VContinuity(me) returns Shape from GeomAbs
107         ---Purpose: Return CN.
108     is redefined static;
109     
110     NbUIntervals(me; S : Shape from GeomAbs) returns Integer
111         ---Purpose: Returns the number of U intervals for  continuity
112         --          <S>. May be one if UContinuity(me) >= <S>
113     is redefined static;
114     
115     NbVIntervals(me; S : Shape from GeomAbs) returns Integer
116         ---Purpose: Returns the number of V intervals for  continuity
117         --          <S>. May be one if VContinuity(me) >= <S>
118     is redefined static;
119     
120     UIntervals(me; T : in out Array1OfReal from TColStd; 
121                 S : Shape from GeomAbs )
122         ---Purpose: Returns the  intervals with the requested continuity
123         --          in the U direction.
124
125     raises
126         OutOfRange from Standard -- if Index < 1 or Index > NbIntervals
127     is redefined static;
128
129     VIntervals(me; T : in out Array1OfReal from TColStd; 
130                 S : Shape from GeomAbs ) 
131         ---Purpose: Returns the  intervals with the requested continuity
132         --          in the V direction.
133     raises
134         OutOfRange from Standard -- if Index < 1 or Index > NbIntervals
135     is redefined static;
136
137     UTrim(me; First, Last, Tol : Real) returns HSurface from Adaptor3d
138         ---Purpose: Returns    a  surface trimmed in the U direction
139         --           equivalent   of  <me>  between
140         --          parameters <First>  and <Last>. <Tol>  is used  to
141         --          test for 3d points confusion.
142     raises
143         OutOfRange from Standard
144         ---Purpose: If <First> >= <Last> 
145     is redefined static ;
146     
147     VTrim(me; First, Last, Tol : Real) returns HSurface from Adaptor3d
148         ---Purpose: Returns    a  surface trimmed in the V direction  between
149         --          parameters <First>  and <Last>. <Tol>  is used  to
150         --          test for 3d points confusion.
151     raises
152         OutOfRange from Standard
153         ---Purpose: If <First> >= <Last> 
154     is redefined static ;
155     
156     IsUClosed(me) returns Boolean
157     is redefined static;
158      
159     IsVClosed(me) returns Boolean
160     is redefined static;
161      
162     IsUPeriodic(me) returns Boolean
163     is redefined static;
164     
165     UPeriod(me) returns Real
166     raises
167         DomainError from Standard -- if the curve is not periodic
168     is redefined static;
169      
170     IsVPeriodic(me) returns Boolean
171     is redefined static;
172     
173     VPeriod(me) returns Real
174     raises
175         DomainError from Standard -- if the curve is not periodic
176     is redefined static;
177      
178     Value (me; U, V : Real)  returns Pnt from gp
179         --- Purpose : Computes the point of parameters U,V on the surface.
180     is redefined static;
181
182     D0 (me; U, V : Real; P : out Pnt from gp)
183         --- Purpose : Computes the point of parameters U,V on the surface.
184     is redefined static;
185
186     D1 (me; U, V : Real; P : out Pnt from gp; D1U, D1V : out Vec from gp)
187         --- Purpose : Computes the point  and the first derivatives on
188         --  the surface.
189     raises DomainError from Standard
190         --- Purpose   : Raised   if  the continuity  of   the  current
191         --  intervals is not C1.
192     is redefined static;
193
194     D2 (me; U, V : Real; P : out Pnt from gp; D1U, D1V, D2U, D2V, D2UV : out Vec from gp)
195         --- Purpose  :  Computes   the point,  the  first  and  second
196         --  derivatives on the surface.
197     raises DomainError from Standard
198         --- Purpose   : Raised  if   the   continuity   of the current
199         --  intervals is not C2.
200     is redefined static;
201
202     D3 (me; U, V : Real; P : out Pnt from gp; 
203             D1U, D1V, D2U, D2V, D2UV, D3U, D3V, D3UUV, D3UVV : out Vec from gp)
204         --- Purpose : Computes the point,  the first, second and third
205         --  derivatives on the surface.
206     raises DomainError from Standard
207         --- Purpose   : Raised  if   the   continuity   of the current
208         --  intervals is not C3.
209     is redefined static;
210
211     DN (me; U, V : Real; Nu, Nv : Integer)   returns Vec from gp
212         --- Purpose :  Computes the derivative of order Nu in the direction U and Nv
213         --  in the direction V at the point P(U, V).
214     raises DomainError from Standard,
215         --- Purpose : Raised if the current U  interval is not not CNu
216         --  and the current V interval is not CNv.
217            OutOfRange from Standard
218         --- Purpose : Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0.
219     is redefined static;
220   
221     UResolution(me; R3d : Real ) returns Real
222          ---Purpose :  Returns the parametric U  resolution corresponding
223          --         to the real space resolution <R3d>.
224     is redefined static;
225   
226     VResolution(me; R3d : Real ) returns Real
227          ---Purpose :  Returns the parametric V  resolution corresponding
228          --         to the real space resolution <R3d>.
229     is redefined static;
230   
231     GetType(me) returns SurfaceType from GeomAbs
232         ---Purpose: Returns the type of the surface : Plane, Cylinder,
233         --          Cone,      Sphere,        Torus,    BezierSurface,
234         --          BSplineSurface,               SurfaceOfRevolution,
235         --          SurfaceOfExtrusion, OtherSurface
236     is redefined static;
237     
238     --
239     --     The following methods must  be called when GetType returned
240     --     the corresponding type.
241     --     
242
243     Plane(me) returns Pln from gp
244       raises NoSuchObject from Standard
245     is redefined static;
246     
247     Cylinder(me) returns Cylinder from gp
248       raises NoSuchObject from Standard
249     is redefined static;
250     
251     Cone(me) returns Cone from gp
252       raises NoSuchObject from Standard
253     is redefined static;
254     
255     Sphere(me) returns Sphere from gp
256       raises NoSuchObject from Standard
257     is redefined static;
258     
259     Torus(me) returns Torus from gp
260       raises NoSuchObject from Standard
261     is redefined static;
262
263
264     UDegree(me) returns Integer
265      raises NoSuchObject from Standard
266     is redefined static;
267
268     NbUPoles(me) returns Integer
269      raises NoSuchObject from Standard
270     is redefined static;
271
272     VDegree(me) returns Integer
273      raises NoSuchObject from Standard
274     is redefined static;
275
276     NbVPoles(me) returns Integer
277      raises NoSuchObject from Standard
278     is redefined static;
279     
280     
281     NbUKnots(me) returns Integer
282     raises 
283        NoSuchObject from Standard
284     is redefined static;
285     
286     
287     NbVKnots(me) returns Integer
288     raises 
289        NoSuchObject from Standard
290     is redefined static;
291     
292     
293     IsURational(me) returns Boolean
294     raises
295         NoSuchObject from Standard
296     is redefined static;
297     
298     IsVRational(me) returns Boolean
299     raises
300         NoSuchObject from Standard
301     is redefined static;
302     
303     
304
305     Bezier(me) returns BezierSurface from Geom
306     raises 
307         NoSuchObject from Standard
308     is redefined static;
309     
310     BSpline(me) returns BSplineSurface from Geom
311     raises 
312         NoSuchObject from Standard
313     is redefined static;
314     
315     AxeOfRevolution(me) returns Ax1 from gp
316     raises 
317        NoSuchObject from Standard -- only for SurfaceOfRevolution
318     is redefined static;
319
320     Direction(me) returns Dir from gp
321     raises 
322        NoSuchObject from Standard -- only for SurfaceOfExtrusion
323     is redefined static;
324
325     BasisCurve(me) returns HCurve from Adaptor3d
326     raises 
327        NoSuchObject from Standard 
328        -- Only for SurfaceOfExtrusion and SurfaceOfRevolution
329     is redefined static;
330
331 fields
332
333     myBasisCurve  : HCurve from Adaptor3d;
334     myDirection   : Dir from gp;
335
336
337
338 end SurfaceOfLinearExtrusion;