|
|
|||
File indexing completed on 2026-09-21 09:17:30
0001 // Created on: 1993-01-09 0002 // Created by: CKY / Contract Toubro-Larsen ( Kiran ) 0003 // Copyright (c) 1993-1999 Matra Datavision 0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS 0005 // 0006 // This file is part of Open CASCADE Technology software library. 0007 // 0008 // This library is free software; you can redistribute it and/or modify it under 0009 // the terms of the GNU Lesser General Public License version 2.1 as published 0010 // by the Free Software Foundation, with special exception defined in the file 0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0012 // distribution for complete text of the license and disclaimer of any warranty. 0013 // 0014 // Alternatively, this file may be used under the terms of Open CASCADE 0015 // commercial license or contractual agreement. 0016 0017 #ifndef _IGESGeom_BSplineSurface_HeaderFile 0018 #define _IGESGeom_BSplineSurface_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_Type.hxx> 0022 0023 #include <Standard_Integer.hxx> 0024 #include <NCollection_Array1.hxx> 0025 #include <NCollection_HArray1.hxx> 0026 #include <NCollection_Array2.hxx> 0027 #include <NCollection_HArray2.hxx> 0028 #include <gp_XYZ.hxx> 0029 #include <IGESData_IGESEntity.hxx> 0030 class gp_Pnt; 0031 0032 //! defines IGESBSplineSurface, Type <128> Form <0-9> 0033 //! in package IGESGeom 0034 //! A parametric equation obtained by dividing two summations 0035 //! involving weights (which are real numbers), the control 0036 //! points, and B-Spline basis functions 0037 class IGESGeom_BSplineSurface : public IGESData_IGESEntity 0038 { 0039 0040 public: 0041 Standard_EXPORT IGESGeom_BSplineSurface(); 0042 0043 //! This method is used to set the fields of the class 0044 //! BSplineSurface 0045 //! - anIndexU : Upper index of first sum 0046 //! - anIndexV : Upper index of second sum 0047 //! - aDegU, aDegV : Degrees of first and second sets 0048 //! of basis functions 0049 //! - aCloseU, aCloseV : 1 = Closed in U, V directions 0050 //! 0 = open in U, V directions 0051 //! - aPolynom : 0 = Rational, 1 = polynomial 0052 //! - aPeriodU, aPeriodV : 0 = Non periodic in U or V direction 0053 //! 1 = Periodic in U or V direction 0054 //! - allKnotsU, allKnotsV : Knots in U and V directions 0055 //! - allWeights : Array of weights 0056 //! - allPoles : XYZ coordinates of all control points 0057 //! - aUmin : Starting value of U direction 0058 //! - aUmax : Ending value of U direction 0059 //! - aVmin : Starting value of V direction 0060 //! - aVmax : Ending value of V direction 0061 //! raises exception if allWeights & allPoles are not of same size. 0062 Standard_EXPORT void Init(const int anIndexU, 0063 const int anIndexV, 0064 const int aDegU, 0065 const int aDegV, 0066 const bool aCloseU, 0067 const bool aCloseV, 0068 const bool aPolynom, 0069 const bool aPeriodU, 0070 const bool aPeriodV, 0071 const occ::handle<NCollection_HArray1<double>>& allKnotsU, 0072 const occ::handle<NCollection_HArray1<double>>& allKnotsV, 0073 const occ::handle<NCollection_HArray2<double>>& allWeights, 0074 const occ::handle<NCollection_HArray2<gp_XYZ>>& allPoles, 0075 const double aUmin, 0076 const double aUmax, 0077 const double aVmin, 0078 const double aVmax); 0079 0080 //! Changes FormNumber (indicates the Shape of the Surface) 0081 //! Error if not in range [0-9] 0082 Standard_EXPORT void SetFormNumber(const int form); 0083 0084 //! returns the upper index of the first sum (U) 0085 Standard_EXPORT int UpperIndexU() const; 0086 0087 //! returns the upper index of the second sum (V) 0088 Standard_EXPORT int UpperIndexV() const; 0089 0090 //! returns degree of first set of basis functions 0091 Standard_EXPORT int DegreeU() const; 0092 0093 //! returns degree of second set of basis functions 0094 Standard_EXPORT int DegreeV() const; 0095 0096 //! True if closed in U direction else False 0097 Standard_EXPORT bool IsClosedU() const; 0098 0099 //! True if closed in V direction else False 0100 Standard_EXPORT bool IsClosedV() const; 0101 0102 //! True if polynomial, False if rational 0103 //! <flag> False (D) : computed from Weights 0104 //! <flag> True : recorded 0105 Standard_EXPORT bool IsPolynomial(const bool flag = false) const; 0106 0107 //! True if periodic in U direction else False 0108 Standard_EXPORT bool IsPeriodicU() const; 0109 0110 //! True if periodic in V direction else False 0111 Standard_EXPORT bool IsPeriodicV() const; 0112 0113 //! returns number of knots in U direction 0114 //! KnotsU are numbered from -DegreeU 0115 Standard_EXPORT int NbKnotsU() const; 0116 0117 //! returns number of knots in V direction 0118 //! KnotsV are numbered from -DegreeV 0119 Standard_EXPORT int NbKnotsV() const; 0120 0121 //! returns the value of knot referred to by anIndex in U direction 0122 //! raises exception if 0123 //! anIndex < -DegreeU() or anIndex > (NbKnotsU() - DegreeU()) 0124 Standard_EXPORT double KnotU(const int anIndex) const; 0125 0126 //! returns the value of knot referred to by anIndex in V direction 0127 //! raises exception if 0128 //! anIndex < -DegreeV() or anIndex > (NbKnotsV() - DegreeV()) 0129 Standard_EXPORT double KnotV(const int anIndex) const; 0130 0131 //! returns number of poles in U direction 0132 Standard_EXPORT int NbPolesU() const; 0133 0134 //! returns number of poles in V direction 0135 Standard_EXPORT int NbPolesV() const; 0136 0137 //! returns the weight referred to by anIndex1, anIndex2 0138 //! raises exception if anIndex1 <= 0 or anIndex1 > NbPolesU() 0139 //! or if anIndex2 <= 0 or anIndex2 > NbPolesV() 0140 Standard_EXPORT double Weight(const int anIndex1, const int anIndex2) const; 0141 0142 //! returns the control point referenced by anIndex1, anIndex2 0143 //! raises exception if anIndex1 <= 0 or anIndex1 > NbPolesU() 0144 //! or if anIndex2 <= 0 or anIndex2 > NbPolesV() 0145 Standard_EXPORT gp_Pnt Pole(const int anIndex1, const int anIndex2) const; 0146 0147 //! returns the control point referenced by anIndex1, anIndex2 0148 //! after applying the Transf.Matrix 0149 //! raises exception if anIndex1 <= 0 or anIndex1 > NbPolesU() 0150 //! or if anIndex2 <= 0 or anIndex2 > NbPolesV() 0151 Standard_EXPORT gp_Pnt TransformedPole(const int anIndex1, const int anIndex2) const; 0152 0153 //! returns starting value in the U direction 0154 Standard_EXPORT double UMin() const; 0155 0156 //! returns ending value in the U direction 0157 Standard_EXPORT double UMax() const; 0158 0159 //! returns starting value in the V direction 0160 Standard_EXPORT double VMin() const; 0161 0162 //! returns ending value in the V direction 0163 Standard_EXPORT double VMax() const; 0164 0165 DEFINE_STANDARD_RTTIEXT(IGESGeom_BSplineSurface, IGESData_IGESEntity) 0166 0167 private: 0168 int theIndexU; 0169 int theIndexV; 0170 int theDegreeU; 0171 int theDegreeV; 0172 bool isClosedU; 0173 bool isClosedV; 0174 bool isPolynomial; 0175 bool isPeriodicU; 0176 bool isPeriodicV; 0177 occ::handle<NCollection_HArray1<double>> theKnotsU; 0178 occ::handle<NCollection_HArray1<double>> theKnotsV; 0179 occ::handle<NCollection_HArray2<double>> theWeights; 0180 occ::handle<NCollection_HArray2<gp_XYZ>> thePoles; 0181 double theUmin; 0182 double theUmax; 0183 double theVmin; 0184 double theVmax; 0185 }; 0186 0187 #endif // _IGESGeom_BSplineSurface_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|