Skip to main content

Module compile_10d

Module compile_10d 

Source
Expand description

Compile a Mesh into a sealed .10d container (the dense compiled-geometry sidecar) and read it back — the “mesh → .10d” step of the 3-D-anatomy asset pipeline. Compile an imported triangle [Mesh] into a sealed .10d container — the dense compiled-geometry half of a geometry asset (see docs/manuals/standards/geometry-asset-ontology.md §3). This is the “mesh → .10d” step of the 3-D-anatomy asset pipeline: the renderer and the anatomy layer read the .10d back with [decode_10d_mesh] instead of reparsing the source GLB, and the q42 semantic manifest cites the container’s [compiled_digest].

Scope (honest): emits a QuantizedMesh section (u16-quantized vertices in the bbox + u16/u32 indices). Optional Tensor10DNodes (D1), provenance sidecars, and on native / wasm-scientific builds optional Topology + SpatialIndex sections (C3) for scan-free picking. LOD chain from decimate_3 remains a separate pre-compile step.

Structs§

Compile10dExtras
Optional extra sections for vision / recon seals (programme C3).
CompiledAsset
A fully compiled geometry asset: the source-imported Mesh, the sealed .10d container, its two content digests, and the q42 semantic manifest that cites the container by compiledDigest (geometry-asset-ontology §1 two-layer model).

Enums§

Compile10dError
Failure modes for .10d compilation and read-back.

Functions§

compile_asset
The end-to-end asset-compile step: source asset bytes → CompiledAsset.
compile_developmental_asset
Like compile_asset but binds the compiled asset to a point on the developmental t-axis — its gestational_age_days (postfertilization) and carnegie_stage. This is the compile step for a fetal/ embryonic stage: consecutive stages, ordered by gestational age, form a 4-D developmental body (the maternal–fetal dyad’s fetal side, reproductive-continuum plan §2).
compile_mesh_to_10d
Compile a mesh into a sealed .10d container holding one QuantizedMesh section. The whole-file CRC-32C is written (the container is self-verifying).
compile_mesh_to_10d_vision
Vision recon seal: mesh + nodes + Topology + SpatialIndex when CG is linked (C3).
compile_mesh_to_10d_vision_with_provenance
Vision recon seal + in-envelope provenance (D4).
compile_mesh_to_10d_with_extras
Full seal with explicit extras (topology / spatial index).
compile_mesh_to_10d_with_nodes
Compile mesh + optional Tensor10D nodes (vision detections / σ paint fuel).
compile_mesh_to_10d_with_nodes_and_provenance
Full vision/recon seal: mesh + nodes + optional provenance (no topology extras).
compile_mesh_to_10d_with_provenance
Compile a mesh into a sealed .10d, optionally bundling a provenance sidecar physically inside the container (P1) — the immutable source bytes + licence (+ optional VC) the asset was derived from, so context is byte-inseparable: a .10d copied on its own still carries what it came from and under what licence. The renderer’s governance path treats the presence of this section as the attestation that makes the mesh citable (see render/portal/mod.rs).
compile_organ_asset
Like compile_asset but also binds the compiled asset to a 3D-body organ: its body_system (which of the 17 systems colours it by burden) and anatomy_model ("male" / "female", from the user’s declared XY/XX basis). This is the compile step for an anatomy organ mesh — the manifest it emits carries geo:bodySystem + geo:anatomyModel so the renderer can look the organ up in the per-system percept table (S5.1) and both colour and sonify it.
compiled_digest
The compiledDigest a q42 asset manifest cites: the container’s whole-file CRC-32C (computed with the header’s own CRC field zeroed, so it equals the sealed header value). Deterministic; changes on any geometry-byte change.
decode_10d_mesh
Read a .10d container back into a dequantized Mesh — the renderer / anatomy path that avoids reparsing the source GLB. Extracts the first QuantizedMesh section.
decode_10d_nodes
Read Tensor10D nodes from a sealed .10d (first Tensor10DNodes section).