Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:59

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 
0027 class IGESDimen_DimensionUnits;
0028 DEFINE_STANDARD_HANDLE(IGESDimen_DimensionUnits, IGESData_IGESEntity)
0029 
0030 //! defines Dimension Units, Type <406>, Form <28>
0031 //! in package IGESDimen
0032 //! Describes the units and formatting details of the
0033 //! nominal value of a dimension.
0034 class IGESDimen_DimensionUnits : public IGESData_IGESEntity
0035 {
0036 
0037 public:
0038 
0039   
0040   Standard_EXPORT IGESDimen_DimensionUnits();
0041   
0042   //! This method is used to set the fields of the class
0043   //! DimensionUnits
0044   //! - nbPropVal  : Number of property values, always = 6
0045   //! - aSecondPos : Secondary Dimension Position
0046   //! 0 = This is the main text
0047   //! 1 = Before primary dimension
0048   //! 2 = After primary dimension
0049   //! 3 = Above primary dimension
0050   //! 4 = Below primary dimension
0051   //! - aUnitsInd  : Units Indicator
0052   //! - aCharSet   : Character Set used
0053   //! - aFormat    : Format HAsciiString
0054   //! 1 = Standard ASCII
0055   //! 1001 = Symbol Font 1
0056   //! 1002 = Symbol Font 2
0057   //! 1003 = Drafting Font
0058   //! - aFracFlag  : Fraction Flag
0059   //! 0 = Display values as decimal numbers
0060   //! 1 = Display values as fractions
0061   //! - aPrecision : Precision Value
0062   Standard_EXPORT void Init (const Standard_Integer nbPropVal, const Standard_Integer aSecondPos, const Standard_Integer aUnitsInd, const Standard_Integer aCharSet, const Handle(TCollection_HAsciiString)& aFormat, const Standard_Integer aFracFlag, const Standard_Integer aPrecision);
0063   
0064   //! returns the number of property values
0065   Standard_EXPORT Standard_Integer NbPropertyValues() const;
0066   
0067   //! returns position of secondary dimension w.r.t. primary dimension
0068   Standard_EXPORT Standard_Integer SecondaryDimenPosition() const;
0069   
0070   //! returns the units indicator
0071   Standard_EXPORT Standard_Integer UnitsIndicator() const;
0072   
0073   //! returns the character set interpretation
0074   Standard_EXPORT Standard_Integer CharacterSet() const;
0075   
0076   //! returns the string used in formatting value
0077   Standard_EXPORT Handle(TCollection_HAsciiString) FormatString() const;
0078   
0079   //! returns the fraction flag
0080   Standard_EXPORT Standard_Integer 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 Standard_Integer PrecisionOrDenominator() const;
0086 
0087 
0088 
0089 
0090   DEFINE_STANDARD_RTTIEXT(IGESDimen_DimensionUnits,IGESData_IGESEntity)
0091 
0092 protected:
0093 
0094 
0095 
0096 
0097 private:
0098 
0099 
0100   Standard_Integer theNbPropertyValues;
0101   Standard_Integer theSecondaryDimenPosition;
0102   Standard_Integer theUnitsIndicator;
0103   Standard_Integer theCharacterSet;
0104   Handle(TCollection_HAsciiString) theFormatString;
0105   Standard_Integer theFractionFlag;
0106   Standard_Integer thePrecision;
0107 
0108 
0109 };
0110 
0111 
0112 
0113 
0114 
0115 
0116 
0117 #endif // _IGESDimen_DimensionUnits_HeaderFile