Expand description
The ONE definition of the server wire’s axis convention (issue #1841).
IFC is Z-up; WebGL/glTF (and every ifc-lite client) is Y-up. Every server transport therefore emits Y-up metres, and this module is the single place that conversion is defined.
It used to be open-coded inline in each parquet serializer and simply
MISSING from the JSON route, so POST /api/v1/parse shipped raw IFC Z-up
while the parquet endpoints shipped Y-up — the same class of silent
per-transport drift as the dropped origin. Keep every transport routed
through these helpers so the frame can never diverge again.
Functions§
- mesh_
to_ yup_ in_ place - Rewrite a mesh into the Y-up wire frame in place: positions, normals, and
the per-mesh
origintogether, so the mesh stays internally consistent. - zup_
to_ yup - Convert one position/normal triplet from IFC Z-up to WebGL Y-up: X stays, new Y = old Z (vertical), new Z = -old Y (depth).
- zup_
to_ yup_ f64 - The same swap for an f64 triplet — used for the per-mesh
origin, which must land in the SAME frame as the positions it offsets (the swap is linear, soswap(origin + position) == swap(origin) + swap(position)).