pub trait GeometryProcessor {
// Required methods
fn process(
&self,
entity: &DecodedEntity,
decoder: &mut EntityDecoder<'_>,
schema: &IfcSchema,
quality: TessellationQuality,
) -> Result<Mesh>;
fn supported_types(&self) -> Vec<IfcType>;
// Provided methods
fn process_in_rtc_frame(
&self,
_entity: &DecodedEntity,
_decoder: &mut EntityDecoder<'_>,
_schema: &IfcSchema,
_quality: TessellationQuality,
_rtc_file_units: (f64, f64, f64),
) -> Option<Result<Mesh>> { ... }
fn take_bool_failures(&self) -> Vec<BoolFailure> { ... }
fn bool_failure_count(&self) -> usize { ... }
fn truncate_bool_failures_to(&self, _since: usize) { ... }
}Expand description
Geometry processor trait Each processor handles one type of IFC representation
Required Methods§
Sourcefn process(
&self,
entity: &DecodedEntity,
decoder: &mut EntityDecoder<'_>,
schema: &IfcSchema,
quality: TessellationQuality,
) -> Result<Mesh>
fn process( &self, entity: &DecodedEntity, decoder: &mut EntityDecoder<'_>, schema: &IfcSchema, quality: TessellationQuality, ) -> Result<Mesh>
Process entity into mesh.
quality selects tessellation detail; processors that approximate
curves derive their segment counts from it via
crate::tessellation::scale_segments. Processors with no curved
geometry ignore it. TessellationQuality::Medium reproduces the
engine’s historical hardcoded behavior.
Sourcefn supported_types(&self) -> Vec<IfcType>
fn supported_types(&self) -> Vec<IfcType>
Get supported IFC types
Provided Methods§
Sourcefn process_in_rtc_frame(
&self,
_entity: &DecodedEntity,
_decoder: &mut EntityDecoder<'_>,
_schema: &IfcSchema,
_quality: TessellationQuality,
_rtc_file_units: (f64, f64, f64),
) -> Option<Result<Mesh>>
fn process_in_rtc_frame( &self, _entity: &DecodedEntity, _decoder: &mut EntityDecoder<'_>, _schema: &IfcSchema, _quality: TessellationQuality, _rtc_file_units: (f64, f64, f64), ) -> Option<Result<Mesh>>
Process a raw-coordinate item in an element-local RTC frame.
rtc_file_units is the relative-to-center offset in the file’s own
length unit, already expressed in the item’s coordinate frame; a
processor that reads its coordinates as f64 subtracts it BEFORE
narrowing to f32, returns the rebased mesh and sets
Mesh::rtc_applied. Default None: the processor has no such hook,
and the router falls back to Self::process, leaving RTC to the
final f64 world transform — which cannot recover detail its f32 output
already lost at national-grid magnitudes (#5026 review). Every
built-in raw-coordinate processor implements this (faces, faceted
Brep, tessellated face sets and surface models, #5698); a registered
override that handles large coordinates must too.
Sourcefn take_bool_failures(&self) -> Vec<BoolFailure>
fn take_bool_failures(&self) -> Vec<BoolFailure>
Drain the boolean / CSG failures this processor recorded while meshing.
Default: none — most processors record nothing. Overridden by
crate::processors::BooleanClippingProcessor, whose failure log had
no route out of the router at all before #3821: take_failures was
called from tests only, so an unsupported operand, an
EmptyOperand cutter and an unknown operator were recorded into a
buffer that nothing ever read, and the pipeline reported a clean load.
Drained by GeometryRouter::drain_processor_failures, which
take_csg_failures calls, so every consumer of the router’s CSG
diagnostics — the native pipeline and the wasm batch path alike — sees
these without a second opt-in.
Sourcefn bool_failure_count(&self) -> usize
fn bool_failure_count(&self) -> usize
Number of BoolFailure records currently buffered (without draining).
#4083 (double-count half): lets crate::GeometryRouter::process_representation_item
snapshot a before/after delta around ONE item’s uncached build, so a CSG
diagnostic can be attributed to that item’s item_dedup_key. Default:
0 — matches Self::take_bool_failures’s “most processors record
nothing” default. Overridden by
crate::processors::BooleanClippingProcessor.
Sourcefn truncate_bool_failures_to(&self, _since: usize)
fn truncate_bool_failures_to(&self, _since: usize)
Discard every BoolFailure recorded after index since (a prior
Self::bool_failure_count). #4083 (double-count half): the router
calls this when a racing sibling router already claimed this item’s
item_dedup_key for its own diagnostic, so THIS router’s redundant
record of the same logical operation never reaches
Self::take_bool_failures. Default: no-op, matching the 0 default
above (nothing buffered, nothing to discard).