Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-04 09:14:52

0001 // Created on: 1993-01-09
0002 // Created by: CKY / Contract Toubro-Larsen ( SIVA )
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 _IGESDefs_TabularData_HeaderFile
0018 #define _IGESDefs_TabularData_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 <IGESData_IGESEntity.hxx>
0027 class IGESBasic_HArray1OfHArray1OfReal;
0028 
0029 //! Defines IGES Tabular Data, Type <406> Form <11>,
0030 //! in package IGESDefs
0031 //! This Class is used to provide a Structure to accommodate
0032 //! point form data.
0033 class IGESDefs_TabularData : public IGESData_IGESEntity
0034 {
0035 
0036 public:
0037   Standard_EXPORT IGESDefs_TabularData();
0038 
0039   //! This method is used to set the fields of the class
0040   //! TabularData
0041   //! - nbProps     : Number of property values
0042   //! - propType    : Property Type
0043   //! - typesInd    : Type of independent variables
0044   //! - nbValuesInd : Number of values of independent variables
0045   //! - valuesInd   : Values of independent variables
0046   //! - valuesDep   : Values of dependent variables
0047   //! raises exception if lengths of typeInd and nbValuesInd are not same
0048   Standard_EXPORT void Init(const int                                            nbProps,
0049                             const int                                            propType,
0050                             const occ::handle<NCollection_HArray1<int>>&         typesInd,
0051                             const occ::handle<NCollection_HArray1<int>>&         nbValuesInd,
0052                             const occ::handle<IGESBasic_HArray1OfHArray1OfReal>& valuesInd,
0053                             const occ::handle<IGESBasic_HArray1OfHArray1OfReal>& valuesDep);
0054 
0055   //! returns the number of property values (recorded)
0056   Standard_EXPORT int NbPropertyValues() const;
0057 
0058   //! determines the number of property values required
0059   Standard_EXPORT int ComputedNbPropertyValues() const;
0060 
0061   //! checks, and correct as necessary, the number of property
0062   //! values. Returns True if corrected, False if already OK
0063   Standard_EXPORT bool OwnCorrect();
0064 
0065   //! returns the property type
0066   Standard_EXPORT int PropertyType() const;
0067 
0068   //! returns the number of dependent variables
0069   Standard_EXPORT int NbDependents() const;
0070 
0071   //! returns the number of independent variables
0072   Standard_EXPORT int NbIndependents() const;
0073 
0074   //! returns the type of the num'th independent variable
0075   //! raises exception if num <= 0 or num > NbIndependents()
0076   Standard_EXPORT int TypeOfIndependents(const int num) const;
0077 
0078   //! returns the number of different values of the num'th indep. variable
0079   //! raises exception if num <= 0 or num > NbIndependents()
0080   Standard_EXPORT int NbValues(const int num) const;
0081 
0082   Standard_EXPORT double IndependentValue(const int variablenum, const int valuenum) const;
0083 
0084   Standard_EXPORT occ::handle<NCollection_HArray1<double>> DependentValues(const int num) const;
0085 
0086   Standard_EXPORT double DependentValue(const int variablenum, const int valuenum) const;
0087 
0088   DEFINE_STANDARD_RTTIEXT(IGESDefs_TabularData, IGESData_IGESEntity)
0089 
0090 private:
0091   int                                           theNbPropertyValues;
0092   int                                           thePropertyType;
0093   occ::handle<NCollection_HArray1<int>>         theTypeOfIndependentVariables;
0094   occ::handle<NCollection_HArray1<int>>         theNbValues;
0095   occ::handle<IGESBasic_HArray1OfHArray1OfReal> theIndependentValues;
0096   occ::handle<IGESBasic_HArray1OfHArray1OfReal> theDependentValues;
0097 };
0098 
0099 #endif // _IGESDefs_TabularData_HeaderFile