Guide sketch patterns with live previews and editable offsets (#966)

Sketch Mirror, rectangular and circular Pattern, and Offset now show a green live preview that follows the selection and settings; OK commits, Cancel leaves the sketch unchanged. The shared dialogs show the current selection step and source counts, sources can be toggled with Ctrl/Cmd-click, cleared and reselected.

Offsets keep editable driving distance dimensions (One Side, Two Sides, Symmetric) that update the derived curves without moving the source, with undo/redo and save/reopen. Format 19: older files keep their fixed offsets.

New dialog labels in en, zh, ja, de and ko.

Fixes #696. Fixes #517.
This commit is contained in:
Karl Von Richter authored and GitHub committed 2026-10-14 01:58:01 -04:00
1 parent 9c51f9d433
commit 47a7f29485
29 files changed
+1107 -186

No files matched your search

+4
View File
@@ -50,6 +50,10 @@ pub fn dim_frame(sk: &Sketch, k: &ConstraintKind) -> Option<DimFrame> {
use ConstraintKind::*;
let unit = |v: Vec2, or: Vec2| v.normalized().unwrap_or(or);
Some(match *k {
OffsetDistance { ref output, .. } => {
let (p0, p1) = sk.offset_dimension_points(output)?;
DimFrame::Linear { p0, p1, dir: unit(p1 - p0, Vec2::X) }
}
Distance { p, q, .. } => {
let (a, b) = (sk.point(p)?, sk.point(q)?);
DimFrame::Linear { p0: a, p1: b, dir: unit(b - a, Vec2::X) }