1 -- Created on: 1996-07-08
2 -- Created by: Philippe MANGIN
3 -- Copyright (c) 1996-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
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.
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.
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.
23 class GridPolynomialToPoles from Convert
27 uses Array1OfReal from TColStd,
28 HArray1OfReal from TColStd,
29 HArray2OfReal from TColStd,
30 HArray1OfInteger from TColStd,
31 HArray2OfInteger from TColStd,
32 HArray2OfPnt from TColgp,
36 DomainError from Standard,
41 Create(MaxUDegree : Integer ;
42 MaxVDegree : Integer ;
43 NumCoeff : HArray1OfInteger from TColStd ;
44 Coefficients : HArray1OfReal from TColStd ;
45 PolynomialUIntervals : HArray1OfReal from TColStd ;
46 PolynomialVIntervals : HArray1OfReal from TColStd )
47 returns GridPolynomialToPoles
48 ---Purpose: To only one polynomial Surface.
49 -- The Length of <PolynomialUIntervals> and <PolynomialVIntervals>
51 -- This values defined the parametric domain of the Polynomial Equation.
54 -- The <Coefficients> have to be formated than an "C array"
55 -- [MaxUDegree+1] [MaxVDegree+1] [3]
58 raises DomainError; -- if <NumCoeff> is not a [1, 2] array
59 -- if the <Coefficients> is not a [1,(MaxUDegree+1)*(MaxVDegree+1)*3]
63 Create(NbUSurfaces : Integer;
64 NBVSurfaces : Integer;
65 UContinuity : Integer ;
66 VContinuity : Integer ;
67 MaxUDegree : Integer ;
68 MaxVDegree : Integer ;
69 NumCoeffPerSurface : HArray2OfInteger from TColStd ;
70 Coefficients : HArray1OfReal from TColStd ;
71 PolynomialUIntervals : HArray1OfReal from TColStd ;
72 PolynomialVIntervals : HArray1OfReal from TColStd ;
73 TrueUIntervals : HArray1OfReal from TColStd;
74 TrueVIntervals : HArray1OfReal from TColStd)
75 returns GridPolynomialToPoles
76 ---Purpose: To one grid of polynomial Surface.
78 -- Continuity in each parametric direction can be at MOST the
79 -- maximum degree of the polynomial functions.
81 -- <TrueUIntervals>, <TrueVIntervals> :
82 -- this is the true parameterisation for the composite surface
85 -- The Coefficients have to be formated than an "C array"
86 -- [NbVSurfaces] [NBUSurfaces] [MaxUDegree+1] [MaxVDegree+1] [3]
87 -- raises DomainError if <NumCoeffPerSurface> is not a
88 -- [1, NbVSurfaces*NbUSurfaces, 1,2] array.
89 -- if <Coefficients> is not a
90 --[1, NbVSurfaces*NBUSurfaces*(MaxUDegree+1)*(MaxVDegree+1)*3] array
95 UContinuity : Integer ;
96 VContinuity : Integer ;
97 MaxUDegree : Integer ;
98 MaxVDegree : Integer ;
99 NumCoeffPerSurface : HArray2OfInteger from TColStd ;
100 Coefficients : HArray1OfReal from TColStd ;
101 PolynomialUIntervals : HArray1OfReal from TColStd ;
102 PolynomialVIntervals : HArray1OfReal from TColStd ;
103 TrueUIntervals : HArray1OfReal from TColStd ;
104 TrueVIntervals : HArray1OfReal from TColStd );
108 Knots : HArray1OfReal;
110 FlatKnots : in out HArray1OfReal;
111 Mults : in out HArray1OfInteger;
112 Parameters : in out HArray1OfReal)
116 NbUPoles(me) returns Integer ;
117 NbVPoles(me) returns Integer ;
120 ---Purpose: returns the poles of the BSpline Surface
121 ---C++: return const &
122 returns HArray2OfPnt ;
137 ---Purpose: Knots in the U direction
138 ---C++: return const &
139 returns HArray1OfReal;
142 ---Purpose: Knots in the V direction
143 ---C++: return const &
144 returns HArray1OfReal;
147 ---Purpose: Multiplicities of the knots in the U direction
148 ---C++: return const &
149 returns HArray1OfInteger;
152 ---Purpose: Multiplicities of the knots in the V direction
153 ---C++: return const &
154 returns HArray1OfInteger;
156 IsDone(me) returns Boolean ;
161 myUFlatKnots : HArray1OfReal from TColStd ;
162 myVFlatKnots : HArray1OfReal from TColStd ;
163 myUKnots : HArray1OfReal from TColStd ;
164 myVKnots : HArray1OfReal from TColStd ;
165 myUMults : HArray1OfInteger from TColStd ;
166 myVMults : HArray1OfInteger from TColStd ;
167 myPoles : HArray2OfPnt from TColgp ;
168 myUDegree : Integer ;
169 myVDegree : Integer ;
172 end GridPolynomialToPoles;