v0.6.1 — Renderer-backed per-triangle highlight overlay
Adopts the renderer-backed per-triangle highlight overlay shipped in OCCTSwiftViewport v0.55.1 — closes #25. The v0.1 cheap-route normal-offset overlay is gone; InteractiveContext.updateSelectionVisuals now writes per-triangle TriangleStyle entries directly into the source body's triangleStyles array.
Behaviour changes (no public API change)
- Face-level selection no longer spawns
ais.overlay.sel.<UUID>overlay bodies. The renderer composites the highlight in a dedicated pass withdepthCompareFunction = .lessEqual— no more silhouette flicker, no more body-count blow-up on multi-face selection. ctx.bodiescount after a face selection is now N (just source bodies), not 2N (source + overlay) as in v0.1 → v0.6. Consumers asserting body counts will see this drop.setHighlightStylerewritestriangleStylesin place.display()no longer needs the "keep overlays trailing" pass.
Removed
InteractiveContext.makeFaceOverlay(...)andcomputeOverlayEpsilon(...)static helpers.overlayBodyIDs: Set<String>private state.
Tools v0.4.1 coordination
OCCTSwiftTools v0.4.1 (between v0.6.0 and this release) populates body.vertices from polyline endpoints and leaves vertexIndices empty. AIS overrides both with shape.vertices() source-vertex positions so a vertex pick's primitiveIndex round-trips to a TopoDS_Vertex via Selection.vertices (shape.vertex(at: idx)). Tracked as OCCTSwiftTools#10 — once the conventions converge the AIS-side override drops.
Tests
HighlightOverlay suite renamed to FaceHighlight and rewritten in place. All assertions now check body.triangleStyles rather than overlay-body presence:
- highlighted triangles match the selected face
- no
ais.overlay.*bodies spawn - multi-face / multi-body selections write styles on the right source bodies
clearSelectionemptiestriangleStylessetHighlightStyleupdates colors live
Total: 146 across 12 suites (count unchanged; tests rewritten not added). Run with OCCT_SERIAL=1 swift test --parallel --num-workers 1.
Dependencies
Transitively pulls OCCTSwiftViewport ≥ 0.55.1 via OCCTSwiftTools ≥ 0.4.0; SPM resolves to the latest available.