Module output_policy

Module output_policy 

Source
Expand description

The process-wide geometry policy that can change output, read through the SAME accessors the pipeline calls, plus this crate’s resolved features.

A result cache keys on effective_output_policy rather than on the environment: every IFC_LITE_* knob here is read once into a OnceLock (or per call) by its accessor, and several have programmatic overrides (local_frame_set_enabled_override, rect_fast::param_set_enabled_override, GeometryRouter::set_build_dedup_extra_override, kernel::budget::set_cap / set_element_cap, set_alt_triangulator). Reading the environment again would disagree with a OnceLock initialised before the variable changed, and would miss the overrides entirely.

Every programmatic setter bumps a mutation generation (policy_generation), so a cache can tell that a policy changed during a pass even when it was changed back.

A new process-global output knob belongs here; the processing crate’s result_cache_policy_ratchet test fails on an unclassified IFC_LITE_* variable.

Structs§

OutputPolicy
The effective value of every process-global geometry output knob.

Constants§

BUILD_FEATURES
Every feature of this crate and whether this build enabled it. Cargo resolves features per build, so a downstream binary can enable, say, csg_topology_gate without the processing crate’s own features changing. Kept in step with Cargo.toml by a test below.

Functions§

coherent_output_policy
A coherent policy: read between two equal, even generations. None when setters kept racing the read (eight attempts); the caller must not cache.
effective_output_policy
Read the policy now, through the pipeline’s own accessors.
policy_generation
The current mutation generation. Odd while a setter is mid-store.