DGN underlays: global origin, stored extents, colour table display, 3D cells

- V8 models are placed relative to their global origin (model header).
- A V8 model's extent is the union of its elements' stored ranges; a V7
  model's text box is one text height tall.
- Files without a colour table use the standard DGN default table; colour
  255 is read from the table's background entry.
- Colours from a file's colour table follow the background: near-white
  colours swap with it, and over non-black backgrounds some shades drop a
  step.
- DGN contrast pulls towards a pivot taken from the model's own colours,
  after the fade, which is blended into the background first.
- Shared cells are read through their full 3D placement, so tilted
  instances and 3D definitions are drawn in plan.
- Deleted V8 elements are skipped; lines along the model's extent stay in
  the raster.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
ramox81andClaude Opus 5.5 committed 2026-09-29 11:58:47 +03:00
1 parent 07f25f4bca
commit f7106c7d30
8 files changed
+433 -154

No files matched your search

+2 -1
View File
@@ -146,7 +146,8 @@ pub fn item_thumbs(kind: codec::entities::UnderlayType, path: &str) -> Vec<PageT
.unwrap_or_default()
.into_iter()
.map(|label| {
let image = underlay_vector::display_raster(kind, path, &label, &[], 220.0)
let backdrop = underlay_vector::Backdrop { max_channel: 0, light: false };
let image = underlay_vector::display_raster(kind, path, &label, &[], 220.0, backdrop)
.map(|page| image::Handle::from_rgba(page.width, page.height, page.pixels.to_vec()));
PageThumb { label, image }
})