0024059: Eliminate compiler warning C4701 in MSVC++ with warning level 4
[occt.git] / src / Convert / Convert_ElementarySurfaceToBSplineSurface.cdl
1 -- Created on: 1991-10-10
2 -- Created by: Jean Claude VAUTHIER
3 -- Copyright (c) 1991-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
24
25
26 deferred class ElementarySurfaceToBSplineSurface   from Convert 
27
28         --- Purpose :Root class for algorithms which convert an elementary
29         -- surface (cylinder, cone, sphere or torus) into a BSpline
30         -- surface (CylinderToBSplineSurface, ConeToBSplineSurface,
31         --  SphereToBSplineSurface, TorusToBSplineSurface).
32         -- These algorithms all work on elementary surfaces from
33         -- the gp package and compute all the data needed to
34         -- construct a BSpline surface equivalent to the cylinder,
35         -- cone, sphere or torus. This data consists of the following:
36         -- -   degrees in the u and v parametric directions,
37         -- -   periodic characteristics in the u and v parametric directions,
38         -- -   a poles table with associated weights,
39         -- -   a knots table (for the u and v parametric directions)
40         --  with associated multiplicities.
41         -- The abstract class
42         -- ElementarySurfaceToBSplineSurface provides a
43         -- framework for storing and consulting this computed data.
44         -- This data may then be used to construct a
45         -- Geom_BSplineSurface surface, for example.
46         --  All those classes define algorithmes to convert an
47         --  ElementarySurface into a B-spline surface.
48         --  This abstract class implements the methods to get 
49         --  the geometric representation of the B-spline surface. 
50         --  The B-spline representation is computed at the creation 
51         --  time in the sub classes.
52         --  The B-spline surface is defined with its degree in the 
53         --  parametric U and V directions, its control points (Poles), 
54         --  its weights, its knots and their multiplicity.
55         --  KeyWords :
56         --  Convert, ElementarySurface, BSplineSurface.
57
58
59 uses Array1OfInteger from TColStd,
60      Array1OfReal    from TColStd,
61      Array2OfReal    from TColStd,
62      Array2OfPnt     from TColgp,
63      Pnt             from gp
64      
65
66 raises OutOfRange from Standard
67
68 is
69
70   UDegree (me)    returns Integer   is static;
71
72
73   VDegree (me)    returns Integer   is static;
74
75         ---Purpose: Returns the degree for the u or v parametric direction of
76         -- the BSpline surface whose data is computed in this framework.
77         
78   NbUPoles (me)   returns Integer   is static;
79
80
81   NbVPoles (me)   returns Integer   is static;
82         ---Purpose: Returns the number of poles for the u or v parametric
83         -- direction of the BSpline surface whose data is computed in this framework.
84         
85   NbUKnots (me)   returns Integer   is static;
86
87
88   NbVKnots (me)   returns Integer   is static;
89         ---Purpose: Returns the number of knots for the u or v parametric
90         -- direction of the BSpline surface whose data is computed in this framework .
91
92   IsUPeriodic(me) returns Boolean   is static;
93   
94   
95   IsVPeriodic(me) returns Boolean   is static;
96         ---Purpose: Returns true if the BSpline surface whose data is computed
97         -- in this framework is periodic in the u or v parametric direction.
98
99   Pole (me; UIndex, VIndex : Integer)    returns Pnt
100         --- Purpose :  Returns the pole of index (UIndex,VIndex) to the poles
101         -- table of the BSpline surface whose data is computed in this framework.
102         -- Exceptions
103         -- Standard_OutOfRange if, for the BSpline surface whose
104         -- data is computed in this framework:
105         -- -   UIndex is outside the bounds of the poles table in the u
106         --  parametric direction, or
107         -- -   VIndex is outside the bounds of the poles table in the v
108         --  parametric direction.
109      raises OutOfRange
110      is static;
111
112
113   Weight (me; UIndex, VIndex : Integer)   returns Real
114         --- Purpose :  Returns the weight of the pole of index (UIndex,VIndex) to
115         -- the poles table of the BSpline surface whose data is computed in this framework.
116         -- Exceptions
117         -- Standard_OutOfRange if, for the BSpline surface whose
118         -- data is computed in this framework:
119         -- -   UIndex is outside the bounds of the poles table in the u
120         --  parametric direction, or
121         -- -   VIndex is outside the bounds of the poles table in the v
122         --  parametric direction.
123      raises OutOfRange     
124      is static;
125
126
127   UKnot (me; UIndex : Integer)    returns Real
128         --- Purpose :  Returns the U-knot of range UIndex.
129      raises OutOfRange
130         --- Purpose : Raised if UIndex < 1 or UIndex > NbUKnots.
131      is static;
132
133
134   VKnot (me; UIndex : Integer)   returns Real
135         --- Purpose : Returns the V-knot of range VIndex.
136      raises OutOfRange
137         --- Purpose : Raised if VIndex < 1 or VIndex > NbVKnots.
138      is static;
139
140
141   UMultiplicity (me; UIndex : Integer)   returns Integer
142         --- Purpose : Returns the multiplicity of the U-knot of range UIndex.
143      raises OutOfRange
144         --- Purpose : Raised if UIndex < 1 or UIndex > NbUKnots.
145      is static;
146
147
148   VMultiplicity (me; VIndex : Integer)   returns Integer
149         --- Purpose : Returns the multiplicity of the V-knot of range VIndex.
150      raises OutOfRange
151         --- Purpose : Raised if VIndex < 1 or VIndex > NbVKnots.
152      is static;
153
154
155   Initialize (NumberOfUPoles, NumberOfVPoles, NumberOfUKnots,
156               NumberOfVKnots, UDegree, VDegree : Integer);
157
158
159 fields
160
161   poles       : Array2OfPnt     is protected;
162   weights     : Array2OfReal    is protected;
163   uknots      : Array1OfReal    is protected;
164   umults      : Array1OfInteger is protected;
165   vknots      : Array1OfReal    is protected;
166   vmults      : Array1OfInteger is protected;
167   udegree     : Integer         is protected;
168   vdegree     : Integer         is protected;
169   nbUPoles    : Integer         is protected;
170   nbVPoles    : Integer         is protected;
171   nbUKnots    : Integer         is protected;
172   nbVKnots    : Integer         is protected;
173   isuperiodic : Boolean         is protected;
174   isvperiodic : Boolean         is protected;
175
176
177 end ElementarySurfaceToBSplineSurface;
178
179