Property values which are real numbers have an additional feature – units. A unit defines a multiplier used for displaying thu number in the GUI. All property values stored use a canonical internal unit; for example, all coordinates are in millimeters.
The formula for displayed values is:
The units are stored in an array and the properties contain their indices. When the user changes the display unit, he only modifies the property unit index and the internal property value is remains unchanged.
There are properties of the following four quantities:
PQ_LENGTHfor longitudinal properties
PQ_ANGLEfor angular properties
PQ_REFERENCEfor parameters within
PQ_NONEfor non-measurable properties, such as control point weights
The quantity of a property is determined by the type and subtype and can
be found in the following way (for a property
Every quantity has a default unit which is stored in
If the unit of a property is
PROP_UNIT_MAX or a deleted unit, the default unit (for
the appropriate quantity) is used instead.
The default unit cannot be
Checking whether a certain unit is used in some objects would be too slow. Therefore, a unit cannot be simply deleted. Instead, it is marked as unused and it cannot be assigned to properties any more. If a property that has a deleted unit needs to be displayed, it uses the default unit instead.
The default unit cannot be deleted.