fix(render): close remaining OCS/WCS gaps for mirrored entities

Follow-up to the LINE/POINT WCS fix - the same bug class elsewhere:

- 2D SOLID rendered its OCS corners raw in both the wire path and the
  shared fill builder (solid_hatch_model); SHAPE placed its marker at
  the raw OCS insertion. Both now map through the arbitrary axis.
- Grips: central wrap in view/dispatch.rs shows planar entities' grips
  at their world position (OCS→WCS) and converts drags back (WCS→OCS
  via the new wcs_point_to_ocs) - per-entity grip code stays in raw
  field space, INSERT keeps handling its own OCS.
- Pulls acadrust 81ebfee: OCS-aware bounding boxes, translate,
  transform and mirror for the ten planar entity types, so MOVE /
  ROTATE / MIRROR and culling work on mirrored entities too.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Fable 5 committed 2026-07-21 17:58:09 +03:00
1 parent 59a0f5239c
commit 87049967a2
6 files changed
+105 -22

No files matched your search

+16
View File
@@ -134,6 +134,22 @@ pub fn ocs_point_to_wcs(ocs: (f64, f64, f64), normal: (f64, f64, f64)) -> (f64,
)
}
/// Inverse of [`ocs_point_to_wcs`]: express a WCS point (or direction — the
/// map is a pure rotation, so both use the same math) in the OCS frame of
/// `normal`. Used when writing user edits made in world space (grip drags)
/// back into a planar entity's OCS-stored coordinates.
#[inline]
pub fn wcs_point_to_ocs(wcs: (f64, f64, f64), normal: (f64, f64, f64)) -> (f64, f64, f64) {
let (ax, ay) = ocs_axes(normal);
let (wx, wy, wz) = wcs;
let (nx, ny, nz) = normal;
(
wx * ax.0 + wy * ax.1 + wz * ax.2,
wx * ay.0 + wy * ay.1 + wz * ay.2,
wx * nx + wy * ny + wz * nz,
)
}
#[cfg(test)]
mod mirror_delegation_tests {
use super::*;