Internal helper shared by every fix strategy that needs to split
a SceneGeometry in two and fan referencing meshes onto
the resulting pieces. Same supported pattern
applyIFCMaterials / studio.materials.MaterialsPalette
use: detach + destroy + recreate + reattach, with a snapshot of
each mesh's id / matrix / opacity / parentTransform preserved
across the rebuild.
Steps:
Split the source geometry via splitSceneGeometry
(whole-triangle midpoint partition). Returns
{fixed: false} cleanly when the predicate routes every
triangle to one side (cannot make progress).
Snapshot every SceneMesh that referenced the source.
For each snapshot: remove from its SceneObject, destroy it,
then create two new meshes ({id}_a / {id}_b) — one
against each half — and reattach to the same SceneObject.
Internal helper shared by every fix strategy that needs to split a SceneGeometry in two and fan referencing meshes onto the resulting pieces. Same supported pattern applyIFCMaterials / studio.materials.MaterialsPalette use: detach + destroy + recreate + reattach, with a snapshot of each mesh's id / matrix / opacity / parentTransform preserved across the rebuild.
Steps:
{fixed: false}cleanly when the predicate routes every triangle to one side (cannot make progress).{id}_a/{id}_b) — one against each half — and reattach to the same SceneObject.