v0.4.1 — AIS edge + vertex picking wired through
Wires AIS edge + vertex GPU picking through. OCCTSwiftViewport v0.55.0 added the renderer-side edge/vertex pick pipelines (viewport#24), but their body.edgeIndices / body.vertices gates meant our bodies showed up as face-pickable only. Closes #8.
What changed
CADFileLoader.shapeToBodyAndMetadata now populates the three new ViewportBody fields on every body it produces:
edgeIndices— flattened frommetadata.edgePolylinesvia a new privateflattenEdgeIndices(_:)helper. A polyline of N points contributes (N − 1) line segments, each tagged with the source edge's index — matching the renderer's flattened-line layout. Picked segment →TopoDS_Edge.vertices— the deduplicated edge endpoints (same data asmetadata.vertices).vertexIndices— left empty. The renderer treats empty as identity (the pick result'sprimitiveIndexis the vertex index directly).
No public API surface change. Existing call sites get the new pick fields populated with no opt-in required.
Dependency floor
OCCTSwiftViewport≥ 0.55.0 (was 0.51.0) — required for the newedgeIndices/vertices/vertexIndicesparameters onViewportBody.init.OCCTSwift≥0.168.0— unchanged.
Test invocation
OCCT_SERIAL=1 swift test --parallel --num-workers 1Suite: 33 → 35 across 8 suites (+2 new in CADFileLoaderTests: edge-index round-trip and vertex-pick wiring).
Installation
.package(url: "https://github.com/gsdali/OCCTSwiftTools.git", from: "0.4.1"),