1 -- File: ElementarySurfaceToBSplineSurface.cdl
2 -- Created: Thu Oct 10 12:04:22 1991
3 -- Author: Jean Claude VAUTHIER
4 ---Copyright: Matra Datavision 1991, 1992
10 deferred class ElementarySurfaceToBSplineSurface from Convert
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.
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.
40 -- Convert, ElementarySurface, BSplineSurface.
43 uses Array1OfInteger from TColStd,
44 Array1OfReal from TColStd,
45 Array2OfReal from TColStd,
46 Array2OfPnt from TColgp,
50 raises OutOfRange from Standard
54 UDegree (me) returns Integer is static;
57 VDegree (me) returns Integer is static;
59 ---Purpose: Returns the degree for the u or v parametric direction of
60 -- the BSpline surface whose data is computed in this framework.
62 NbUPoles (me) returns Integer is static;
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.
69 NbUKnots (me) returns Integer is static;
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 .
76 IsUPeriodic(me) returns Boolean is static;
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.
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.
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.
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.
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.
111 UKnot (me; UIndex : Integer) returns Real
112 --- Purpose : Returns the U-knot of range UIndex.
114 --- Purpose : Raised if UIndex < 1 or UIndex > NbUKnots.
118 VKnot (me; UIndex : Integer) returns Real
119 --- Purpose : Returns the V-knot of range VIndex.
121 --- Purpose : Raised if VIndex < 1 or VIndex > NbVKnots.
125 UMultiplicity (me; UIndex : Integer) returns Integer
126 --- Purpose : Returns the multiplicity of the U-knot of range UIndex.
128 --- Purpose : Raised if UIndex < 1 or UIndex > NbUKnots.
132 VMultiplicity (me; VIndex : Integer) returns Integer
133 --- Purpose : Returns the multiplicity of the V-knot of range VIndex.
135 --- Purpose : Raised if VIndex < 1 or VIndex > NbVKnots.
139 Initialize (NumberOfUPoles, NumberOfVPoles, NumberOfUKnots,
140 NumberOfVKnots, UDegree, VDegree : Integer);
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;
161 end ElementarySurfaceToBSplineSurface;