v0.2.0 — ML-export hoist from OCCTSwift kernel
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 aTopologyGraph.func exportJSON() -> Data?— JSON serialization for ML pipelines.
What did not move (and why)
FaceGridSample/sampleFaceUVGrid(faceIndex:uSamples:vSamples:)stay in OCCTSwift. Their implementation callsOCCTBRepGraphSampleFaceUVGridonTopologyGraph.handle, which isinternalto 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 — samehandleconstraint.
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
OCCTSwift ≥ 0.171.0 (the kernel release that ships the matching deletion).