Skip to content

Read framed RVT partitions through scratch storage - #308

Draft
mahach666 wants to merge 56 commits into
mainfrom
codex/rvt-segment-spooling
Draft

mahach666 wants to merge 56 commits into
mainfrom
codex/rvt-segment-spooling

Conversation

@mahach666

@mahach666 mahach666 commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #38.

  • Read and validate framed RVT partitions in bounded windows with 64-bit offsets. Keep inflated data, translated records, and deferred geometry ranges in the caller-owned scratch stream.

  • Page resolved parameter maps, editable parameter lists, large element reference lists, decoded faces, and triangle buffers. Keep read-only type binding from loading mutable lists across the whole model. Store the first type references and zero-ID candidate categories with each archived parameter list to avoid repeated reads. Reuse parameter storage across resolution passes and allocate drawing, stair, wall, MEP, room, type-reference, curve-driver, and placement fields only where needed. Read replayed records by exact scratch range and release parsing tables after their resolved values are attached.

  • Reuse geometry ranges from the anchored walk when resolving walls. Report recovery, resolution, and drawable-element mesh counts at their respective stages.

  • Reuse the decoded face frame when restoring geometry, share empty parameter sequences in the paged path, and format the Revit UniqueId from stored creation history when an element is mapped into the scene.

Validation

  • CI passed on Windows, Linux, and macOS. The Linux job passed 12,002 .NET 8 tests and 12,006 .NET 10 tests, with 456 skips per target. A separate run with verified Revit 2022 and 2025 files passed 137 focused tests with 11 opt-in skips, including exact scene JSON and diagnostic comparisons between resident and scratch reads.
  • Chromium rendered 7,565 instances and 1,495,077 triangles for the engineering sample in the paged viewer. Scene composition, properties, and diagnostics matched the native .NET 11 reading. Model data stayed in the browser.
  • Chromium opened a 10.01 GiB CFB container and rendered 731 instances. The extended container preserves the original small RVT scene and exercises large offsets.
  • A large real model completed through WebGL in Chromium using a diagnostic AOT runtime profile, with scene composition, properties and diagnostics matching scratch-backed native reading. Model data stayed in the browser. The latest kernel commit also passed the browser run with the same native parity. The reproducible AOT website build completed the same model through WebGL with matching native scene counts and diagnostics. A separate real model also opened in Chromium with matching scene composition, properties, and diagnostics.
  • The allocation follow-up passed 87 focused tests, including exact scene comparisons with verified models, with six opt-in skips. Five additional boundary cases passed. With opt-in fixtures enabled, the compact property-count test reported the same mismatch on the PR base and the branch.
  • The change to optional MEP, room, and type-reference fields passed 663 focused tests, with six opt-in skips. The tests cover separate field replacement on cloned elements and exact paged versus resident scenes.
  • The curve-driver and placement change passed 299 focused tests with one opt-in skip. The tests cover preserved coordinates, resolved parameter values and independent replacement of saved placement facts in copied elements.
  • The property write-back follow-up passed 12,027 .NET 8 tests and 12,031 .NET 10 tests, with 452 opt-in skips per target. Tests cover persisted and derived curve lengths, sheet and room properties, detail curve flags, and cached type references with self-references. The public architectural RVT sample rendered in Chromium with matching composition and diagnostics.
  • The follow-up avoids replaying parameter pages for phase voting and host quantity checks, resolves IFC reference text without materializing editable lists, and checks available detail alternatives before replaying a geometry block. It passed 12,030 .NET 8 tests, 12,034 .NET 10 tests, and 196 focused tests with validated Revit 2022 and 2025 fixtures. Chromium rendered the public engineering sample with matching composition, property values, and diagnostics.
  • The native field edit pages keep pending changes off the managed heap until their category domains can be checked. The focused suite passed 150 tests, including cross-page value restoration, category domain decisions, and exact scene comparisons. The full suite passed 12,035 .NET 8 tests and 12,039 .NET 10 tests, with 452 opt-in skips per target. Native reading of the large real validation model preserved scene composition and diagnostics after paging the provisional edits.

mahach666 and others added 26 commits November 24, 2026 15:24
A geometry block replayed from scratch is an exact-size buffer. The plane, cylinder and cone readers read the envelope and orientation before checking that the block holds the surface, so a drifted block near its end raised ArgumentException instead of Stop. That skipped the resync and made the replay return fewer faces than the first decode. Check the length first.

This branch has not been deployed

No deployments
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.

1 participant