One tool window for sketch Fillet and the three sketch Chamfers (#789)

Sketch Fillet and the three sketch Chamfers share one tool window, with its own icons, labels and a scenario.
This commit is contained in:
William Dunn authored and GitHub committed 2026-10-13 14:32:13 -04:00
1 parent dbfb689f6c
commit bdcfe3ff1d
13 files changed
+567 -70

No files matched your search

@@ -0,0 +1,56 @@
[
{"note": "Sketch Fillet and the three Sketch Chamfer commands share one tool window. A click used to commit a size guessed at 20 percent of the shorter leg and then open a bare parameter editor. The chamfer angle was hard-coded to 45 degrees and the second distance was forced equal to the first, so neither was reachable."},
{"call": "engine.execute", "params": {"command": "sketch.create", "params": {"plane": "XY"}}},
{"call": "engine.execute", "params": {"command": "sketch.rectangle.two_point", "params": {"p0": [0, 0], "p1": [40, 30]}}},
{"expect": {"sketch_curves": {"own": 4}, "errors": 0}},
{"note": "Equal Distance opens the window and commits nothing until values are given. The Chamfer Type row of icon buttons then switches which of the three chamfer commands OK runs."},
{"start": "sketch.chamfer.equal_distance"},
{"expect": {"dialog": "Corner { chamfer: true, ctype: 0", "tool": null, "sketch_curves": {"own": 4}}},
{"click": {"world": [40, 30, 0]}},
{"expect": {"sketch_curves": {"own": 4}}},
{"click": {"handle": "dialog:Chamfer Type:Distance and Angle"}},
{"expect": {"dialog": "Corner { chamfer: true, ctype: 2"}},
{"click": {"handle": "dialog:Distance 1"}},
{"key": "A", "cmd": true},
{"text": "8"},
{"click": {"handle": "dialog:Angle"}},
{"key": "A", "cmd": true},
{"text": "30"},
{"widget": "OK"},
{"expect": {"dialog": null, "errors": 0, "sketch_curves": {"own": 5}}},
{"note": "The typed 8 reached the command: the cut starts 8 mm down the right edge."},
{"expect": {"query": {"command": "sketch.inspect", "path": ["curves", 4, "type"], "value": "line"}}},
{"expect": {"query": {"command": "sketch.inspect", "path": ["curves", 4, "start_at", 1], "value": 22}}},
{"note": "The typed 30 degrees reached it too: 8 * sin 30 / sin 60 = 4.6188 mm off the top edge. A hard-coded 45 degrees would cut 8 mm and leave 32."},
{"expect": {"query": {"command": "sketch.inspect", "path": ["curves", 4, "end_at", 0], "value": 35.381197846482}}},
{"note": "Escape leaves the sketch and the history exactly as they were."},
{"start": "sketch.chamfer.equal_distance"},
{"expect": {"dialog": "Corner { chamfer: true, ctype: 0"}},
{"click": {"world": [0, 30, 0]}},
{"click": {"handle": "dialog:Distance"}},
{"key": "A", "cmd": true},
{"text": "5"},
{"key": "Escape"},
{"expect": {"dialog": null, "errors": 0, "sketch_curves": {"own": 5}}},
{"note": "Fillet: the same window with a radius, on a second sketch."},
{"call": "engine.execute", "params": {"command": "sketch.finish", "params": {}}},
{"call": "engine.execute", "params": {"command": "sketch.create", "params": {"plane": "XZ"}}},
{"call": "engine.execute", "params": {"command": "sketch.rectangle.two_point", "params": {"p0": [0, 0], "p1": [40, 30]}}},
{"start": "sketch.fillet"},
{"expect": {"dialog": "Corner { chamfer: false", "tool": null}},
{"click": {"sketch": [40, 0]}},
{"expect": {"sketch_curves": {"own": 4}}},
{"click": {"handle": "dialog:Radius"}},
{"key": "A", "cmd": true},
{"text": "6"},
{"key": "Enter"},
{"expect": {"dialog": null, "errors": 0, "sketch_curves": {"own": 5}}},
{"note": "The typed 6 reached the command, which the guessed size never let anyone choose."},
{"expect": {"query": {"command": "sketch.inspect", "path": ["curves", 4, "type"], "value": "arc"}}},
{"expect": {"query": {"command": "sketch.inspect", "path": ["curves", 4, "radius"], "value": 6}}}
]