Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:01

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_SplineSurface_HeaderFile
0018 #define _IGESGeom_SplineSurface_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 
0022 #include <Standard_Integer.hxx>
0023 #include <IGESBasic_HArray2OfHArray1OfReal.hxx>
0024 #include <IGESData_IGESEntity.hxx>
0025 #include <Standard_Real.hxx>
0026 
0027 
0028 class IGESGeom_SplineSurface;
0029 DEFINE_STANDARD_HANDLE(IGESGeom_SplineSurface, IGESData_IGESEntity)
0030 
0031 //! defines IGESSplineSurface, Type <114> Form <0>
0032 //! in package IGESGeom
0033 //! A parametric spline surface is a grid of polynomial
0034 //! patches. Patch could be of the type Linear, Quadratic,
0035 //! Cubic, Wilson-Fowler, Modified Wilson-Fowler, B-Spline
0036 //! The M * N grid of patches is defined by the 'u' break
0037 //! points TU(1), TU(2), ..., TU(M+1) and the 'v' break
0038 //! points TV(1), TV(2), TV(3) ..., TV(N+1).
0039 class IGESGeom_SplineSurface : public IGESData_IGESEntity
0040 {
0041 
0042 public:
0043 
0044   
0045   Standard_EXPORT IGESGeom_SplineSurface();
0046   
0047   //! This method is used to set the fields of the class
0048   //! SplineSurface
0049   //! - aBoundaryType   : Type of Spline boundary
0050   //! 1 = Linear
0051   //! 2 = Quadratic
0052   //! 3 = Cubic
0053   //! 4 = Wilson-Fowler
0054   //! 5 = Modified Wilson-Fowler
0055   //! 6 = B-spline
0056   //! - aPatchType      : Type of patch contained in the grid
0057   //! 1 = Cartesian Product
0058   //! 0 = Unspecified
0059   //! - allUBreakpoints : u values of grid lines
0060   //! - allVBreakpoints : v values of grid lines
0061   //! - allXCoeffs      : X coefficients of M x N patches
0062   //! - allYCoeffs      : Y coefficients of M x N patches
0063   //! - allZCoeffs      : Z coefficients of M x N patches
0064   //! raises exception if allXCoeffs, allYCoeffs & allZCoeffs are not
0065   //! of the same size.
0066   //! or if the size of each element of the double array is not 16
0067   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);
0068   
0069   //! returns the number of U segments
0070   Standard_EXPORT Standard_Integer NbUSegments() const;
0071   
0072   //! returns the number of V segments
0073   Standard_EXPORT Standard_Integer NbVSegments() const;
0074   
0075   //! returns boundary type
0076   Standard_EXPORT Standard_Integer BoundaryType() const;
0077   
0078   //! returns patch type
0079   Standard_EXPORT Standard_Integer PatchType() const;
0080   
0081   //! returns U break point of the grid line referred to by anIndex
0082   //! raises exception if anIndex <= 0 or anIndex > NbUSegments() + 1
0083   Standard_EXPORT Standard_Real UBreakPoint (const Standard_Integer anIndex) const;
0084   
0085   //! returns V break point of the grid line referred to by anIndex
0086   //! raises exception if anIndex <= 0 or anIndex > NbVSegments() + 1
0087   Standard_EXPORT Standard_Real VBreakPoint (const Standard_Integer anIndex) const;
0088   
0089   //! returns X polynomial of patch referred to by anIndex1, anIndex2
0090   //! raises exception if anIndex1 <= 0 or anIndex1 > NbUSegments()
0091   //! or anIndex2 <= 0 or anIndex2 > NbVSegments()
0092   Standard_EXPORT Handle(TColStd_HArray1OfReal) XPolynomial (const Standard_Integer anIndex1, const Standard_Integer anIndex2) const;
0093   
0094   //! returns Y polynomial of patch referred to by anIndex1, anIndex2
0095   //! raises exception if anIndex1 <= 0 or anIndex1 > NbUSegments()
0096   //! or anIndex2 <= 0 or anIndex2 > NbVSegments()
0097   Standard_EXPORT Handle(TColStd_HArray1OfReal) YPolynomial (const Standard_Integer anIndex1, const Standard_Integer anIndex2) const;
0098   
0099   //! returns Z polynomial of patch referred to by anIndex1, anIndex2
0100   //! raises exception if anIndex1 <= 0 or anIndex1 > NbUSegments()
0101   //! or anIndex2 <= 0 or anIndex2 > NbVSegments()
0102   Standard_EXPORT Handle(TColStd_HArray1OfReal) ZPolynomial (const Standard_Integer anIndex1, const Standard_Integer anIndex2) const;
0103   
0104   //! returns in one all the polynomial values "in bulk"
0105   //! useful for massive treatments
0106   Standard_EXPORT void Polynomials (Handle(IGESBasic_HArray2OfHArray1OfReal)& XCoef, Handle(IGESBasic_HArray2OfHArray1OfReal)& YCoef, Handle(IGESBasic_HArray2OfHArray1OfReal)& ZCoef) const;
0107 
0108 
0109 
0110 
0111   DEFINE_STANDARD_RTTIEXT(IGESGeom_SplineSurface,IGESData_IGESEntity)
0112 
0113 protected:
0114 
0115 
0116 
0117 
0118 private:
0119 
0120 
0121   Standard_Integer theBoundaryType;
0122   Standard_Integer thePatchType;
0123   Handle(TColStd_HArray1OfReal) theUBreakPoints;
0124   Handle(TColStd_HArray1OfReal) theVBreakPoints;
0125   Handle(IGESBasic_HArray2OfHArray1OfReal) theXCoeffs;
0126   Handle(IGESBasic_HArray2OfHArray1OfReal) theYCoeffs;
0127   Handle(IGESBasic_HArray2OfHArray1OfReal) theZCoeffs;
0128 
0129 
0130 };
0131 
0132 
0133 
0134 
0135 
0136 
0137 
0138 #endif // _IGESGeom_SplineSurface_HeaderFile