Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:06

0001 // Copyright (c) 2021 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #ifndef _StepData_Factors_HeaderFile
0015 #define _StepData_Factors_HeaderFile
0016 
0017 #include <Standard.hxx>
0018 #include <Standard_DefineAlloc.hxx>
0019 #include <Standard_Handle.hxx>
0020 #include <Standard_Real.hxx>
0021 #include <Standard_Boolean.hxx>
0022 
0023 //! Class for using units variables
0024 class StepData_Factors
0025 {
0026 public:
0027 
0028   DEFINE_STANDARD_ALLOC
0029  
0030   //! Constructor
0031   Standard_EXPORT StepData_Factors();
0032 
0033   //! Initializes the 3 factors for the conversion of units
0034   Standard_EXPORT void InitializeFactors(
0035     const Standard_Real theLengthFactor,
0036     const Standard_Real thePlaneAngleFactor,
0037     const Standard_Real theSolidAngleFactor);
0038 
0039   //! Sets length unit for current transfer process
0040   Standard_EXPORT void SetCascadeUnit(const Standard_Real theUnit);
0041 
0042   //! Returns length unit for current transfer process (mm by default)
0043   Standard_EXPORT Standard_Real CascadeUnit() const;
0044 
0045   //! Returns transient length factor for scaling of shapes
0046   //! at one stage of transfer process
0047   Standard_EXPORT Standard_Real LengthFactor() const;
0048 
0049   //! Returns transient plane angle factor for conversion of angles
0050   //! at one stage of transfer process
0051   Standard_EXPORT Standard_Real PlaneAngleFactor() const;
0052 
0053   //! Returns transient solid angle factor for conversion of angles
0054   //! at one stage of transfer process
0055   Standard_EXPORT Standard_Real SolidAngleFactor() const;
0056 
0057   //! Returns transient factor radian degree for conversion of angles
0058   //! at one stage of transfer process
0059   Standard_EXPORT Standard_Real FactorRadianDegree() const;
0060 
0061   //! Returns transient factor degree radian for conversion of angles
0062   //! at one stage of transfer process
0063   Standard_EXPORT Standard_Real FactorDegreeRadian() const;
0064 
0065 private:
0066 
0067   Standard_Real myLengthFactor;
0068   Standard_Real myPlaneAngleFactor;
0069   Standard_Real mySolidAngleFactor;
0070   Standard_Real myFactRD;
0071   Standard_Real myFactDR;
0072   Standard_Real myCascadeUnit;
0073 };
0074 
0075 #endif // _StepData_Factors_HeaderFile