Open CASCADE Technology 7.8.0
Static Public Member Functions
UnitsMethods Class Reference

Class for using global units variables. More...

#include <UnitsMethods.hxx>

Static Public Member Functions

static Standard_Real GetLengthFactorValue (const Standard_Integer theUnit)
 Returns value of unit encoded by parameter theUnit (integer value denoting unit, as described in IGES standard) in millimeters by default.
 
static Standard_Real GetCasCadeLengthUnit (const UnitsMethods_LengthUnit theBaseUnit=UnitsMethods_LengthUnit_Millimeter)
 Returns value of current internal unit for CASCADE in millemeters by default.
 
static void SetCasCadeLengthUnit (const Standard_Real theUnitValue, const UnitsMethods_LengthUnit theBaseUnit=UnitsMethods_LengthUnit_Millimeter)
 Sets value of current internal unit for CASCADE.
 
static void SetCasCadeLengthUnit (const Standard_Integer theUnit)
 Sets value of current internal unit for CASCADE by parameter theUnit (integer value denoting unit, as described in IGES standard)
 
static Standard_Real GetLengthUnitScale (const UnitsMethods_LengthUnit theFromUnit, const UnitsMethods_LengthUnit theToUnit)
 Returns the scale factor for switch from first given unit to second given unit.
 
static UnitsMethods_LengthUnit GetLengthUnitByFactorValue (const Standard_Real theFactorValue, const UnitsMethods_LengthUnit theBaseUnit=UnitsMethods_LengthUnit_Millimeter)
 Returns the enumeration corresponding to the given scale factor.
 
static Standard_CString DumpLengthUnit (const Standard_Real theScaleFactor, const UnitsMethods_LengthUnit theBaseUnit=UnitsMethods_LengthUnit_Millimeter)
 Returns string name for the given scale factor.
 
static Standard_CString DumpLengthUnit (const UnitsMethods_LengthUnit theUnit)
 Returns string for the given value of LengthUnit.
 
static UnitsMethods_LengthUnit LengthUnitFromString (Standard_CString theStr, const Standard_Boolean theCaseSensitive)
 Make conversion of given string to value of LengthUnit.
 

Detailed Description

Class for using global units variables.

Member Function Documentation

◆ DumpLengthUnit() [1/2]

static Standard_CString UnitsMethods::DumpLengthUnit ( const Standard_Real  theScaleFactor,
const UnitsMethods_LengthUnit  theBaseUnit = UnitsMethods_LengthUnit_Millimeter 
)
static

Returns string name for the given scale factor.

◆ DumpLengthUnit() [2/2]

static Standard_CString UnitsMethods::DumpLengthUnit ( const UnitsMethods_LengthUnit  theUnit)
static

Returns string for the given value of LengthUnit.

◆ GetCasCadeLengthUnit()

static Standard_Real UnitsMethods::GetCasCadeLengthUnit ( const UnitsMethods_LengthUnit  theBaseUnit = UnitsMethods_LengthUnit_Millimeter)
static

Returns value of current internal unit for CASCADE in millemeters by default.

◆ GetLengthFactorValue()

static Standard_Real UnitsMethods::GetLengthFactorValue ( const Standard_Integer  theUnit)
static

Returns value of unit encoded by parameter theUnit (integer value denoting unit, as described in IGES standard) in millimeters by default.

◆ GetLengthUnitByFactorValue()

static UnitsMethods_LengthUnit UnitsMethods::GetLengthUnitByFactorValue ( const Standard_Real  theFactorValue,
const UnitsMethods_LengthUnit  theBaseUnit = UnitsMethods_LengthUnit_Millimeter 
)
static

Returns the enumeration corresponding to the given scale factor.

◆ GetLengthUnitScale()

static Standard_Real UnitsMethods::GetLengthUnitScale ( const UnitsMethods_LengthUnit  theFromUnit,
const UnitsMethods_LengthUnit  theToUnit 
)
static

Returns the scale factor for switch from first given unit to second given unit.

◆ LengthUnitFromString()

static UnitsMethods_LengthUnit UnitsMethods::LengthUnitFromString ( Standard_CString  theStr,
const Standard_Boolean  theCaseSensitive 
)
static

Make conversion of given string to value of LengthUnit.

◆ SetCasCadeLengthUnit() [1/2]

static void UnitsMethods::SetCasCadeLengthUnit ( const Standard_Integer  theUnit)
static

Sets value of current internal unit for CASCADE by parameter theUnit (integer value denoting unit, as described in IGES standard)

◆ SetCasCadeLengthUnit() [2/2]

static void UnitsMethods::SetCasCadeLengthUnit ( const Standard_Real  theUnitValue,
const UnitsMethods_LengthUnit  theBaseUnit = UnitsMethods_LengthUnit_Millimeter 
)
static

Sets value of current internal unit for CASCADE.


The documentation for this class was generated from the following file: