Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-24 09:16:12

0001 // Created on: 1993-01-09
0002 // Created by: CKY / Contract Toubro-Larsen (Anand NATRAJAN)
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 _IGESDimen_DimensionUnits_HeaderFile
0018 #define _IGESDimen_DimensionUnits_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 
0022 #include <Standard_Integer.hxx>
0023 #include <IGESData_IGESEntity.hxx>
0024 class TCollection_HAsciiString;
0025 
0026 //! defines Dimension Units, Type <406>, Form <28>
0027 //! in package IGESDimen
0028 //! Describes the units and formatting details of the
0029 //! nominal value of a dimension.
0030 class IGESDimen_DimensionUnits : public IGESData_IGESEntity
0031 {
0032 
0033 public:
0034   Standard_EXPORT IGESDimen_DimensionUnits();
0035 
0036   //! This method is used to set the fields of the class
0037   //! DimensionUnits
0038   //! - nbPropVal  : Number of property values, always = 6
0039   //! - aSecondPos : Secondary Dimension Position
0040   //! 0 = This is the main text
0041   //! 1 = Before primary dimension
0042   //! 2 = After primary dimension
0043   //! 3 = Above primary dimension
0044   //! 4 = Below primary dimension
0045   //! - aUnitsInd  : Units Indicator
0046   //! - aCharSet   : Character Set used
0047   //! - aFormat    : Format HAsciiString
0048   //! 1 = Standard ASCII
0049   //! 1001 = Symbol Font 1
0050   //! 1002 = Symbol Font 2
0051   //! 1003 = Drafting Font
0052   //! - aFracFlag  : Fraction Flag
0053   //! 0 = Display values as decimal numbers
0054   //! 1 = Display values as fractions
0055   //! - aPrecision : Precision Value
0056   Standard_EXPORT void Init(const int                                    nbPropVal,
0057                             const int                                    aSecondPos,
0058                             const int                                    aUnitsInd,
0059                             const int                                    aCharSet,
0060                             const occ::handle<TCollection_HAsciiString>& aFormat,
0061                             const int                                    aFracFlag,
0062                             const int                                    aPrecision);
0063 
0064   //! returns the number of property values
0065   Standard_EXPORT int NbPropertyValues() const;
0066 
0067   //! returns position of secondary dimension w.r.t. primary dimension
0068   Standard_EXPORT int SecondaryDimenPosition() const;
0069 
0070   //! returns the units indicator
0071   Standard_EXPORT int UnitsIndicator() const;
0072 
0073   //! returns the character set interpretation
0074   Standard_EXPORT int CharacterSet() const;
0075 
0076   //! returns the string used in formatting value
0077   Standard_EXPORT occ::handle<TCollection_HAsciiString> FormatString() const;
0078 
0079   //! returns the fraction flag
0080   Standard_EXPORT int FractionFlag() const;
0081 
0082   //! returns the precision/denominator
0083   //! number of decimal places when FractionFlag() = 0
0084   //! denominator of fraction when FractionFlag() = 1
0085   Standard_EXPORT int PrecisionOrDenominator() const;
0086 
0087   DEFINE_STANDARD_RTTIEXT(IGESDimen_DimensionUnits, IGESData_IGESEntity)
0088 
0089 private:
0090   int                                   theNbPropertyValues;
0091   int                                   theSecondaryDimenPosition;
0092   int                                   theUnitsIndicator;
0093   int                                   theCharacterSet;
0094   occ::handle<TCollection_HAsciiString> theFormatString;
0095   int                                   theFractionFlag;
0096   int                                   thePrecision;
0097 };
0098 
0099 #endif // _IGESDimen_DimensionUnits_HeaderFile