Skip to content

v0.5.1 — remove duplicate ShapeMeasurements after OCCTSwift kernel hoist

Choose a tag to compare

@gsdali gsdali released this 06 May 05:13
· 16 commits to main since this release
0d330bc

Removes the duplicate ShapeMeasurements type after the OCCTSwift kernel hoist landed in OCCTSwift v0.170.1 (PR gsdali/OCCTSwift#163). Closes #13.

No public API change

ShapeMeasurements and Shape.measure(linearTolerance:) still resolve at every existing call site — they now come from OCCTSwift instead of OCCTSwiftTools. CADFileLoader.shapeToBodyAndMetadata(includeMeasurements: true) continues to populate CADBodyMetadata.measurements exactly as before; the field's type is now the kernel-side ShapeMeasurements, identical in shape and behaviour to the previous Tools-side type.

What changed

  • Deleted Sources/OCCTSwiftTools/ShapeMeasurements.swift (84 lines).
  • Trimmed Tests/OCCTSwiftToolsTests/ShapeMeasurementsTests.swift to the single Tools-specific case (t_metadataIncludesMeasurementsWhenRequested, which exercises CADFileLoader.shapeToBodyAndMetadata). The 5 numeric correctness cases (box totals, centroids, cap-on-axis) live in the OCCTSwift kernel suite as of #163.
  • Refreshed SPEC.md and docs/CHANGELOG.md.

Net: 5 files changed, +20 / −211.

Dependencies

  • OCCTSwift0.170.1 (was 0.168.0) — required for the kernel-side ShapeMeasurements type. The xcframework binary is unchanged from v0.170.0, so SPM consumers don't re-download.
  • OCCTSwiftViewport0.55.0 — unchanged.

Consumer migration (optional)

Consumers (e.g. OCCTSwiftAIS) can drop the OCCTSwiftTools import for ShapeMeasurements and import it directly from OCCTSwift instead — no longer pulling in the Tools+Viewport graph just for the measurement type. Existing code that already imports both keeps working unchanged.