mesh_schema

Function mesh_schema 

Source
pub(super) fn mesh_schema(include_rotation: bool) -> Arc<Schema>
Expand description

The flat transport’s mesh table.

-parquet-v6 (issue #3888; -parquet-v9 since #5130): the vertex_start/vertex_count and index_start/index_count columns no longer name a block this row OWNS. Several rows can point at ONE shared block — the rotation-aware shape sharing /optimized has carried since #3575, brought to the flat route — and the rot0..rot8 tail below is what places each of them: world = origin + R * p, the same contract and the same Y-up frame as instance_schema().

Two consequences for a decoder, both load-bearing:

  • origin_x/y/z was zero on every row of a v5 flat blob from a DEFAULT native server (the placement was baked into the vertices), so a decoder that ignored it was accidentally correct. Only on a default one: local_frame_enabled in rust/geometry/src/router/transforms/mod.rs is opt-in on native via IFC_LITE_LOCAL_FRAME, and a deployment that sets it has emitted non-zero origins here since #1841. On v6 the column carries real values wherever a shape is shared, on every deployment, so reading it is MANDATORY rather than merely recommended.
  • rot0..rot8 are absent on a v5 blob. Absent means identity, which is exactly v5’s behaviour; a v6 writer always emits them, identity included.

include_rotation follows the LAYOUT the client asked for (ParquetLayout), not whether anything was actually shared: a v5 request must come back byte-identical to what this route emitted before #3888, and a v6 request must carry the columns even from a batch-local stream, which shares nothing. That is why this is a parameter rather than being derived from the payload, unlike instance_schema, whose transport HAS a version byte to disambiguate an absent block from a truncated one.