forked from 1b-agent/opencadstudio-upstream
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:
1 parent
59a0f5239c
commit
87049967a2
6 files changed
+105
-22
No files matched your search
+10
-3
@@ -57,9 +57,16 @@ fn shape_marker(
|
||||
|
||||
impl TruckConvertible for Shape {
|
||||
fn to_truck(&self, _document: &acadrust::CadDocument) -> Option<TruckEntity> {
|
||||
let ox = self.insertion_point.x;
|
||||
let oy = self.insertion_point.y;
|
||||
let oz = self.insertion_point.z;
|
||||
// SHAPE insertion point is OCS (planar entity) — map through the
|
||||
// arbitrary axis so a mirrored shape's marker lands where it renders.
|
||||
let (ox, oy, oz) = crate::scene::view::transform::ocs_point_to_wcs(
|
||||
(
|
||||
self.insertion_point.x,
|
||||
self.insertion_point.y,
|
||||
self.insertion_point.z,
|
||||
),
|
||||
(self.normal.x, self.normal.y, self.normal.z),
|
||||
);
|
||||
let size = self.size.abs().max(0.5);
|
||||
|
||||
let snap_pt = glam::DVec3::new(ox, oy, oz);
|
||||
|
||||
Reference in new issue
Block a user