forked from 1b-agent/opencadstudio-upstream
3DFACE entities previously created one WireGpu buffer per entity, resulting in N separate draw calls per frame. For files with large triangle meshes this was the dominant GPU CPU overhead. New pipeline: - face3d.wgsl: simple flat-color vertex + fragment shader (MVP only, no quad expansion, no pattern distance computation) - Face3DGpu: batches ALL Face3D entities into a single TriangleList buffer (6 vertices per face, per-vertex color) — 1 draw call - WireGpu::from_batch: merges N Face3D edge wire models into one quad-expanded buffer for edge rendering — 1 draw call - split_face3d_wires: separates face3d from other wires at Primitive build time via document handle lookup (O(N), once per epoch) Hit-testing via WireModel (CPU) is unaffected — face3d wires remain in entity_wires_arc() and hit_test_wires() as before. Before: N 3DFACE → N draw calls, N × 96 B/vertex WireVertex After: N 3DFACE → 2 draw calls (fill + edges), 28 B/vertex fill Co-Authored-By: Claude Sonnet 4.6 <[email protected]>