Skip to content

SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.

4.6 KB
Raw Blame
[
 {"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": "Several corners at once: each picked corner is cut alike by one OK, as a fillet rounds several. The window used to refuse a second corner."},
 {"start": "sketch.chamfer.equal_distance"},
 {"click": {"world": [0, 0, 0]}},
 {"click": {"world": [40, 0, 0]}},
 {"click": {"handle": "dialog:Distance"}},
 {"key": "A", "cmd": true},
 {"text": "3"},
 {"widget": "OK"},
 {"expect": {"dialog": null, "errors": 0, "sketch_curves": {"own": 7}}},
 {"note": "Both cuts start 3 mm along each side from their corners, (0, 0) and (40, 0)."},
 {"expect": {"query": {"command": "sketch.inspect", "path": ["curves", 5, "type"], "value": "line"}}},
 {"expect": {"query": {"command": "sketch.inspect", "path": ["curves", 5, "start_at", 0], "value": 3}}},
 {"expect": {"query": {"command": "sketch.inspect", "path": ["curves", 5, "end_at", 1], "value": 3}}},
 {"expect": {"query": {"command": "sketch.inspect", "path": ["curves", 6, "type"], "value": "line"}}},
 {"expect": {"query": {"command": "sketch.inspect", "path": ["curves", 6, "start_at", 0], "value": 37}}},
 {"expect": {"query": {"command": "sketch.inspect", "path": ["curves", 6, "end_at", 1], "value": 3}}},
 {"note": "Undo takes both cuts back in one step."},
 {"key": "Z", "cmd": true},
 {"expect": {"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}}}
]