From 958c06ffe03ab550aacdeef7e033613c119709f3 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Sat, 18 Jul 2026 15:16:11 +0300 Subject: [PATCH] fix(dimension): don't draw a dimension's Defpoints markers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A dimension's definition points are baked into its *D block as POINT entities on the Defpoints layer. AutoCAD treats them as grip markers and never draws them, but OCS rendered them through the baked-block path as PDMODE glyphs (a vertical tick with the drawing's PDMODE 4 / PDSIZE). Two of them sit on the measured geometry at each extension line's foot, so the tick read as the extension line running past the geometry — the lines looked too long. Skip POINT sub-entities when rendering a dimension's baked block; only its lines, arrowhead blocks and text are geometry. Co-Authored-By: Claude Opus 4.8 --- src/scene/convert/tess.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/scene/convert/tess.rs b/src/scene/convert/tess.rs index 310b0c385..6c629383e 100644 --- a/src/scene/convert/tess.rs +++ b/src/scene/convert/tess.rs @@ -291,6 +291,15 @@ pub(crate) fn tessellate_entity( let Some(sub) = document.get_entity(eh) else { continue; }; + // A dimension's definition points are baked into the + // block as POINTs on the Defpoints layer. AutoCAD never + // draws them as PDMODE glyphs — they're grip markers, not + // geometry — so rendering them adds a stray tick at each + // measured point that makes the extension lines look like + // they run past the geometry. Skip them. + if matches!(sub, EntityType::Point(_)) { + continue; + } // Sub-entities inside *D### / DIMBLOCK## blocks // typically use ByBlock color/linetype/lineweight — // they should inherit from the Dimension entity.