From 3c414f43a31441291e3a10512119a544fb2b0fc9 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Sat, 2 May 2026 17:18:54 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20apply=20OCS=E2=86=92WCS=20transform=20f?= =?UTF-8?q?or=20Point=20entity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- src/entities/point.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/entities/point.rs b/src/entities/point.rs index 77590049f..18b317420 100644 --- a/src/entities/point.rs +++ b/src/entities/point.rs @@ -10,8 +10,13 @@ use crate::scene::object::{GripApply, GripDef, PropSection}; use crate::scene::wire_model::SnapHint; fn to_truck(pt: &Point) -> TruckEntity { - let p = Point3::new(pt.location.x, pt.location.y, pt.location.z); - let snap = Vec3::new(p.x as f32, p.y as f32, p.z as f32); + let normal = (pt.normal.x, pt.normal.y, pt.normal.z); + let (wx, wy, wz) = crate::scene::transform::ocs_point_to_wcs( + (pt.location.x, pt.location.y, pt.location.z), + normal, + ); + let p = Point3::new(wx, wy, wz); + let snap = Vec3::new(wx as f32, wy as f32, wz as f32); TruckEntity { object: TruckObject::Point(builder::vertex(p)), snap_pts: vec![(snap, SnapHint::Node)],