From d7135761c9d902142e3ac7a038dae1118ebc6530 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Thu, 4 Jun 2026 10:56:42 +0300 Subject: [PATCH] fix(trim): draw polyline trim preview in the world XY plane (#54) The trim/extend preview wire for an LwPolyline placed each vertex at [x, elevation, y] (the old Y-up swap), so the highlighted boundary was drawn in the wrong plane. Use [x, y, elevation] to match the entity render and the rest of the now-XY commands. (The remaining axis swaps live in the 3D revolve / truck B-rep pipeline, which is a separate, internally-consistent Y-up subsystem.) Co-Authored-By: Claude Opus 4.8 --- src/modules/home/modify/trim.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/home/modify/trim.rs b/src/modules/home/modify/trim.rs index 45d627732..2a6dff7a4 100644 --- a/src/modules/home/modify/trim.rs +++ b/src/modules/home/modify/trim.rs @@ -1771,8 +1771,8 @@ fn entity_pts(e: &EntityType) -> Vec<[f32; 3]> { for i in 0..seg_count { let v0 = &p.vertices[i]; let v1 = &p.vertices[(i + 1) % n]; - pts.push([v0.location.x as f32, elev, v0.location.y as f32]); - pts.push([v1.location.x as f32, elev, v1.location.y as f32]); + pts.push([v0.location.x as f32, v0.location.y as f32, elev]); + pts.push([v1.location.x as f32, v1.location.y as f32, elev]); } pts }