DWF/DGN underlays: draw content as vector wires

A DWF sheet or DGN model is drawn as world-space wires (one line wire per
colour and width, one fill wire per colour) instead of a raster rescaled
to the view, so it stays sharp while zooming instead of showing pixels
until the raster is made again. Colours go through the colour table
mapping, contrast, fade and monochrome; clip boundaries clip the wires.
The wires are drawn and plotted but neither picked nor snapped; the
underlay's own snap geometry still serves object snaps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ramox81andClaude Opus 5.5 committed 2026-09-29 12:43:20 +03:00
1 parent be023142de
commit 507a6ab43c
8 files changed
+310 -100

No files matched your search

+8 -2
View File
@@ -506,8 +506,9 @@ pub struct WireModel {
pub depth_override: Option<f32>,
/// Whether this wire is drawn in the normal viewport pass.
pub display_visible: bool,
/// Geometry that only object snaps use (the content of an underlay):
/// never drawn, plotted or picked.
/// Geometry that is never picked: the content of an underlay. Hidden
/// (`display_visible` false) it is what object snaps find; drawn, it is
/// display only and snaps skip it too ([`Self::is_display_only`]).
pub snap_only: bool,
/// Whether this wire is included in plotted output.
pub plot_visible: bool,
@@ -531,6 +532,11 @@ impl WireModel {
pub const SELECTED: [f32; 4] = [0.15, 0.55, 1.00, 1.0];
/// Rollover (hover) highlight — orange, distinct from the blue selection.
pub const HOVER: [f32; 4] = [0.95, 0.55, 0.10, 1.0];
/// Drawn underlay content: shown and plotted, never picked or snapped.
pub fn is_display_only(&self) -> bool {
self.snap_only && self.display_visible
}
/// Sentinel AABB that never rejects any snap query.
pub const UNBOUNDED_AABB: [f32; 4] = [
f32::NEG_INFINITY,