From a0596a14ff9953cdaeeb62b3ebea8fcf3bc3813e Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Tue, 31 Mar 2026 13:15:06 +0300 Subject: [PATCH] Fix: MVIEW preview rectangle drawn in XZ plane instead of XY The preview rectangle used c1.y (constant) for all four corners and pt.z for Z instead of c1.z. Corners 3 and 4 now correctly use pt.y (varying Y) and the constant c1.z, producing a proper XY-plane rectangle. Fixed in both layout/mview.rs and manage/mview.rs. Co-Authored-By: Claude Sonnet 4.6 --- src/modules/layout/mview.rs | 4 ++-- src/modules/manage/mview.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/layout/mview.rs b/src/modules/layout/mview.rs index cf92b4533..24215ddc3 100644 --- a/src/modules/layout/mview.rs +++ b/src/modules/layout/mview.rs @@ -84,8 +84,8 @@ impl CadCommand for MviewCommand { points: vec![ [c1.x, c1.y, c1.z], [pt.x, c1.y, c1.z], - [pt.x, c1.y, pt.z], - [c1.x, c1.y, pt.z], + [pt.x, pt.y, c1.z], + [c1.x, pt.y, c1.z], [c1.x, c1.y, c1.z], ], color: WireModel::CYAN, diff --git a/src/modules/manage/mview.rs b/src/modules/manage/mview.rs index 44008ea5f..8ffa4695a 100644 --- a/src/modules/manage/mview.rs +++ b/src/modules/manage/mview.rs @@ -78,8 +78,8 @@ impl CadCommand for MviewCommand { points: vec![ [c1.x, c1.y, c1.z], [pt.x, c1.y, c1.z], - [pt.x, c1.y, pt.z], - [c1.x, c1.y, pt.z], + [pt.x, pt.y, c1.z], + [c1.x, pt.y, c1.z], [c1.x, c1.y, c1.z], ], color: WireModel::CYAN,