Skip to content

v0.2.0 — ML-export hoist from OCCTSwift kernel

Choose a tag to compare

@gsdali gsdali released this 08 May 07:45
· 9 commits to main since this release

v0.2.0 — ML-export hoist from OCCTSwift kernel

ML-export hoist from OCCTSwift per #1 (supersedes OCCTSwift#71). The consumption-side ML repacking layer added to OCCTSwift in v0.136.0 — pure batch / headless workflow, no Viewport — fits this package's charter, so it lives here now.

New public API

OCCTSwift.TopologyGraph extension:

  • struct GraphExport — flat vertex positions + per-edge boundary/manifold flags + COO-format face/edge/vertex incidence + face-to-face adjacency.
  • func exportForML() -> GraphExport — build the export from a TopologyGraph.
  • func exportJSON() -> Data? — JSON serialization for ML pipelines.

What did not move (and why)

  • FaceGridSample / sampleFaceUVGrid(faceIndex:uSamples:vSamples:) stay in OCCTSwift. Their implementation calls OCCTBRepGraphSampleFaceUVGrid on TopologyGraph.handle, which is internal to the OCCTSwift module — lifting them would require widening kernel visibility, which the partial-lift decision on issue #1 rules out as out-of-scope.
  • sampleEdgeCurve(edgeIndex:count:) similarly stays — same handle constraint.

Breaking change for OCCTSwift consumers

TopologyGraph.exportForML / exportJSON have been deleted from OCCTSwift v0.171.0. Direct callers must now import OCCTSwiftIO in addition to import OCCTSwift. Symbol resolution otherwise unchanged. Known callers swept: OCCTSwiftScripts/Sources/occtkit/Commands/GraphML.swift, OCCTSwiftScripts/Sources/GraphML/main.swift.

Dependencies

OCCTSwift0.171.0 (the kernel release that ships the matching deletion).