Merge pull request #1606 from yztink/fix/ucs-face-selection

UCS FACE picks solid faces again; the UCS snaps to the nearest face corner with X along the nearest edge.
This commit is contained in:
Hakan Seven committed 2026-10-06 00:20:59 +03:00
commit 240eb0a95d
4 files changed
+223 -7

No files matched your search

+2 -7
View File
@@ -343,6 +343,7 @@ impl OpenCADStudio {
self.tabs[i].active_cmd = Some(Box::new(picker));
}
Some((handle, pick)) => {
self.tabs[i].scene.restore_solid_models(&[handle]);
let built = self.tabs[i]
.scene
.solid_models
@@ -351,13 +352,7 @@ impl OpenCADStudio {
use crate::scene::model::solid_model;
let face =
solid_model::nearest_planar_face(body, pick.to_array())?;
solid_model::planar_face_normal(body, face)
})
.and_then(|normal| {
super::super::helpers::ucs_from_normal(
pick,
glam::DVec3::from_array(normal),
)
solid_model::planar_face_ucs(body, face, pick.to_array())
});
match built {
Some(ucs) => {