Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-14 09:14:54

0001 // Created on: 1993-01-09
0002 // Created by: CKY / Contract Toubro-Larsen ( TCD )
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 _IGESGraph_DrawingUnits_HeaderFile
0018 #define _IGESGraph_DrawingUnits_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 
0022 #include <Standard_Integer.hxx>
0023 #include <IGESData_IGESEntity.hxx>
0024 #include <Standard_Real.hxx>
0025 class TCollection_HAsciiString;
0026 
0027 //! defines IGESDrawingUnits, Type <406> Form <17>
0028 //! in package IGESGraph
0029 //!
0030 //! Specifies the drawing space units as outlined
0031 //! in the Drawing entity
0032 class IGESGraph_DrawingUnits : public IGESData_IGESEntity
0033 {
0034 
0035 public:
0036   Standard_EXPORT IGESGraph_DrawingUnits();
0037 
0038   //! This method is used to set the fields of the class
0039   //! DrawingUnits
0040   //! - nbProps : Number of property values (NP = 2)
0041   //! - aFlag   : DrawingUnits Flag
0042   //! - aUnit   : DrawingUnits Name
0043   Standard_EXPORT void Init(const int                                    nbProps,
0044                             const int                                    aFlag,
0045                             const occ::handle<TCollection_HAsciiString>& aUnit);
0046 
0047   //! returns the number of property values in <me>
0048   Standard_EXPORT int NbPropertyValues() const;
0049 
0050   //! returns the drawing space units of <me>
0051   Standard_EXPORT int Flag() const;
0052 
0053   //! returns the name of the drawing space units of <me>
0054   Standard_EXPORT occ::handle<TCollection_HAsciiString> Unit() const;
0055 
0056   //! Computes the value of the unit, in meters, according Flag
0057   //! (same values as for GlobalSection from IGESData)
0058   Standard_EXPORT double UnitValue() const;
0059 
0060   DEFINE_STANDARD_RTTIEXT(IGESGraph_DrawingUnits, IGESData_IGESEntity)
0061 
0062 private:
0063   int                                   theNbPropertyValues;
0064   int                                   theFlag;
0065   occ::handle<TCollection_HAsciiString> theUnit;
0066 };
0067 
0068 #endif // _IGESGraph_DrawingUnits_HeaderFile