1 // Created on: 1993-01-09
2 // Created by: CKY / Contract Toubro-Larsen ( Kiran )
3 // Copyright (c) 1993-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 #ifndef _IGESGeom_SplineSurface_HeaderFile
18 #define _IGESGeom_SplineSurface_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Standard_Integer.hxx>
24 #include <TColStd_HArray1OfReal.hxx>
25 #include <IGESBasic_HArray2OfHArray1OfReal.hxx>
26 #include <IGESData_IGESEntity.hxx>
27 #include <Standard_Real.hxx>
28 class Standard_DimensionMismatch;
29 class Standard_OutOfRange;
32 class IGESGeom_SplineSurface;
33 DEFINE_STANDARD_HANDLE(IGESGeom_SplineSurface, IGESData_IGESEntity)
35 //! defines IGESSplineSurface, Type <114> Form <0>
36 //! in package IGESGeom
37 //! A parametric spline surface is a grid of polynomial
38 //! patches. Patch could be of the type Linear, Quadratic,
39 //! Cubic, Wilson-Fowler, Modified Wilson-Fowler, B-Spline
40 //! The M * N grid of patches is defined by the 'u' break
41 //! points TU(1), TU(2), ..., TU(M+1) and the 'v' break
42 //! points TV(1), TV(2), TV(3) ..., TV(N+1).
43 class IGESGeom_SplineSurface : public IGESData_IGESEntity
49 Standard_EXPORT IGESGeom_SplineSurface();
51 //! This method is used to set the fields of the class
53 //! - aBoundaryType : Type of Spline boundary
58 //! 5 = Modified Wilson-Fowler
60 //! - aPatchType : Type of patch contained in the grid
61 //! 1 = Cartesian Product
63 //! - allUBreakpoints : u values of grid lines
64 //! - allVBreakpoints : v values of grid lines
65 //! - allXCoeffs : X coefficients of M x N patches
66 //! - allYCoeffs : Y coefficients of M x N patches
67 //! - allZCoeffs : Z coefficients of M x N patches
68 //! raises exception if allXCoeffs, allYCoeffs & allZCoeffs are not
70 //! or if the size of each element of the double array is not 16
71 Standard_EXPORT void Init (const Standard_Integer aBoundaryType, const Standard_Integer aPatchType, const Handle(TColStd_HArray1OfReal)& allUBreakpoints, const Handle(TColStd_HArray1OfReal)& allVBreakpoints, const Handle(IGESBasic_HArray2OfHArray1OfReal)& allXCoeffs, const Handle(IGESBasic_HArray2OfHArray1OfReal)& allYCoeffs, const Handle(IGESBasic_HArray2OfHArray1OfReal)& allZCoeffs);
73 //! returns the number of U segments
74 Standard_EXPORT Standard_Integer NbUSegments() const;
76 //! returns the number of V segments
77 Standard_EXPORT Standard_Integer NbVSegments() const;
79 //! returns boundary type
80 Standard_EXPORT Standard_Integer BoundaryType() const;
82 //! returns patch type
83 Standard_EXPORT Standard_Integer PatchType() const;
85 //! returns U break point of the grid line referred to by anIndex
86 //! raises exception if anIndex <= 0 or anIndex > NbUSegments() + 1
87 Standard_EXPORT Standard_Real UBreakPoint (const Standard_Integer anIndex) const;
89 //! returns V break point of the grid line referred to by anIndex
90 //! raises exception if anIndex <= 0 or anIndex > NbVSegments() + 1
91 Standard_EXPORT Standard_Real VBreakPoint (const Standard_Integer anIndex) const;
93 //! returns X polynomial of patch referred to by anIndex1, anIndex2
94 //! raises exception if anIndex1 <= 0 or anIndex1 > NbUSegments()
95 //! or anIndex2 <= 0 or anIndex2 > NbVSegments()
96 Standard_EXPORT Handle(TColStd_HArray1OfReal) XPolynomial (const Standard_Integer anIndex1, const Standard_Integer anIndex2) const;
98 //! returns Y polynomial of patch referred to by anIndex1, anIndex2
99 //! raises exception if anIndex1 <= 0 or anIndex1 > NbUSegments()
100 //! or anIndex2 <= 0 or anIndex2 > NbVSegments()
101 Standard_EXPORT Handle(TColStd_HArray1OfReal) YPolynomial (const Standard_Integer anIndex1, const Standard_Integer anIndex2) const;
103 //! returns Z polynomial of patch referred to by anIndex1, anIndex2
104 //! raises exception if anIndex1 <= 0 or anIndex1 > NbUSegments()
105 //! or anIndex2 <= 0 or anIndex2 > NbVSegments()
106 Standard_EXPORT Handle(TColStd_HArray1OfReal) ZPolynomial (const Standard_Integer anIndex1, const Standard_Integer anIndex2) const;
108 //! returns in one all the polynomial values "in bulk"
109 //! usefull for massive treatements
110 Standard_EXPORT void Polynomials (Handle(IGESBasic_HArray2OfHArray1OfReal)& XCoef, Handle(IGESBasic_HArray2OfHArray1OfReal)& YCoef, Handle(IGESBasic_HArray2OfHArray1OfReal)& ZCoef) const;
115 DEFINE_STANDARD_RTTIEXT(IGESGeom_SplineSurface,IGESData_IGESEntity)
125 Standard_Integer theBoundaryType;
126 Standard_Integer thePatchType;
127 Handle(TColStd_HArray1OfReal) theUBreakPoints;
128 Handle(TColStd_HArray1OfReal) theVBreakPoints;
129 Handle(IGESBasic_HArray2OfHArray1OfReal) theXCoeffs;
130 Handle(IGESBasic_HArray2OfHArray1OfReal) theYCoeffs;
131 Handle(IGESBasic_HArray2OfHArray1OfReal) theZCoeffs;
142 #endif // _IGESGeom_SplineSurface_HeaderFile