Expand description
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.
Operates on the meshes the consumer already holds (the viewer’s / SDK’s
MeshData), NOT on file bytes: a button press must not re-parse and
re-mesh the whole model, and the placement capture the inverse transform
needs (origin, local_to_world, #1474) rides on those meshes.
Frames: consumer meshes arrive in the wasm boundary convention — WebGL
Y-up positions/normals/origin, winding reversed, local_to_world
conjugated (zero_copy::mesh::MeshDataJs::new) — with y_up = true;
native in-memory meshes (IFC Z-up, untouched winding) pass y_up = false.
rtc_offset is the model’s origin shift in IFC Z-up metres
(coordinateInfo.originShift); reconstruction per vertex is
true_world = origin + position + rtc_offset in the Z-up frame, then
local = inv(local_to_world) * true_world, then / unit_scale into file
units.
Structs§
- Simplified
Element - Simplified element: one render mesh (input frame convention) + the same triangles in the element’s IFC object-placement frame in file units.
- Simplify
Record Input - One already-produced mesh record of an element (an element may carry several: per-material submesh splits).
Enums§
- Simplify
Skip - Why an element could not be simplified. The caller keeps the original geometry for these — a skip is never destructive.
Functions§
- simplify_
element - Simplify one element from its already-produced mesh records at the given
demesher level (see
SimplifyOptions::for_level).