A3DUnitGetFromValue

A3DEUnits A3DUnitGetFromValue(A3DDouble dUnit)
A3DEUnits A3DUnitGetFromValue(A3DDouble dUnit)

Converts a units representation from A3DDoubleto A3DEUnits.

14.1

HOOPS Exchange stores most of its unit information as factors of millimeters, as described in A3DEUnits. This function allows you to retrieve the correct unit enumeration given an input value. For example, a value of 10.returns kA3DUnitCentimeter.

Behavior

To properly retrieve the correct A3DEUnitsfor a given A3DDoubleinput, HOOPS Exchange compares it with the expected float value of each unit (as returned by A3DUnitGetFromEnum()) given a unit-specific threshold as presented by this table:

** Enumerator** | ** Value (millimeters)** | ** Threshold**

If the provided value does not fall under any of these value ranges, the function returns kA3DUnitUnknown.

Parameters

dUnit: A unit value (in millimeter)

Returns

An A3DEUnitsvalue