From 5fa93b9cb094d40e9df443e7267288587161741e Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Fri, 12 Jun 2026 00:04:55 +0300 Subject: [PATCH] fix(solid3d): stop drawing a placeholder line beside modeler solids MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Solid3D / Region / Body have no truck wire conversion, so the wire path fell through to the generic fallback, which returns a 1-unit placeholder segment at the origin — a stray little line next to every 3D solid. Give these types their own fallback that emits only the entity's pre-computed edge wires (empty for binary SAB) plus an insertion snap, never the placeholder. Co-Authored-By: Claude Opus 4.8 --- src/scene/tessellate.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/scene/tessellate.rs b/src/scene/tessellate.rs index f0be0a2f1..1fb839f1c 100644 --- a/src/scene/tessellate.rs +++ b/src/scene/tessellate.rs @@ -612,6 +612,23 @@ fn fallback_geometry(entity: &EntityType, world_offset: [f64; 3]) -> Geometry { EntityType::Insert(ins) => ins.fallback_geometry(world_offset), EntityType::Hatch(h) => h.fallback_geometry(world_offset), EntityType::Ole2Frame(ole) => ole.fallback_geometry(world_offset), + // Modeler solids render as meshes (solid3d_tess). Their wire path + // contributes only the pre-computed edge wires (empty for binary SAB) + // plus an insertion snap — never the placeholder segment below, which + // would otherwise draw a stray 1-unit line at the origin next to the + // solid. + EntityType::Solid3D(_) | EntityType::Region(_) | EntityType::Body(_) => { + let pts = solid_wire_fallback(entity, world_offset); + let mut snap = vec![]; + if let Some(p) = crate::entities::solid3d::point_of_reference(entity) { + let [ox, oy, oz] = world_offset; + snap.push(( + Vec3::new((p.x - ox) as f32, (p.y - oy) as f32, (p.z - oz) as f32), + SnapHint::Insertion, + )); + } + (pts, snap, vec![], vec![]) + } _ => { let s = 0.5_f32; (vec![[-s, 0.0, 0.0], [s, 0.0, 0.0]], vec![], vec![], vec![])