Expand description
Unit resolution: what one coordinate unit actually means.
§Why this is not optional
IFC coordinates are bare numbers. IFCCARTESIANPOINT((3000.,0.,0.)) is
three metres or three millimetres depending on the project’s
IfcUnitAssignment, and nothing in the geometry says which. A viewer that
assumes metres renders a 1000x oversized building; one that assumes
millimetres renders a speck.
The resolved UnitScale is therefore an input to every lowering
operation, not an afterthought. IFC defines no default length or plane
angle unit, and UnitsInContext is optional on IfcContext in IFC4 and
IFC4X3, so a model that does not declare its length unit has no scale to
resolve: resolve refuses it (#585).
§What is resolved
IfcSIUnitwith anIfcSIPrefix(MILLI,CENTI,KILO, …); a length unit must be theMETREand an angle unit theRADIAN(IfcNamedUnitWR1)IfcConversionBasedUnit(inch, foot, degree): itsValueComponentstated in itsUnitComponent, so an inch given as 25.4 millimetres reads as 0.0254 metres- Angle units, because
IfcPlaneAngleMeasuremay be degrees or radians and every rotation depends on knowing which. A missing angle unit is refused only where an angle is read (UnitScale::angle)
§What is refused
No project, no UnitsInContext, no LENGTHUNIT; two projects; two units
of one type; an unknown prefix; a misnamed SI unit; a context-dependent or
offset unit; a conversion factor that is not a positive finite number.
A project, assignment, assigned unit, conversion factor, unit component or
Dimensions the reader reported, and a lenient model whose skipped records
may hide one, are refused too (#684).
A conversion-based unit defined through another one is
GeometryError::Unsupported.
Structs§
- Unit
Scale - Multipliers converting file units into SI base units.
Functions§
- resolve
- Resolve the project’s unit assignment.