0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / Convert / Convert_GridPolynomialToPoles.hxx
CommitLineData
42cf5bc1 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
5//
6// This file is part of Open CASCADE Technology software library.
7//
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.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _Convert_GridPolynomialToPoles_HeaderFile
18#define _Convert_GridPolynomialToPoles_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <TColStd_HArray1OfReal.hxx>
25#include <TColStd_HArray1OfInteger.hxx>
26#include <TColgp_HArray2OfPnt.hxx>
27#include <Standard_Integer.hxx>
42cf5bc1 28#include <TColStd_HArray2OfInteger.hxx>
42cf5bc1 29
30
31//! Convert a grid of Polynomial Surfaces
32//! that are have continuity CM to an
33//! Bspline Surface that has continuity
34//! CM
35class Convert_GridPolynomialToPoles
36{
37public:
38
39 DEFINE_STANDARD_ALLOC
40
41
42 //! To only one polynomial Surface.
43 //! The Length of <PolynomialUIntervals> and <PolynomialVIntervals>
44 //! have to be 2.
45 //! This values defined the parametric domain of the Polynomial Equation.
46 //!
47 //! Coefficients :
b81b237f 48 //! The <Coefficients> have to be formatted than an "C array"
42cf5bc1 49 //! [MaxUDegree+1] [MaxVDegree+1] [3]
50 Standard_EXPORT Convert_GridPolynomialToPoles(const Standard_Integer MaxUDegree, const Standard_Integer MaxVDegree, const Handle(TColStd_HArray1OfInteger)& NumCoeff, const Handle(TColStd_HArray1OfReal)& Coefficients, const Handle(TColStd_HArray1OfReal)& PolynomialUIntervals, const Handle(TColStd_HArray1OfReal)& PolynomialVIntervals);
51
52 //! To one grid of polynomial Surface.
53 //! Warning!
54 //! Continuity in each parametric direction can be at MOST the
55 //! maximum degree of the polynomial functions.
56 //!
57 //! <TrueUIntervals>, <TrueVIntervals> :
58 //! this is the true parameterisation for the composite surface
59 //!
60 //! Coefficients :
b81b237f 61 //! The Coefficients have to be formatted than an "C array"
42cf5bc1 62 //! [NbVSurfaces] [NBUSurfaces] [MaxUDegree+1] [MaxVDegree+1] [3]
63 //! raises DomainError if <NumCoeffPerSurface> is not a
64 //! [1, NbVSurfaces*NbUSurfaces, 1,2] array.
65 //! if <Coefficients> is not a
66 Standard_EXPORT Convert_GridPolynomialToPoles(const Standard_Integer NbUSurfaces, const Standard_Integer NBVSurfaces, const Standard_Integer UContinuity, const Standard_Integer VContinuity, const Standard_Integer MaxUDegree, const Standard_Integer MaxVDegree, const Handle(TColStd_HArray2OfInteger)& NumCoeffPerSurface, const Handle(TColStd_HArray1OfReal)& Coefficients, const Handle(TColStd_HArray1OfReal)& PolynomialUIntervals, const Handle(TColStd_HArray1OfReal)& PolynomialVIntervals, const Handle(TColStd_HArray1OfReal)& TrueUIntervals, const Handle(TColStd_HArray1OfReal)& TrueVIntervals);
67
68 Standard_EXPORT void Perform (const Standard_Integer UContinuity, const Standard_Integer VContinuity, const Standard_Integer MaxUDegree, const Standard_Integer MaxVDegree, const Handle(TColStd_HArray2OfInteger)& NumCoeffPerSurface, const Handle(TColStd_HArray1OfReal)& Coefficients, const Handle(TColStd_HArray1OfReal)& PolynomialUIntervals, const Handle(TColStd_HArray1OfReal)& PolynomialVIntervals, const Handle(TColStd_HArray1OfReal)& TrueUIntervals, const Handle(TColStd_HArray1OfReal)& TrueVIntervals);
69
70 Standard_EXPORT Standard_Integer NbUPoles() const;
71
72 Standard_EXPORT Standard_Integer NbVPoles() const;
73
74 //! returns the poles of the BSpline Surface
75 Standard_EXPORT const Handle(TColgp_HArray2OfPnt)& Poles() const;
76
77 Standard_EXPORT Standard_Integer UDegree() const;
78
79 Standard_EXPORT Standard_Integer VDegree() const;
80
81 Standard_EXPORT Standard_Integer NbUKnots() const;
82
83 Standard_EXPORT Standard_Integer NbVKnots() const;
84
85 //! Knots in the U direction
86 Standard_EXPORT const Handle(TColStd_HArray1OfReal)& UKnots() const;
87
88 //! Knots in the V direction
89 Standard_EXPORT const Handle(TColStd_HArray1OfReal)& VKnots() const;
90
91 //! Multiplicities of the knots in the U direction
92 Standard_EXPORT const Handle(TColStd_HArray1OfInteger)& UMultiplicities() const;
93
94 //! Multiplicities of the knots in the V direction
95 Standard_EXPORT const Handle(TColStd_HArray1OfInteger)& VMultiplicities() const;
96
97 Standard_EXPORT Standard_Boolean IsDone() const;
98
99
100
101
102protected:
103
104
105
106
107
108private:
109
110
111 Standard_EXPORT void BuildArray (const Standard_Integer Degree, const Handle(TColStd_HArray1OfReal)& Knots, const Standard_Integer Continuty, Handle(TColStd_HArray1OfReal)& FlatKnots, Handle(TColStd_HArray1OfInteger)& Mults, Handle(TColStd_HArray1OfReal)& Parameters) const;
112
113
114 Handle(TColStd_HArray1OfReal) myUFlatKnots;
115 Handle(TColStd_HArray1OfReal) myVFlatKnots;
116 Handle(TColStd_HArray1OfReal) myUKnots;
117 Handle(TColStd_HArray1OfReal) myVKnots;
118 Handle(TColStd_HArray1OfInteger) myUMults;
119 Handle(TColStd_HArray1OfInteger) myVMults;
120 Handle(TColgp_HArray2OfPnt) myPoles;
121 Standard_Integer myUDegree;
122 Standard_Integer myVDegree;
123 Standard_Boolean myDone;
124
125
126};
127
128
129
130
131
132
133
134#endif // _Convert_GridPolynomialToPoles_HeaderFile