v0.170.1 — ShapeMeasurements kernel hoist + OCCTBridge.mm split complete
Highlights
ShapeMeasurements moved to the kernel (#100, PR #163)
ShapeMeasurements (per-face areas / centroids / perimeters + per-edge lengths) and Shape.measure(linearTolerance:) are now part of OCCTSwift itself, no longer requiring a dependency on OCCTSwiftTools. Pure Swift relocation — no bridge changes.
import OCCTSwift
let m = box.measure()
m.totalFaceArea // sum of all face areas
m.faceCentroids[i] // SIMD3<Double> per face
m.facePerimeters[i] // outer-wire length per face
m.edgeLengths[i] // arc length per edgeOCCTSwiftTools consumers continue to work unchanged until that repo bumps its OCCTSwift dependency and removes its duplicate copy (OCCTSwiftTools#13).
OCCTBridge.mm split — DONE (#99, PRs #160-#162)
The monolithic OCCTBridge.mm is now 393 lines of pure foundation (header includes, global mutex, OCCTSewing struct, Internal.h import) — down from 58,168 lines pre-split (−99.3%). All 4,281 operations live in 15 per-OCCT-module translation units:
OCCTBridge_AIS.mm
OCCTBridge_BRepGraph.mm
OCCTBridge_Curve3D.mm
OCCTBridge_Document.mm
OCCTBridge_Geom2d.mm
OCCTBridge_Healing.mm
OCCTBridge_IO.mm
OCCTBridge_Mesh.mm
OCCTBridge_Modeling.mm
OCCTBridge_ProjLib_NLPlate.mm
OCCTBridge_Properties.mm
OCCTBridge_Spatial.mm
OCCTBridge_Surface.mm
OCCTBridge_Topology.mm
OCCTBridge_Visualization.mm
Net-zero behavior change throughout; public C surface unchanged.
Compatibility
- The xcframework binary is identical to v0.170.0 (no OCCT changes), so
Package.swiftcontinues to point to the v0.170.0 binary URL. SPM consumers can bump fromv0.170.0tov0.170.1with no rebuild needed. - All 3,399 tests across 1,179 suites pass on the per-module structure.
Stats
4,281 wrapped operations | 3,399 tests | 1,179 suites | macOS / iOS / visionOS / tvOS | OCCT 8.0.0-beta2