Skip to content

Expand typed DocumentSelection with common-only entities and V4 storage - #34

Merged
HakanSeven12 merged 1 commit into
HakanSeven12:mainfrom
BjornFidder:selection-generic
Dec 3, 2026
Merged

HakanSeven12 merged 1 commit into
HakanSeven12:mainfrom
BjornFidder:selection-generic

Conversation

@BjornFidder

@BjornFidder BjornFidder commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

DocumentSelection currently captures Line/MLINE through family-specific payloads. Add Point, Circle, Arc, Ellipse, LwPolyline, Spline, Ray and XLine using the existing EntityType model, with one owner/layer/linetype dependency description shared by capture, storage validation and reconstruction. The same explicit destination/resource API works for preservation and drawing-to-drawing transfer.

Add bounded V4 named-model storage (acadrust-leaf-1) with exact float64 bits, explicit Point display context and rejection of unknown/skipped fields. A recursive Serde read adapter requires named maps for structs (including nested vectors and struct variants), and float64 markers for f64 fields; it rejects lossy integer coercion without a geometry Value tree. Legacy-only selections keep their minimum V1/V2/V3 format. Reconstruction retains owner-local coordinates, applies WCS-aware translations and blocks invalid geometry or mismatched Point display without mutating the target globally.

Physical DWG/DXF regressions cover all ten root kinds plus a fit-only Spline across model space, two paper layouts and nested local blocks. Moving/rotating one outer INSERT between capture and restoration preserves both current placements. Sparse draw order and atomic late failure remain covered. DXF may add derived controls to a fit-only Spline; original fit points are checked. Dual-definition and nondefault Spline metadata have exact typed-storage evidence, not blanket physical-writer qualification.

The pinned codec lacks a handle census for Spline/Ray/XLine. A private compatibility projection inventories their unchanged common state through the existing census and restores the exact original entity images; exhaustive guards qualify the geometry as handle-free. Tests protect dangling endpoints above 2^53 and ensure unqualified graphics still fail without consuming allocator state. No dependency pin or codec source patch is required. Resource-name inventory now qualifies the eight common-only families too: existing custom MLINE preservation can restore beside Circle, while its blocked-edit/reopen regression still checks an unqualified carrier.

This adds a SelectionPayload variant and SelectionContext field, so downstream exhaustive matches/struct literals need review. Ray/XLine IFCCAD adapter integration, new native entities, complex linetypes and additional entity/resource families are separate work. A small equivalent table-margin initializer change clears a pre-existing strict Clippy lint.

No release or Explorer deployment is included.

Validation on main ca0913f / codec c978b989, commit d950e72:

  • Local formatting and strict workspace/all-target/all-feature Clippy pass, without lint suppression.
  • Local focused strict-reader/storage/DWG-DXF regressions and five native feature configurations pass. Both review findings have six permanent regressions.
  • GitHub CI passes the complete six-configuration native matrix on Ubuntu and both WASM library checks. Windows and macOS compatibility jobs are still running; their status remains visible in this PR.
  • The final local serde+mline-pilot command was not executed: both bounded shared-runner attempts expired due memory admission (the second used compilerjobs1). Local WASM checks for the updated pin were not run either. External CI supplies those missing checks; no local CPU/RAM limits were bypassed.

The selected model/type/census surface is unchanged across the upstream codec update (103 source files compared), so model_schema remains acadrust-leaf-1. No dependency source patch, native IFCCAD contract update, release or Explorer deployment is included.

@BjornFidder
BjornFidder marked this pull request as ready for review November 30, 2026 13:46
@HakanSeven12
HakanSeven12 merged commit 0d47ecd into HakanSeven12:main Dec 3, 2026
4 checks passed
@HakanSeven12

Copy link
Copy Markdown
Owner

Thanks, merged in 0d47ecd. Follow-up in 215ad71: instead of swapping Spline/Ray/XLine for Point stand-ins during the census, the codec now inspects those three itself (hakanaktt/acadrust 44f4cfc0), so reservation.rs is gone and reconstruction calls try_reserve_handles directly. The full suite passes with --all-features.


🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants