Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-07-17 08:35:33

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_DimensionTolerance_HeaderFile
0018 #define _IGESDimen_DimensionTolerance_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 
0022 #include <Standard_Integer.hxx>
0023 #include <Standard_Real.hxx>
0024 #include <IGESData_IGESEntity.hxx>
0025 
0026 class IGESDimen_DimensionTolerance;
0027 DEFINE_STANDARD_HANDLE(IGESDimen_DimensionTolerance, IGESData_IGESEntity)
0028 
0029 //! defines Dimension Tolerance, Type <406>, Form <29>
0030 //! in package IGESDimen
0031 //! Provides tolerance information for a dimension which
0032 //! can be used by the receiving system to regenerate the
0033 //! dimension.
0034 class IGESDimen_DimensionTolerance : public IGESData_IGESEntity
0035 {
0036 
0037 public:
0038   Standard_EXPORT IGESDimen_DimensionTolerance();
0039 
0040   //! This method is used to set the fields of the class
0041   //! DimensionTolerance
0042   //! - nbPropVal     : Number of property values, default = 8
0043   //! - aSecTolFlag   : Secondary Tolerance Flag
0044   //! 0 = Applies to primary dimension
0045   //! 1 = Applies to secondary dimension
0046   //! 2 = Display values as fractions
0047   //! - aTolType      : Tolerance Type
0048   //! 1  = Bilateral
0049   //! 2  = Upper/Lower
0050   //! 3  = Unilateral Upper
0051   //! 4  = Unilateral Lower
0052   //! 5  = Range - min before max
0053   //! 6  = Range - min after max
0054   //! 7  = Range - min above max
0055   //! 8  = Range - min below max
0056   //! 9  = Nominal + Range - min above max
0057   //! 10 = Nominal + Range - min below max
0058   //! - aTolPlaceFlag : Tolerance Placement Flag
0059   //! 1 = Before nominal value
0060   //! 2 = After nominal value
0061   //! 3 = Above nominal value
0062   //! 4 = Below nominal value
0063   //! - anUpperTol    : Upper Tolerance
0064   //! - aLowerTol     : Lower Tolerance
0065   //! - aSignFlag     : Sign Suppression Flag
0066   //! - aFracFlag     : Fraction Flag
0067   //! 0 = Display values as decimal numbers
0068   //! 1 = Display values as mixed fractions
0069   //! 2 = Display values as fractions
0070   //! - aPrecision    : Precision Value
0071   Standard_EXPORT void Init(const Standard_Integer nbPropVal,
0072                             const Standard_Integer aSecTolFlag,
0073                             const Standard_Integer aTolType,
0074                             const Standard_Integer aTolPlaceFlag,
0075                             const Standard_Real    anUpperTol,
0076                             const Standard_Real    aLowerTol,
0077                             const Standard_Boolean aSignFlag,
0078                             const Standard_Integer aFracFlag,
0079                             const Standard_Integer aPrecision);
0080 
0081   //! returns the number of property values, always = 8
0082   Standard_EXPORT Standard_Integer NbPropertyValues() const;
0083 
0084   //! returns the Secondary Tolerance Flag
0085   Standard_EXPORT Standard_Integer SecondaryToleranceFlag() const;
0086 
0087   //! returns the Tolerance Type
0088   Standard_EXPORT Standard_Integer ToleranceType() const;
0089 
0090   //! returns the Tolerance Placement Flag, default = 2
0091   Standard_EXPORT Standard_Integer TolerancePlacementFlag() const;
0092 
0093   //! returns the Upper or Bilateral Tolerance Value
0094   Standard_EXPORT Standard_Real UpperTolerance() const;
0095 
0096   //! returns the Lower Tolerance Value
0097   Standard_EXPORT Standard_Real LowerTolerance() const;
0098 
0099   //! returns the Sign Suppression Flag
0100   Standard_EXPORT Standard_Boolean SignSuppressionFlag() const;
0101 
0102   //! returns the Fraction Flag
0103   Standard_EXPORT Standard_Integer FractionFlag() const;
0104 
0105   //! returns the Precision for Value Display
0106   Standard_EXPORT Standard_Integer Precision() const;
0107 
0108   DEFINE_STANDARD_RTTIEXT(IGESDimen_DimensionTolerance, IGESData_IGESEntity)
0109 
0110 protected:
0111 private:
0112   Standard_Integer theNbPropertyValues;
0113   Standard_Integer theSecondaryToleranceFlag;
0114   Standard_Integer theToleranceType;
0115   Standard_Integer theTolerancePlacementFlag;
0116   Standard_Real    theUpperTolerance;
0117   Standard_Real    theLowerTolerance;
0118   Standard_Boolean theSignSuppressionFlag;
0119   Standard_Integer theFractionFlag;
0120   Standard_Integer thePrecision;
0121 };
0122 
0123 #endif // _IGESDimen_DimensionTolerance_HeaderFile