42cf5bc1 |
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 |
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 _IGESGeom_SplineSurface_HeaderFile |
18 | #define _IGESGeom_SplineSurface_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
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; |
30 | |
31 | |
32 | class IGESGeom_SplineSurface; |
33 | DEFINE_STANDARD_HANDLE(IGESGeom_SplineSurface, IGESData_IGESEntity) |
34 | |
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 |
44 | { |
45 | |
46 | public: |
47 | |
48 | |
49 | Standard_EXPORT IGESGeom_SplineSurface(); |
50 | |
51 | //! This method is used to set the fields of the class |
52 | //! SplineSurface |
53 | //! - aBoundaryType : Type of Spline boundary |
54 | //! 1 = Linear |
55 | //! 2 = Quadratic |
56 | //! 3 = Cubic |
57 | //! 4 = Wilson-Fowler |
58 | //! 5 = Modified Wilson-Fowler |
59 | //! 6 = B-spline |
60 | //! - aPatchType : Type of patch contained in the grid |
61 | //! 1 = Cartesian Product |
62 | //! 0 = Unspecified |
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 |
69 | //! of the same size. |
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); |
72 | |
73 | //! returns the number of U segments |
74 | Standard_EXPORT Standard_Integer NbUSegments() const; |
75 | |
76 | //! returns the number of V segments |
77 | Standard_EXPORT Standard_Integer NbVSegments() const; |
78 | |
79 | //! returns boundary type |
80 | Standard_EXPORT Standard_Integer BoundaryType() const; |
81 | |
82 | //! returns patch type |
83 | Standard_EXPORT Standard_Integer PatchType() const; |
84 | |
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; |
88 | |
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; |
92 | |
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; |
97 | |
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; |
102 | |
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; |
107 | |
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; |
111 | |
112 | |
113 | |
114 | |
92efcf78 |
115 | DEFINE_STANDARD_RTTIEXT(IGESGeom_SplineSurface,IGESData_IGESEntity) |
42cf5bc1 |
116 | |
117 | protected: |
118 | |
119 | |
120 | |
121 | |
122 | private: |
123 | |
124 | |
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; |
132 | |
133 | |
134 | }; |
135 | |
136 | |
137 | |
138 | |
139 | |
140 | |
141 | |
142 | #endif // _IGESGeom_SplineSurface_HeaderFile |