# DataExchange
TKSTEP
STEPConstruct

# STEPConstruct_UnitContext Class Reference

Tool for creation (encoding) and decoding (for writing and reading
accordingly) context defining units and tolerances (uncerntanties)
.

`#include <STEPConstruct_UnitContext.hxx>`

## Public Member Functions

void * | operator new (size_t, void *anAddress)
void * | operator new (size_t size)
void | operator delete (void *anAddress)
Standard_EXPORT | STEPConstruct_UnitContext ()
| Creates empty tool .
Standard_EXPORT void | Init (const Standard_Real Tol3d)
| Creates new context (units are MM and radians, uncertainty equal to Tol3d) .
Standard_EXPORT Standard_Boolean | IsDone () const
| Returns True if Init was called successfully .
Standard_EXPORT Handle_StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx | Value () const
| Returns context (or Null if not done) .
Standard_EXPORT Standard_Integer | ComputeFactors (const Handle(StepRepr_GlobalUnitAssignedContext)&aContext)
| Computes the length, plane angle and solid angle conversion factor . Returns a status, 0 if OK .
Standard_EXPORT Standard_Integer | ComputeFactors (const Handle(StepBasic_NamedUnit)&aUnit)
Standard_EXPORT Standard_Integer | ComputeTolerance (const Handle(StepRepr_GlobalUncertaintyAssignedContext)&aContext)
| Computes the uncertainty value (for length) .
Standard_EXPORT Standard_Real | LengthFactor () const
| Returns the lengthFactor .
Standard_EXPORT Standard_Real | PlaneAngleFactor () const
| Returns the planeAngleFactor .
Standard_EXPORT Standard_Real | SolidAngleFactor () const
| Returns the solidAngleFactor .
Standard_EXPORT Standard_Real | Uncertainty () const
| Returns the Uncertainty value (for length) It has been converted with LengthFactor .
Standard_EXPORT Standard_Real | AreaFactor () const
| Returns the areaFactor .
Standard_EXPORT Standard_Real | VolumeFactor () const
| Returns the volumeFactor .
Standard_EXPORT Standard_Boolean | HasUncertainty () const
| Tells if a Uncertainty (for length) is recorded .
Standard_EXPORT Standard_Boolean | LengthDone () const
| Returns true if ComputeFactors has calculated a LengthFactor .
Standard_EXPORT Standard_Boolean | PlaneAngleDone () const
| Returns true if ComputeFactors has calculated a PlaneAngleFactor .
Standard_EXPORT Standard_Boolean | SolidAngleDone () const
| Returns true if ComputeFactors has calculated a SolidAngleFactor .
Standard_EXPORT Standard_Boolean | AreaDone () const
| Returns true if areaFactor is computed .
Standard_EXPORT Standard_Boolean | VolumeDone () const
| Returns true if volumeFactor is computed .
Standard_EXPORT Standard_CString | StatusMessage (const Standard_Integer status) const
| Returns a message for a given status (0 - empty) This message can then be added as warning for transfer .

## Static Public Member Functions

static Standard_EXPORT Standard_Real | ConvertSiPrefix (const StepBasic_SiPrefix aPrefix)
| Convert SI prefix defined by enumertaion to corresponding real factor (e.g. 1e6 for mega) .

## Private Member Functions

Standard_EXPORT Standard_Boolean | SiUnitNameFactor (const Handle(StepBasic_SiUnit)&aSiUnit, Standard_Real &val) const
| Fills numerical equivalent of SiUnitName (in SI value) Returns False if name SiUnit Name not recognized .

## Private Attributes

Standard_Boolean | done
Handle_StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx | GRC
Standard_Real | lengthFactor
Standard_Real | planeAngleFactor
Standard_Real | solidAngleFactor
Standard_Real | theUncertainty
Standard_Real | areaFactor
Standard_Real | volumeFactor
Standard_Boolean | areaDone
Standard_Boolean | volumeDone
Standard_Boolean | lengthDone
Standard_Boolean | planeAngleDone
Standard_Boolean | solidAngleDone
Standard_Boolean | hasUncertainty

## Constructor & Destructor Documentation

Standard_EXPORT STEPConstruct_UnitContext::STEPConstruct_UnitContext | ( |  | ) |

## Member Function Documentation

Standard_EXPORT Standard_Boolean STEPConstruct_UnitContext::AreaDone | ( |  | ) | const

