v0.6.0 — split file-I/O concerns into OCCTSwiftIO
Splits file-I/O concerns into a new sibling package: OCCTSwiftIO v0.1.0 — depends on OCCTSwift only, no OCCTSwiftViewport. Closes #12.
Headless consumers (Scripts, PadCAM CLI, batch pipelines, server-side workflows) can now load CAD files without dragging in the Metal renderer transitively. Source compatibility preserved for existing Tools consumers via @_exported import OCCTSwiftIO.
What moved to OCCTSwiftIO
enum CADFileFormatenum ExportManager+enum ExportFormatstruct ScriptManifestfinal class ImportProgressClosurestruct CADBodyMetadata(pure-data picking metadata; no Viewport dep)- New:
enum ShapeLoader—load(from:format:progress:),loadRobust(...),loadFromManifest(at:)returningShapeLoadResult { shapesWithColors, dimensions, geomTolerances, datums, manifest }. NoViewportBody.
What stays here
CADFileLoader.shapeToBodyAndMetadata(...)— the bridge. Unchanged.CADFileLoader.load(...)— now a thin façade overOCCTSwiftIO.ShapeLoader.load(...)plus per-shape bridge. Same return type (CADLoadResultwithbodies: [ViewportBody]), same signature.CADFileLoader.loadFromManifest(...)— same façade pattern.CADLoadResult— couldn't move (hasbodies: [ViewportBody]).- Mesh parameter presets,
CurveConverter,SurfaceConverter,WireConverter,BodyUtilities. - STL/IGES robust-loader fallback path — bridge-aware (triggered by per-shape mesh-bridge failure), so it lives here.
Consumer migration
- Bridge users (AIS, CADKit, custom Metal viewers): no change.
import OCCTSwiftToolsworks as before;@_exportedre-exports IO so even directOCCTSwiftTools.ExportManageretc. references still resolve. - Headless users (Scripts, PadCAM CLI, batch tools): switch
import OCCTSwiftTools→import OCCTSwiftIOto drop the transitive Viewport dep.ShapeLoader.load(...)is the headless analogue ofCADFileLoader.load(...).CADLoadResulthas no IO equivalent (it carries[ViewportBody]); useShapeLoadResult.shapesWithColorsinstead.
Dependencies
- New:
OCCTSwiftIO≥0.1.0. OCCTSwift≥0.170.1— unchanged.OCCTSwiftViewport≥0.55.0— unchanged.
Stats
15 tests / 5 suites in this repo (was 29/8) — the moved test suites live in OCCTSwiftIO now (18/4 there, all green).
Sequencing toward 1.0.0
The issue's acceptance pins both packages at 1.0.0 against OCCT 8.0.0 GA (targeted 2026-05-07). Today's xcframework is OCCT 8.0.0-beta2. Tag both Tools and IO at 1.0.0 when OCCT 8.0.0 GA + OCCTSwift 1.0.0 land.