From 4e80afb0da696863ee1a93e1fb38148a899d2535 Mon Sep 17 00:00:00 2001 From: ramox81 <184937705+ramox81@users.noreply.github.com> Date: Mon, 24 Aug 2026 18:04:01 +0300 Subject: [PATCH] Show effective ring segment widths --- src/entities/lwpolyline.rs | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/entities/lwpolyline.rs b/src/entities/lwpolyline.rs index e51bc8bb8..467d5cb72 100644 --- a/src/entities/lwpolyline.rs +++ b/src/entities/lwpolyline.rs @@ -852,8 +852,24 @@ fn properties(pline: &LwPolyline) -> Vec { let v = pline.vertices.get(vi); let vx = v.map_or(0.0, |v| v.location.x); let vy = v.map_or(0.0, |v| v.location.y); - let start_w = v.map_or(0.0, |v| v.start_width); - let end_w = v.map_or(0.0, |v| v.end_width); + // A constant width is the effective width of every segment whose + // per-vertex value is not overridden. Showing the raw zero stored on + // those vertices made wide polylines (notably rings) claim that their + // visible segment width was zero even though the global width was active. + let start_w = v.map_or(0.0, |v| { + if v.start_width.abs() > 1.0e-12 { + v.start_width + } else { + pline.constant_width + } + }); + let end_w = v.map_or(0.0, |v| { + if v.end_width.abs() > 1.0e-12 { + v.end_width + } else { + pline.constant_width + } + }); let mp = ::mass_props(pline); let cloud_arc_length = revision_cloud_arc_length(pline); let vertex_label = if n == 0 {