feat(snap): editable Snap X/Y spacing with Equal lock, grid snap locks

Drafting Settings dialog gets text inputs for Snap X/Y spacing plus a working Equal X and Y checkbox (mirrored inputs, Y follows X on apply). Snapper gains fixed snap_spacing_x/y (persisted in UserSettings, default 10) decoupled from the adaptive visible-grid step. Grid snap no longer aperture-gated: with Snap On it rounds every point to the grid, object snaps still override by tier. Adds parse/lock regression tests.
This commit is contained in:
Karim Jerbi committed 2026-09-16 11:39:38 +01:00
1 parent 1057790456
commit 624fe53382
8 files changed
+238 -36

No files matched your search

+3 -1
View File
@@ -1928,7 +1928,9 @@ impl OpenCADStudio {
)
}
};
// Sync grid-snap spacing to the adaptive spacing of the visible grid.
// Sync the adaptive visible-grid step. It drives display and
// snap-aperture tolerances — grid *snap* itself locks to the
// fixed SNAPUNIT X/Y spacing from the Drafting Settings dialog.
self.snapper.grid_spacing = grid_spacing;
// Cursor and wires are model-space; the snap result is model.
let snap_cursor = cursor_world;