1 -- Created on: 1996-07-08
2 -- Created by: Philippe MANGIN
3 -- Copyright (c) 1996-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class GridPolynomialToPoles from Convert
18 ---Purpose: Convert a grid of Polynomial Surfaces
19 -- that are have continuity CM to an
20 -- Bspline Surface that has continuity
23 uses Array1OfReal from TColStd,
24 HArray1OfReal from TColStd,
25 HArray2OfReal from TColStd,
26 HArray1OfInteger from TColStd,
27 HArray2OfInteger from TColStd,
28 HArray2OfPnt from TColgp,
32 DomainError from Standard,
37 Create(MaxUDegree : Integer ;
38 MaxVDegree : Integer ;
39 NumCoeff : HArray1OfInteger from TColStd ;
40 Coefficients : HArray1OfReal from TColStd ;
41 PolynomialUIntervals : HArray1OfReal from TColStd ;
42 PolynomialVIntervals : HArray1OfReal from TColStd )
43 returns GridPolynomialToPoles
44 ---Purpose: To only one polynomial Surface.
45 -- The Length of <PolynomialUIntervals> and <PolynomialVIntervals>
47 -- This values defined the parametric domain of the Polynomial Equation.
50 -- The <Coefficients> have to be formated than an "C array"
51 -- [MaxUDegree+1] [MaxVDegree+1] [3]
54 raises DomainError; -- if <NumCoeff> is not a [1, 2] array
55 -- if the <Coefficients> is not a [1,(MaxUDegree+1)*(MaxVDegree+1)*3]
59 Create(NbUSurfaces : Integer;
60 NBVSurfaces : Integer;
61 UContinuity : Integer ;
62 VContinuity : Integer ;
63 MaxUDegree : Integer ;
64 MaxVDegree : Integer ;
65 NumCoeffPerSurface : HArray2OfInteger from TColStd ;
66 Coefficients : HArray1OfReal from TColStd ;
67 PolynomialUIntervals : HArray1OfReal from TColStd ;
68 PolynomialVIntervals : HArray1OfReal from TColStd ;
69 TrueUIntervals : HArray1OfReal from TColStd;
70 TrueVIntervals : HArray1OfReal from TColStd)
71 returns GridPolynomialToPoles
72 ---Purpose: To one grid of polynomial Surface.
74 -- Continuity in each parametric direction can be at MOST the
75 -- maximum degree of the polynomial functions.
77 -- <TrueUIntervals>, <TrueVIntervals> :
78 -- this is the true parameterisation for the composite surface
81 -- The Coefficients have to be formated than an "C array"
82 -- [NbVSurfaces] [NBUSurfaces] [MaxUDegree+1] [MaxVDegree+1] [3]
83 -- raises DomainError if <NumCoeffPerSurface> is not a
84 -- [1, NbVSurfaces*NbUSurfaces, 1,2] array.
85 -- if <Coefficients> is not a
86 --[1, NbVSurfaces*NBUSurfaces*(MaxUDegree+1)*(MaxVDegree+1)*3] array
91 UContinuity : Integer ;
92 VContinuity : Integer ;
93 MaxUDegree : Integer ;
94 MaxVDegree : Integer ;
95 NumCoeffPerSurface : HArray2OfInteger from TColStd ;
96 Coefficients : HArray1OfReal from TColStd ;
97 PolynomialUIntervals : HArray1OfReal from TColStd ;
98 PolynomialVIntervals : HArray1OfReal from TColStd ;
99 TrueUIntervals : HArray1OfReal from TColStd ;
100 TrueVIntervals : HArray1OfReal from TColStd );
104 Knots : HArray1OfReal;
106 FlatKnots : in out HArray1OfReal;
107 Mults : in out HArray1OfInteger;
108 Parameters : in out HArray1OfReal)
112 NbUPoles(me) returns Integer ;
113 NbVPoles(me) returns Integer ;
116 ---Purpose: returns the poles of the BSpline Surface
117 ---C++: return const &
118 returns HArray2OfPnt ;
133 ---Purpose: Knots in the U direction
134 ---C++: return const &
135 returns HArray1OfReal;
138 ---Purpose: Knots in the V direction
139 ---C++: return const &
140 returns HArray1OfReal;
143 ---Purpose: Multiplicities of the knots in the U direction
144 ---C++: return const &
145 returns HArray1OfInteger;
148 ---Purpose: Multiplicities of the knots in the V direction
149 ---C++: return const &
150 returns HArray1OfInteger;
152 IsDone(me) returns Boolean ;
157 myUFlatKnots : HArray1OfReal from TColStd ;
158 myVFlatKnots : HArray1OfReal from TColStd ;
159 myUKnots : HArray1OfReal from TColStd ;
160 myVKnots : HArray1OfReal from TColStd ;
161 myUMults : HArray1OfInteger from TColStd ;
162 myVMults : HArray1OfInteger from TColStd ;
163 myPoles : HArray2OfPnt from TColgp ;
164 myUDegree : Integer ;
165 myVDegree : Integer ;
168 end GridPolynomialToPoles;