forked from 1b-agent/opencadstudio-upstream
feat(snap): independent 3D object-snap system with six modes
Grid snap locks to SNAPUNIT instead of magnetizing; snapped 3D points keep elevation instead of flattening to z=0. New SnapTypes Vertex/EdgeMidpoint/FaceCenter/Knot/FacePerpendicular/NearestFace with their own F4 master toggle and mode set, tiers, and markers, fully independent of the 2D master. Solid B-rep corners/edge-midpoints/face-centers from mesh edges and kernel faces, spline knot points, and live perpendicular/nearest-to-face on mesh triangles merged priority-aware in move/click paths. Drafting Settings 3D Object Snap tab is fully live (was dead placeholders); Nearest-to-face off by default. TDD: behavioral LINE-to-solid tests plus engine/scene unit tests.
This commit is contained in:
1 parent
d894b8eb05
commit
ca0ee37d26
16 files changed
+1728
-67
No files matched your search
@@ -36,9 +36,9 @@ pub(crate) mod osnap {
|
||||
|
||||
/// Translate a live snap mode into the `AcDb::OsnapMode` we persist.
|
||||
///
|
||||
/// Modes with no ObjectARX equivalent (grid, object pick) map to
|
||||
/// [`osnap::NONE`]; a reference carrying `NONE` resolves by marker/parameter
|
||||
/// alone.
|
||||
/// Modes with no ObjectARX equivalent (grid, object pick, 3D solid snaps) map
|
||||
/// to [`osnap::NONE`]; a reference carrying `NONE` resolves by
|
||||
/// marker/parameter alone.
|
||||
pub(crate) fn osnap_type_for(snap: crate::snap::SnapType) -> u8 {
|
||||
use crate::snap::SnapType as S;
|
||||
match snap {
|
||||
@@ -54,7 +54,9 @@ pub(crate) fn osnap_type_for(snap: crate::snap::SnapType) -> u8 {
|
||||
S::Nearest | S::Extension => osnap::NEAR,
|
||||
S::ApparentIntersection => osnap::APPARENT_INT,
|
||||
S::Parallel => osnap::PARA,
|
||||
S::Grid | S::ObjectPick => osnap::NONE,
|
||||
S::Grid | S::ObjectPick | S::Vertex | S::EdgeMidpoint | S::FaceCenter | S::Knot | S::FacePerpendicular | S::NearestFace => {
|
||||
osnap::NONE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user