From 743dc1026ddd7d92e6527b87470eafc742aedcca Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Fri, 17 Jul 2026 02:58:59 +0300 Subject: [PATCH] fix(linetype): route placeholder-complex linetypes to the dash path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A linetype element can carry a `complex` record with no renderable content (shape #0, null style handle, zero scale) — some DWGs store plain dash elements that way (e.g. ISO03W100 "ISO dash space"). document_complex_lt treated any `complex.is_some()` as complex and sent the entity down the CPU apply_along path, which skips the GPU dash shader and its A-type endpoint alignment. Gate on *renderable* content (non-empty text, or a shape with a real shape-file handle) so these fall through to resolve_pattern and dash on the GPU with proper A-type alignment. Co-Authored-By: Claude Opus 4.8 --- src/io/linetypes.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/io/linetypes.rs b/src/io/linetypes.rs index b5f004f62..51fe535a8 100644 --- a/src/io/linetypes.rs +++ b/src/io/linetypes.rs @@ -153,7 +153,20 @@ pub fn document_complex_lt(document: &CadDocument, name: &str) -> Option !text.trim().is_empty(), + LineTypeComplexContent::Shape { .. } => !cx.style_handle.is_null(), + }) + }); + if !has_real_complex { return None; } document_lt_segments(document, name)