Expand description
The Properties-panel DATA layer (UI comes later): a name-keyed metadata store, per-entity measurements, and object provenance — all engine-native, all crossing the R3 boundary as plain JSON/scalars.
§Metadata store (MetadataStore)
object name → { attribute → value }, keyed by the KERNEL OBJECT NAME (a
solid / face / edge name), not a feature id. This loose coupling is the
whole point: a record survives feature edits, rollback and re-tessellation as
long as the object’s name persists (edge/face names ARE propagated through
booleans, splits and welds by the kernel). Values are strings; the well-known
density attribute (mass units per mm³) drives a solid’s weight. The store is
persisted WITH the model — crate::engine_state::EngineState::history_request_json
folds it in as a top-level metadata field and
crate::engine_state::EngineState::set_history_json lifts it back out, so it
round-trips through save/open.
§Measurements + provenance
The EngineState methods below resolve an object NAME to its kind (solid /
face / edge, via the scene) and return the right measurements from the
kernel’s exact integrators (volume, surface area, arc length), plus the
feature that produced the object (provenance, via the history’s per-feature
output solids). Units are millimetres (the kernel length convention).
Structs§
- Metadata
Store - The name-keyed metadata store:
object name → { attribute → value }, string values, deterministic iteration (aBTreeMapso the persisted JSON is stable). Empty records are never retained (removing the last attribute drops the whole record).
Constants§
- DEFAULT_
DENSITY - The default density (mass per unit volume) when an object carries no
densitymetadata: unit density, soweight == volume. - TRANSPARENCY_
METADATA_ KEY - The metadata key a solid’s or face’s transparency is stored under: a number
from 0 (opaque) to 1 (clear), or the same as a percentage (
35%).
Functions§
- transparency_
opacity - A
transparencyattribute’s value as the OPACITY the display draws at (0 clear .. 1 opaque).Nonefor anything that is not a number.