v0.5.0 — Source-shape vertex convention (closes #10)
Pre-1.0 behaviour change. Closes #10.
Converges ViewportBody.vertices / vertexIndices / CADBodyMetadata.vertices on the source-shape convention so AIS' Selection.vertices (and any other consumer) can round-trip a picked primitiveIndex back to a TopoDS_Vertex via shape.vertex(at: primitiveIndex). v0.4.1's polyline-endpoint convention rendered the same number of points for typical solids but in a different order, breaking that round-trip.
What changed at runtime
body.verticesis nowshape.vertices()Float-converted (was: deduplicated polyline endpoints).body.vertexIndicesis now the explicit identity array[0, 1, …, n-1](was: empty, treated as identity by the renderer). Belt-and-braces against future renderer changes that drop the empty-as-identity interpretation.CADBodyMetadata.verticesaligned to the same source — single source of truth.
No public API signature changes. The init shapes are unchanged; what's different is what populates them.
AIS coordination
No breakage window. AIS v0.6.1 currently overrides body.vertices and body.vertexIndices itself in InteractiveContext.display(_:) to fix the round-trip. Once consumers upgrade to OCCTSwiftTools v0.5.0, AIS can drop that override — both sides will be writing identical data, so the transition is non-breaking.
Internal cleanup
Dropped the private deduplicateVertices(from:) helper (dead code post-convergence).
Dependencies (unchanged)
OCCTSwift≥0.168.0OCCTSwiftViewport≥0.55.0
Test invocation
OCCT_SERIAL=1 swift test --parallel --num-workers 135 tests across 8 suites, all green.
Installation
.package(url: "https://github.com/gsdali/OCCTSwiftTools.git", from: "0.5.0"),