|
||||
File indexing completed on 2025-01-18 10:04:00
0001 // Created on: 1993-01-09 0002 // Created by: 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_BSplineCurve_HeaderFile 0018 #define _IGESGeom_BSplineCurve_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_Type.hxx> 0022 0023 #include <Standard_Integer.hxx> 0024 #include <TColStd_HArray1OfReal.hxx> 0025 #include <TColgp_HArray1OfXYZ.hxx> 0026 #include <gp_XYZ.hxx> 0027 #include <IGESData_IGESEntity.hxx> 0028 class gp_Pnt; 0029 0030 0031 class IGESGeom_BSplineCurve; 0032 DEFINE_STANDARD_HANDLE(IGESGeom_BSplineCurve, IGESData_IGESEntity) 0033 0034 //! defines IGESBSplineCurve, Type <126> Form <0-5> 0035 //! in package IGESGeom 0036 //! A parametric equation obtained by dividing two summations 0037 //! involving weights (which are real numbers), the control 0038 //! points, and B-Spline basis functions 0039 class IGESGeom_BSplineCurve : public IGESData_IGESEntity 0040 { 0041 0042 public: 0043 0044 0045 Standard_EXPORT IGESGeom_BSplineCurve(); 0046 0047 //! This method is used to set the fields of the class 0048 //! BSplineCurve. Beware about indexation of arrays 0049 //! - anIndex : Upper index of the sum 0050 //! - aDegree : Degree of basis functions 0051 //! - aPlanar : 0 = nonplanar curve, 1 = planar curve 0052 //! - aClosed : 0 = open curve, 1 = closed curve 0053 //! - aPolynom : 0 = rational, 1 = polynomial 0054 //! - aPeriodic : 0 = nonperiodic, 1 = periodic 0055 //! - allKnots : Knot sequence values [-Degree,Index+1] 0056 //! - allWeights : Array of weights [0,Index] 0057 //! - allPoles : X, Y, Z coordinates of all control points 0058 //! [0,Index] 0059 //! - aUmin, aUmax : Starting and ending parameter values 0060 //! - aNorm : Unit normal (if the curve is planar) 0061 //! raises exception if allWeights & allPoles are not of same size. 0062 Standard_EXPORT void Init (const Standard_Integer anIndex, const Standard_Integer aDegree, const Standard_Boolean aPlanar, const Standard_Boolean aClosed, const Standard_Boolean aPolynom, const Standard_Boolean aPeriodic, const Handle(TColStd_HArray1OfReal)& allKnots, const Handle(TColStd_HArray1OfReal)& allWeights, const Handle(TColgp_HArray1OfXYZ)& allPoles, const Standard_Real aUmin, const Standard_Real aUmax, const gp_XYZ& aNorm); 0063 0064 //! Changes FormNumber (indicates the Shape of the Curve) 0065 //! Error if not in range [0-5] 0066 Standard_EXPORT void SetFormNumber (const Standard_Integer form); 0067 0068 //! returns the upper index of the sum (see Knots,Poles) 0069 Standard_EXPORT Standard_Integer UpperIndex() const; 0070 0071 //! returns the degree of basis functions 0072 Standard_EXPORT Standard_Integer Degree() const; 0073 0074 //! returns True if the curve is Planar, False if non-planar 0075 Standard_EXPORT Standard_Boolean IsPlanar() const; 0076 0077 //! returns True if the curve is closed, False if open 0078 Standard_EXPORT Standard_Boolean IsClosed() const; 0079 0080 //! returns True if the curve is polynomial, False if rational 0081 //! <flag> False (D) : computed from the list of weights 0082 //! (all must be equal) 0083 //! <flag> True : as recorded 0084 Standard_EXPORT Standard_Boolean IsPolynomial (const Standard_Boolean flag = Standard_False) const; 0085 0086 //! returns True if the curve is periodic, False otherwise 0087 Standard_EXPORT Standard_Boolean IsPeriodic() const; 0088 0089 //! returns the number of knots (i.e. Degree + UpperIndex + 2) 0090 Standard_EXPORT Standard_Integer NbKnots() const; 0091 0092 //! returns the knot referred to by anIndex, 0093 //! inside the range [-Degree,UpperIndex+1] 0094 //! raises exception if 0095 //! anIndex < -Degree() or anIndex > (NbKnots() - Degree()) 0096 //! Note : Knots are numbered from -Degree (not from 1) 0097 Standard_EXPORT Standard_Real Knot (const Standard_Integer anIndex) const; 0098 0099 //! returns number of poles (i.e. UpperIndex + 1) 0100 Standard_EXPORT Standard_Integer NbPoles() const; 0101 0102 //! returns the weight referred to by anIndex, in [0,UpperIndex] 0103 //! raises exception if anIndex < 0 or anIndex > UpperIndex() 0104 Standard_EXPORT Standard_Real Weight (const Standard_Integer anIndex) const; 0105 0106 //! returns the pole referred to by anIndex, in [0,UpperIndex] 0107 //! raises exception if anIndex < 0 or anIndex > UpperIndex() 0108 Standard_EXPORT gp_Pnt Pole (const Standard_Integer anIndex) const; 0109 0110 //! returns the anIndex'th pole after applying Transf. Matrix 0111 //! raises exception if an Index < 0 or an Index > UpperIndex() 0112 Standard_EXPORT gp_Pnt TransformedPole (const Standard_Integer anIndex) const; 0113 0114 //! returns starting parameter value 0115 Standard_EXPORT Standard_Real UMin() const; 0116 0117 //! returns ending parameter value 0118 Standard_EXPORT Standard_Real UMax() const; 0119 0120 //! if the curve is nonplanar then (0, 0, 0) is returned 0121 Standard_EXPORT gp_XYZ Normal() const; 0122 0123 0124 0125 0126 DEFINE_STANDARD_RTTIEXT(IGESGeom_BSplineCurve,IGESData_IGESEntity) 0127 0128 protected: 0129 0130 0131 0132 0133 private: 0134 0135 0136 Standard_Integer theIndex; 0137 Standard_Integer theDegree; 0138 Standard_Boolean isPlanar; 0139 Standard_Boolean isClosed; 0140 Standard_Boolean isPolynomial; 0141 Standard_Boolean isPeriodic; 0142 Handle(TColStd_HArray1OfReal) theKnots; 0143 Handle(TColStd_HArray1OfReal) theWeights; 0144 Handle(TColgp_HArray1OfXYZ) thePoles; 0145 Standard_Real theUmin; 0146 Standard_Real theUmax; 0147 gp_XYZ theNorm; 0148 0149 0150 }; 0151 0152 0153 0154 0155 0156 0157 0158 #endif // _IGESGeom_BSplineCurve_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |