Linux (Rocky manylinux, GCC 11):
- WgpuAreaMeasurement.h: include <cstddef> directly. GCC 11 does not
transitively pull `size_t` through <vector>, so triangleCount()'s
return type fails to parse.
- WgpuViewportWindow.cpp:meshLocalToGlobal: use static_cast<double>(...)
instead of double(mesh_local[N]) when constructing the Eigen::Vector4d.
The latter triggers GCC 11's most-vexing-parse: it reads
`Vector4d local(double(mesh_local[0]), double(mesh_local[1]), ...)`
as a function declaration of `local` taking parameters
`double mesh_local[0]` etc., colliding with the outer `mesh_local`
parameter and failing with "redefinition of double* mesh_local".
macOS arm64:
- IfcViewerWgpuMinimal + BonsaiViewer install rules: change
`BUNDLE DESTINATION bin` → `BUNDLE DESTINATION .`. Qt's deploy
generator emits `macdeployqt <Target>.app` with no path prefix, which
only resolves when the bundle sits at the install-prefix root.
`BUNDLE DESTINATION bin` put it at `<prefix>/bin/Target.app` and the
install/strip step failed with "Could not find app bundle".
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Ports Bonsai's AreaMeasurement onto WgpuViewportWindow as a new
WgpuAreaMeasurement class. Each LMB pick resolves to (instance,
triangle), BFS-expands the coplanar patch (dot(normal, seed_normal)
> 0.9999, ~0.81° tolerance), and toggles it in/out of the running set.
Alt+LMB skips BFS for single-triangle accumulate. Connected-components
sweep over the selected set produces one "X.XXXX m²" label per patch
at its area-weighted centroid in world space; HUD shows the running
total + triangle count.
Dependencies layered in:
- WgpuOverlayRenderer.setHighlightTriangles / encodeHighlightTriangles:
translucent world-space triangle list (cyan @ 0.45 alpha), depth-
tested but depth-write off so the corner gizmo + labels still sit
on top.
- WgpuViewportWindow.pickMeshLocalAt: reuses pickSurfaceAt for the
world hit, then inverts the instance's composed transform to express
it in mesh-local space — what the BFS needs. Uses the live map key
(`mid`) rather than InstanceCpu.model_id, which is whatever the GL
streamer wrote at sidecar-write time and goes stale across sessions.
- WgpuViewportWindow.readbackMeshTriangles: CPU mesh shadow lookup.
The shadow itself is populated during the same dequant pass that
computes mesh-local volume — applyCachedModel for full loads and
applyStreamedChunk for streaming, so the BFS has data the moment
the user can pick it.
WgpuModelGpuData gains a MeshTriangles vector indexed by mesh_id;
doubles per-vertex CPU memory (12 B/vert) but skips wgpu mapAsync
plumbing for now. Bounds-check at pick time gracefully no-ops when a
stale sidecar field is out of range.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>