From e6e8167b361e8c4f57c97f06991e72a18510872a Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Thu, 25 Jun 2026 15:39:12 +0300 Subject: [PATCH] feat(render): boost model-space lineweight display for legibility (#147) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lineweights were rendered at their true physical size (mm × 96/25.4 px), which is ~2 px for a 0.5 mm line — too timid to tell weights apart, and every weight ≤ 0.25 mm floored to 1 px (no visible difference). Other DWG editors display model-space lineweights larger than true size for screen legibility; apply the same 2× boost so weights are pronounced and distinguishable. Co-Authored-By: Claude Opus 4.8 --- src/scene/view/render.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/scene/view/render.rs b/src/scene/view/render.rs index dc6b74c4e..afd725e3f 100644 --- a/src/scene/view/render.rs +++ b/src/scene/view/render.rs @@ -523,9 +523,16 @@ pub(in crate::scene) fn render_style_for( _ => ew, }; const MM_TO_PX: f32 = 96.0 / 25.4; + // CAD apps display model-space lineweights larger than their true + // physical size so the gradations stay legible on screen — at true + // scale a 0.5 mm line is ~2 px and is indistinguishable from thinner + // weights (which all floor to 1 px). Apply the same legibility boost so + // weights are pronounced and tell apart, matching other DWG editors. + // (#147) + const LWT_DISPLAY_BOOST: f32 = 2.0; resolved .millimeters() - .map(|mm| (mm as f32 * MM_TO_PX).max(1.0)) + .map(|mm| (mm as f32 * MM_TO_PX * LWT_DISPLAY_BOOST).max(1.0)) .unwrap_or(1.0) };