From f01e4f69bec7f1493253c6cb39cbd2dacfa646b9 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Tue, 31 Mar 2026 13:17:42 +0300 Subject: [PATCH] Fix: viewport line weights no longer scale with viewport zoom line_weight_px was multiplied by the viewport scale factor, making lines near-invisible at small scales (e.g. 1:100) and overly thick at large scales (e.g. 5:1). Line weights represent physical pen widths on the plotted sheet and must be constant regardless of viewport scale. Co-Authored-By: Claude Sonnet 4.6 --- src/scene/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scene/mod.rs b/src/scene/mod.rs index 964415cab..1b8467dfd 100644 --- a/src/scene/mod.rs +++ b/src/scene/mod.rs @@ -707,8 +707,8 @@ impl Scene { let mut out = wire.clone(); out.points = clipped; out.color = [r * 0.80, g * 0.80, b * 0.80, a * 0.85]; - // Scale line weight proportionally for correct visual thickness. - out.line_weight_px = wire.line_weight_px * scale; + // Line weights are paper-space pen widths — independent of viewport scale. + out.line_weight_px = wire.line_weight_px; result.push(out); } }