Expand description
Shared IFC processing pipeline and types.
This crate extracts the core processing logic so it can be used by both the HTTP server and the native FFI library.
Re-exports§
pub use geometry_export::build_geometry_data_export;pub use geometry_export::ExportedElement;pub use geometry_export::GeometryDataExport;pub use pipeline_diagnostics::PipelineDiagnostics;pub use pipeline_diagnostics::PipelinePhaseTimings;pub use pipeline_diagnostics::PIPELINE_DIAGNOSTICS_SCHEMA_VERSION;pub use simplify_session::simplify_element;pub use simplify_session::SimplifiedElement;pub use simplify_session::SimplifyRecordInput;pub use simplify_session::SimplifySkip;pub use style::default_color_for_type;pub use style::Rgba;pub use style::TRANSPARENCY_ALPHA_THRESHOLD;
Modules§
- determinism
- Mesh-output determinism manifest - the pipeline-level companion to the
kernel’s predicate sign manifest (
ifc_lite_geometry::kernel::manifest). - element
- Canonical per-element mesh production — THE single decision tree that turns one IFC product (or type-product RepresentationMap) into renderable meshes.
- geometry_
export - Analysis-ready geometry-data export.
- pipeline_
diagnostics - Structured per-load pipeline diagnostics — the cross-target contract.
- prepass
- Canonical prepass resolution — the single post-scan step that turns the
entity spans a scan collected into the style / material / void context the
per-element producer (
crate::element) consumes. - simplify_
session - Demesher session core: simplify already-produced element meshes and hand back BOTH a render-ready replacement mesh and the same vertices in the element’s IFC object-placement frame (file units) for tessellated IFC re-export.
- stream_
meta - Shared streaming pre-pass meta resolution.
- style
- Canonical IFC styling — the single source of truth for mesh colors, shared between the HTTP server, the native pipeline, and the browser-side WASM bindings (issue #913).
Structs§
- Coordinate
Info - Coordinate system information.
- Georeferencing
- Georeferencing metadata (
IfcMapConversion+IfcProjectedCRS). - Instance
Record - #1623 Phase 2: one resolved occurrence of a shared template geometry, emitted in
crate::ProcessingResult::instancesinstead of a full materialized mesh whenStreamingOptions.enable_instancingis set. The consumer uploads the template MeshData (template_express_id, still inmeshes) once and draws this occurrence by applyingtransformto the template’s baked world geometry. Purely in-memory, likeMeshData::instance— recomputed fresh each load, never round-trips a cache. - Mesh
Data - Individual mesh data with geometry and metadata.
- Model
Metadata - Model metadata extracted from the IFC file.
- Parse
Response - Full parse response with all meshes.
- Processing
Result - Result of processing an IFC file.
- Processing
Stats - Processing statistics.
- Quick
Metadata Bootstrap - Quick
Metadata Entity Summary - Quick
Metadata Spatial Node - RawInstance
Occurrence - #1623 Phase 2 “don’t-bake”: a non-template occurrence of a shared
IfcRepresentationMapthat skipped the per-occurrence vertex materialize. The router emits an instance-only placeholder (empty geometry carryingInstanceMeta); [crate::element::emit_sub_meshes] turns it into one of these, and the streaming finalize resolves it against the template MeshData into anInstanceRecord. Purely in-memory (recomputed each load), never serialized. - Streaming
Options - Controls the tradeoff between first-frame latency and richer upfront metadata.
- Symbolic
Circle - A single 2D circle / arc for symbolic representations.
- Symbolic
Data - Server-friendly summary of the IFC’s 2D symbol data.
- Symbolic
Fill Area - A 2D filled region (
IfcAnnotationFillArea). - Symbolic
Grid Axis - A single
IfcGridAxistag + axis curve (server-friendly endpoint-pair representation; the wasm pipeline emits the same data viaSymbolicPolylineaxis lines andSymbolicTextbubbles, both of which are also populated below). - Symbolic
Polyline - A single 2D polyline for symbolic representations.
- Symbolic
Text - A 2D text annotation (
IfcTextLiteral/IfcTextLiteralWithExtent).
Enums§
- Opening
Filter Mode - Controls how IfcWindow / IfcDoor openings are exported.
- Tessellation
Quality - Re-exported so the server can name the quality level without a direct
ifc-lite-geometrydependency edge for one enum. Detail level for geometry tessellation, selectable by consumers.
Constants§
- PREPASS_
CLASS_ CODE_ MASK - Mask extracting the named-arm code from a class byte (drops the flag bits).
- PREPASS_
CLASS_ FLAG_ GEOMETRY_ JOB - FLAG bit: geometry-bearing entity (
has_geometry_by_name) — a pre-pass geometry job. Composes with the named codes’ nibble range (2..=13) and withPREPASS_CLASS_FLAG_TYPE_CANDIDATE. - PREPASS_
CLASS_ FLAG_ TYPE_ CANDIDATE - FLAG bit:
IfcTypeProductsubtype candidate (name ends TYPE/STYLE) for the #957 orphan type-geometry pass. - PREPASS_
CLASS_ INDEXED_ COLOUR_ MAP IFCINDEXEDCOLOURMAP(#663/#858).- PREPASS_
CLASS_ MAPPED_ ITEM IFCMAPPEDITEM(#957/#1623 repmap plans).- PREPASS_
CLASS_ MATERIAL_ DEF_ REPR IFCMATERIALDEFINITIONREPRESENTATION(#407).- PREPASS_
CLASS_ MATERIAL_ LAYER_ SET IFCMATERIALLAYERSET/IFCMATERIALLAYERSETUSAGE(arms the layer index).- PREPASS_
CLASS_ NONE - Per-record prepass class emitted by
scan_shard_classified. - PREPASS_
CLASS_ PROJECT IFCPROJECT.- PREPASS_
CLASS_ REL_ AGGREGATES IFCRELAGGREGATES.- PREPASS_
CLASS_ REL_ ASSOCIATES_ MATERIAL IFCRELASSOCIATESMATERIAL(#407).- PREPASS_
CLASS_ REL_ DEFINES_ BY_ TYPE IFCRELDEFINESBYTYPE(#957 instantiated-type ids).- PREPASS_
CLASS_ REL_ FILLS IFCRELFILLSELEMENT.- PREPASS_
CLASS_ REL_ VOIDS IFCRELVOIDSELEMENT.- PREPASS_
CLASS_ SITE IFCSITE(also a geometry job — the pre-pass buffers it like one).- PREPASS_
CLASS_ STYLED_ ITEM IFCSTYLEDITEM— the styled-item spans the pre-pass resolver classifies into orphan (material appearance) vs geometry-attached styles.
Functions§
- build_
entity_ index_ parallel - Build the entity index (expressId -> byte span) across all available cores.
- classify_
type_ name - Classify a scanned STEP keyword into the prepass class byte: a named-arm
code for the exact keywords the serial pre-pass matches, plus the
geometry-job / type-candidate FLAG bits from the same helpers it calls
(
has_geometry_by_name,IfcType::is_subtype_of). Byte-identical span collection and job discovery follow from using the identical predicates at scan time. - convert_
mesh_ to_ site_ local - Rotate a mesh into the site-local axis frame. Only runs for the
site_localcoordinate-space tier; translation alignment happens upstream via the router’s RTC subtraction. - extract_
georeferencing - Extract georeferencing from an IFC file, returning
Nonewhen the model carries noIfcMapConversion/ePSet_MapConversiondata. - extract_
georeferencing_ with_ index extract_georeferencing, reusing an index the caller already holds.- extract_
symbolic_ data - Scan an IFC file for
IfcGridand any product carrying a Plan / Annotation / FootPrint / Axis representation, and return the full symbolic primitive collection. Pure-Rust (nowasm_bindgen), so it works inside the HTTP server. - flat_
styles_ rgba8_ from_ geometry_ columns crate::prepass::flat_styles_rgba8with the (dominant) geometry-style source supplied as PRE-MERGED columns instead of a map — the sharded finalize path.geom_idsare unique (the host merged shard results first-wins) withgeom_colorsas rgba f32 quads;resolvedcarries the support resolution (indexed colours, materials, element colours) and MUST have an emptygeometry_style_index. Output is byte-identical to the serial flatten: same precedence (geometry > indexed colour > material > element material), same id-ascending wire order, same rgba8 conversion — without ever building the 4M-entry geometry hashmap.- process_
geometry - Process IFC content with parallel geometry extraction (default opening filter).
- process_
geometry_ filtered - Process IFC content with parallel geometry extraction and a configurable opening filter.
- process_
geometry_ filtered_ with_ quality - Like
process_geometry_filteredwith a consumer-selected tessellation detail level (#976) — the server half of the quality knob the wasm path exposes viasetTessellationQuality. - process_
geometry_ streaming - Process IFC content with parallel geometry extraction and emit batches as they complete.
- process_
geometry_ streaming_ filtered - Process IFC content with parallel geometry extraction and a configurable streaming batch size.
- process_
geometry_ streaming_ filtered_ with_ options - Process IFC content with parallel geometry extraction and configurable streaming behavior.
- process_
geometry_ streaming_ with_ options - Process IFC content with parallel geometry extraction and configurable streaming behavior.
- process_
geometry_ streaming_ with_ options_ and_ bootstrap - Process IFC content with parallel geometry extraction and emit a quick metadata bootstrap once the scan phase completes.
- process_
geometry_ with_ index - Like
process_geometrybut reuses a pre-built entity index instead of scanningcontentfor one. For a caller that also runs a second pass over the same bytes (e.g. pairing GLB export with attribute extraction): build the index once withifc_lite_core::build_entity_indexand share it across both, skipping the duplicate scan.indexMUST be built from the samecontent. Output is identical toprocess_geometry(content). - scan_
shard - scan_
shard_ classified - [
scan_shard] plus a parallel per-record class column (see thePREPASS_CLASS_*codes). Same records, same handoff; the class byte lets the browser host extract pre-pass span lists (today: styled items) from the stitched shard columns WITHOUT waiting for the serial pre-pass scan.
Type Aliases§
- Shard
Records - One shard’s speculative scan over
[range_start, range_end).