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 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-03-31 13:15:06 +03:00
commit a0596a14ff
2 changed files with 4 additions and 4 deletions

View file

@ -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,

View file

@ -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,