Open CASCADE Technology  7.3.0
Public Member Functions | Static Public Member Functions
STEPConstruct_UnitContext Class Reference

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

#include <STEPConstruct_UnitContext.hxx>

Public Member Functions

 STEPConstruct_UnitContext ()
 Creates empty tool. More...
 
void Init (const Standard_Real Tol3d)
 Creates new context (units are MM and radians, uncertainty equal to Tol3d) More...
 
Standard_Boolean IsDone () const
 Returns True if Init was called successfully. More...
 
Handle< StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtxValue () const
 Returns context (or Null if not done) More...
 
Standard_Integer ComputeFactors (const Handle< StepRepr_GlobalUnitAssignedContext > &aContext)
 Computes the length, plane angle and solid angle conversion factor . Returns a status, 0 if OK. More...
 
Standard_Integer ComputeFactors (const Handle< StepBasic_NamedUnit > &aUnit)
 
Standard_Integer ComputeTolerance (const Handle< StepRepr_GlobalUncertaintyAssignedContext > &aContext)
 Computes the uncertainty value (for length) More...
 
Standard_Real LengthFactor () const
 Returns the lengthFactor. More...
 
Standard_Real PlaneAngleFactor () const
 Returns the planeAngleFactor. More...
 
Standard_Real SolidAngleFactor () const
 Returns the solidAngleFactor. More...
 
Standard_Real Uncertainty () const
 Returns the Uncertainty value (for length) It has been converted with LengthFactor. More...
 
Standard_Real AreaFactor () const
 Returns the areaFactor. More...
 
Standard_Real VolumeFactor () const
 Returns the volumeFactor. More...
 
Standard_Boolean HasUncertainty () const
 Tells if a Uncertainty (for length) is recorded. More...
 
Standard_Boolean LengthDone () const
 Returns true if ComputeFactors has calculated a LengthFactor. More...
 
Standard_Boolean PlaneAngleDone () const
 Returns true if ComputeFactors has calculated a PlaneAngleFactor. More...
 
Standard_Boolean SolidAngleDone () const
 Returns true if ComputeFactors has calculated a SolidAngleFactor. More...
 
Standard_Boolean AreaDone () const
 Returns true if areaFactor is computed. More...
 
Standard_Boolean VolumeDone () const
 Returns true if volumeFactor is computed. More...
 
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. More...
 

Static Public Member Functions

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

Detailed Description

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

Constructor & Destructor Documentation

◆ STEPConstruct_UnitContext()

STEPConstruct_UnitContext::STEPConstruct_UnitContext ( )

Creates empty tool.

Member Function Documentation

◆ AreaDone()

Standard_Boolean STEPConstruct_UnitContext::AreaDone ( ) const

Returns true if areaFactor is computed.

◆ AreaFactor()

Standard_Real STEPConstruct_UnitContext::AreaFactor ( ) const

Returns the areaFactor.

◆ ComputeFactors() [1/2]

Standard_Integer STEPConstruct_UnitContext::ComputeFactors ( const Handle< StepRepr_GlobalUnitAssignedContext > &  aContext)

Computes the length, plane angle and solid angle conversion factor . Returns a status, 0 if OK.

◆ ComputeFactors() [2/2]

Standard_Integer STEPConstruct_UnitContext::ComputeFactors ( const Handle< StepBasic_NamedUnit > &  aUnit)

◆ ComputeTolerance()

Standard_Integer STEPConstruct_UnitContext::ComputeTolerance ( const Handle< StepRepr_GlobalUncertaintyAssignedContext > &  aContext)

Computes the uncertainty value (for length)

◆ ConvertSiPrefix()

static Standard_Real STEPConstruct_UnitContext::ConvertSiPrefix ( const StepBasic_SiPrefix  aPrefix)
static

Convert SI prefix defined by enumertaion to corresponding real factor (e.g. 1e6 for mega)

◆ HasUncertainty()

Standard_Boolean STEPConstruct_UnitContext::HasUncertainty ( ) const

Tells if a Uncertainty (for length) is recorded.

◆ Init()

void STEPConstruct_UnitContext::Init ( const Standard_Real  Tol3d)

Creates new context (units are MM and radians, uncertainty equal to Tol3d)

◆ IsDone()

Standard_Boolean STEPConstruct_UnitContext::IsDone ( ) const

Returns True if Init was called successfully.

◆ LengthDone()

Standard_Boolean STEPConstruct_UnitContext::LengthDone ( ) const

Returns true if ComputeFactors has calculated a LengthFactor.

◆ LengthFactor()

Standard_Real STEPConstruct_UnitContext::LengthFactor ( ) const

Returns the lengthFactor.

◆ PlaneAngleDone()

Standard_Boolean STEPConstruct_UnitContext::PlaneAngleDone ( ) const

Returns true if ComputeFactors has calculated a PlaneAngleFactor.

◆ PlaneAngleFactor()

Standard_Real STEPConstruct_UnitContext::PlaneAngleFactor ( ) const

Returns the planeAngleFactor.

◆ SolidAngleDone()

Standard_Boolean STEPConstruct_UnitContext::SolidAngleDone ( ) const

Returns true if ComputeFactors has calculated a SolidAngleFactor.

◆ SolidAngleFactor()

Standard_Real STEPConstruct_UnitContext::SolidAngleFactor ( ) const

Returns the solidAngleFactor.

◆ StatusMessage()

Standard_CString STEPConstruct_UnitContext::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.

◆ Uncertainty()

Standard_Real STEPConstruct_UnitContext::Uncertainty ( ) const

Returns the Uncertainty value (for length) It has been converted with LengthFactor.

◆ Value()

Handle< StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx > STEPConstruct_UnitContext::Value ( ) const

Returns context (or Null if not done)

◆ VolumeDone()

Standard_Boolean STEPConstruct_UnitContext::VolumeDone ( ) const

Returns true if volumeFactor is computed.

◆ VolumeFactor()

Standard_Real STEPConstruct_UnitContext::VolumeFactor ( ) const

Returns the volumeFactor.


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