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