Skip to content

OpenSKP 0.4.1

Choose a tag to compare

@granroth granroth released this 29 Sep 00:58
· 29 commits to main since this release

A model can cut on a section plane without any scene recording it: each entity list keeps track of the plane currently cutting it. OpenSKP 0.4.1 reads that plane on both containers, so a consumer can tell the cutting plane from planes merely placed.

The active section plane

  • GeometryRun::active_section is the persistent id of the plane currently cutting that run's entity list, or None when no plane is active. It names one of the run's own sections. See docs/SDK.md.
  • 2026 container: every entity container records it (0x1394, present only while a plane is active), so definitions report their own active plane.
  • 2017 format: the root tail's first pointer, null in every file without a cut, is a back-reference to the active plane's store-map slot (docs/SKP_FORMAT.md §4). It is read for the root run; a definition's own active plane is not decoded on 2017 and reads None.
  • The 2017 marker was isolated with a new minimal pair, corpus/2017/section-plane-deactivated.skp: two planes whose records are byte-identical, the second one active. A section plane record carries no active flag.

Compatibility

  • GeometryRun gains the public field active_section. Code that only reads GeometryRun is unaffected; code that constructs it with a struct literal or destructures it exhaustively must add the field.
  • No other API, format, or dependency changes.