forked from 1b-agent/opencadstudio-upstream
Face3DGpu batched every visible 3DFACE quad and PolyfaceMesh / PolygonMesh fill triangle into a single vertex buffer. A mesh-heavy DWG (e.g. a Navisworks import) blows past wgpu's default 256 MB max_buffer_size once enough layers are thawed; the resulting uncaptured validation error panics inside iced's main-thread redraw and aborts the whole process. Split the 3D and 2D fill streams into per-limit chunks on whole-triangle boundaries — the same scheme build_mesh_batch already uses (#203) — and register an on_uncaptured_error handler so any remaining GPU validation error degrades the frame instead of killing the session. Co-Authored-By: Claude Fable 5 <[email protected]>