Skip to content

OpenSKP 0.4.0

Choose a tag to compare

@granroth granroth released this 28 Sep 16:18
· 30 commits to main since this release

OpenSKP reads the SketchUp 2026 container, the format every current SketchUp release saves, and treats it as the primary target. The 2017 format stays fully supported, and both readers produce the same Model.

SketchUp 2026 files

  • Model::parse opens 2026 files: a ZIP container whose model.dat is a tree of u16 tag | u32 length | payload records, with XML materials beside their textures. docs/SKP_FORMAT.md §16 specifies it, decoded clean-room against 72 pairs of 2017 files and their 2026 saves.
  • Every 2017 corpus file has a 2026 twin, and each twin reads equivalent to its original in geometry, materials, layers, UVs, scenes, guides and document settings. The third-party benchmark meets its COLLADA oracle in both containers.
  • A damaged record no longer fails the file. The reader keeps everything before the damage and records the loss as Diagnostic::Skipped; record tags it does not know are reported instead of dropped. Buffers are reserved fallibly, so an oversized model returns an error instead of aborting.
  • One runtime dependency, miniz_oxide, for DEFLATE.

Typed document settings

Camera, rendering options, shadows, units, styles and watermarks, fonts, texts, dimensions, axes, text and dimension defaults, animation and geo-location are typed fields on Model on both paths. Scenes carry their saved parts instead of names only. See docs/SDK.md.

The 2017 walk

  • Production-scale models, up to a 464 MB furnished house, read on the continuous walk. A store-map slot shrank from 256 to 64 bytes, and map growth is fallible. An opt-in test (OPENSKP_EXTERNAL_MODELS) checks local third-party files.
  • A mis-sized construction point or section plane could silently drop every root entity after it. Both bodies are now sized exactly, and the walk requires the root tail where the root list ends.

Breaking changes

  • Container gains Zip, and Model::parse returns a model for 2026 files instead of an error.
  • Model::format_guid is Model::model_guid: Option<String> (JSON key model_guid); header_info returns an optional GUID.
  • Model::scenes is Vec<Scene>.
  • New public fields: Instance and PlacedInstance carry pid and slot, GeometryRun gains sections, Scene gains hidden_layers, Guide gains def_index.