Standard_EXPORT Standard_Real STEPConstruct_UnitContext::AreaFactor | ( |  | ) | const

Standard_EXPORT Standard_Integer STEPConstruct_UnitContext::ComputeFactors | ( | const Handle(StepBasic_NamedUnit)& | aUnit | ) |

Standard_EXPORT Standard_Integer STEPConstruct_UnitContext::ComputeFactors | ( | const Handle(StepRepr_GlobalUnitAssignedContext)& | aContext | ) |

Standard_EXPORT Standard_Integer STEPConstruct_UnitContext::ComputeTolerance | ( | const Handle(StepRepr_GlobalUncertaintyAssignedContext)& | aContext | ) |

static Standard_EXPORT Standard_Real STEPConstruct_UnitContext::ConvertSiPrefix | ( | const StepBasic_SiPrefix | aPrefix | ) | `[static]`

Standard_EXPORT Standard_Boolean STEPConstruct_UnitContext::HasUncertainty | ( |  | ) | const

Standard_EXPORT void STEPConstruct_UnitContext::Init | ( | const Standard_Real | Tol3d | ) |

Standard_EXPORT Standard_Boolean STEPConstruct_UnitContext::IsDone | ( |  | ) | const

Standard_EXPORT Standard_Boolean STEPConstruct_UnitContext::LengthDone | ( |  | ) | const

Standard_EXPORT Standard_Real STEPConstruct_UnitContext::LengthFactor | ( |  | ) | const

void STEPConstruct_UnitContext::operator delete | ( | void * | anAddress | ) | `[inline]`

void* STEPConstruct_UnitContext::operator new | ( | size_t | size | ) | `[inline]`

void* STEPConstruct_UnitContext::operator new | ( | size_t | ,
|  | void * | anAddress
| ) | `[inline]`

Standard_EXPORT Standard_Boolean STEPConstruct_UnitContext::PlaneAngleDone | ( |  | ) | const

Standard_EXPORT Standard_Real STEPConstruct_UnitContext::PlaneAngleFactor | ( |  | ) | const

Standard_EXPORT Standard_Boolean STEPConstruct_UnitContext::SiUnitNameFactor | ( | const Handle(StepBasic_SiUnit)& | aSiUnit,
|  | Standard_Real & | val
| ) | const`[private]`

Standard_EXPORT Standard_Boolean STEPConstruct_UnitContext::SolidAngleDone | ( |  | ) | const

Standard_EXPORT Standard_Real STEPConstruct_UnitContext::SolidAngleFactor | ( |  | ) | const

Standard_EXPORT Standard_CString STEPConstruct_UnitContext::StatusMessage | ( | const Standard_Integer | status | ) | const

Standard_EXPORT Standard_Real STEPConstruct_UnitContext::Uncertainty | ( |  | ) | const

Standard_EXPORT Handle_StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx STEPConstruct_UnitContext::Value | ( |  | ) | const

Standard_EXPORT Standard_Boolean STEPConstruct_UnitContext::VolumeDone | ( |  | ) | const

Standard_EXPORT Standard_Real STEPConstruct_UnitContext::VolumeFactor | ( |  | ) | const

## Field Documentation

Standard_Boolean STEPConstruct_UnitContext::areaDone`[private]`

Standard_Real STEPConstruct_UnitContext::areaFactor`[private]`

Standard_Boolean STEPConstruct_UnitContext::done`[private]`

Handle_StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx STEPConstruct_UnitContext::GRC`[private]`

Standard_Boolean STEPConstruct_UnitContext::hasUncertainty`[private]`

Standard_Boolean STEPConstruct_UnitContext::lengthDone`[private]`

Standard_Real STEPConstruct_UnitContext::lengthFactor`[private]`

Standard_Boolean STEPConstruct_UnitContext::planeAngleDone`[private]`

Standard_Real STEPConstruct_UnitContext::planeAngleFactor`[private]`

Standard_Boolean STEPConstruct_UnitContext::solidAngleDone`[private]`

Standard_Real STEPConstruct_UnitContext::solidAngleFactor`[private]`

Standard_Real STEPConstruct_UnitContext::theUncertainty`[private]`

Standard_Boolean STEPConstruct_UnitContext::volumeDone`[private]`

Standard_Real STEPConstruct_UnitContext::volumeFactor`[private]`

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

- STEPConstruct_UnitContext.hxx