sketch.pattern.rectangular gets a tool window with both quantities and spacings and an optional direction, instead of a click flow with a fixed count. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
90 lines
4.6 KiB
JSON
90 lines
4.6 KiB
JSON
[
|
|
{"note": "sketch.pattern.rectangular gets a tool window carrying Entities, Direction, Quantity, Spacing, Quantity 2 and Spacing 2. Its click tool sent a hard-coded count of 3 and could not reach the command's second count and spacing at all."},
|
|
{"start": "sketch.create"},
|
|
{"click": {"plane": "XY"}},
|
|
{"expect": {"sketching": true}},
|
|
{"start": "sketch.circle.center"},
|
|
{"click": {"sketch": [0, 0]}},
|
|
{"click": {"sketch": [5, 0]}},
|
|
{"key": "Escape"},
|
|
{"expect": {"sketch_curves": {"own": 1}, "errors": 0}},
|
|
|
|
{"note": "Starting the command opens the window and commits nothing. Picking the circle fills Entities and still commits nothing."},
|
|
{"start": "sketch.pattern.rectangular"},
|
|
{"expect": {"dialog": "PatternRect", "sketch_curves": {"own": 1}, "errors": 0}},
|
|
{"click": {"sketch": [5, 0]}},
|
|
{"expect": {"dialog": "PatternRect", "sketch_curves": {"own": 1}, "errors": 0}},
|
|
|
|
{"note": "A typed count of 5 reaches the command unchanged, where the click tool always sent 3. Five instances 20 mm apart along sketch x put the last centre at x = 80."},
|
|
{"click": {"handle": "dialog:Quantity"}},
|
|
{"key": "A", "cmd": true},
|
|
{"text": "5"},
|
|
{"click": {"handle": "dialog:Spacing"}},
|
|
{"key": "A", "cmd": true},
|
|
{"text": "20"},
|
|
{"key": "Enter"},
|
|
{"expect": {"dialog": null, "errors": 0, "sketch_curves": {"own": 5}}},
|
|
{"expect": {"query": {"command": "sketch.inspect", "path": ["curves", 4, "center_at", 0], "value": 80}}},
|
|
{"expect": {"query": {"command": "sketch.inspect", "path": ["curves", 4, "center_at", 1], "value": 0}}},
|
|
{"shot": "sketch_pattern_rect_count"},
|
|
|
|
{"note": "The second count and spacing are reachable: 3 by 2 from one circle makes six instances, the second row 15 mm along the perpendicular direction the command derives."},
|
|
{"start": "sketch.circle.center"},
|
|
{"click": {"sketch": [0, 60]}},
|
|
{"click": {"sketch": [5, 60]}},
|
|
{"key": "Escape"},
|
|
{"expect": {"sketch_curves": {"own": 6}, "errors": 0}},
|
|
{"start": "sketch.pattern.rectangular"},
|
|
{"click": {"sketch": [5, 60]}},
|
|
{"click": {"handle": "dialog:Quantity"}},
|
|
{"key": "A", "cmd": true},
|
|
{"text": "3"},
|
|
{"click": {"handle": "dialog:Spacing"}},
|
|
{"key": "A", "cmd": true},
|
|
{"text": "20"},
|
|
{"click": {"handle": "dialog:Quantity 2"}},
|
|
{"key": "A", "cmd": true},
|
|
{"text": "2"},
|
|
{"click": {"handle": "dialog:Spacing 2"}},
|
|
{"key": "A", "cmd": true},
|
|
{"text": "15"},
|
|
{"click": {"handle": "dialog:OK"}},
|
|
{"expect": {"dialog": null, "errors": 0, "sketch_curves": {"own": 11}}},
|
|
{"note": "The first copy is the second row of the first column: 15 mm along the perpendicular direction, nothing along the first."},
|
|
{"expect": {"query": {"command": "sketch.inspect", "path": ["curves", 6, "center_at", 0], "value": 0}}},
|
|
{"expect": {"query": {"command": "sketch.inspect", "path": ["curves", 6, "center_at", 1], "value": 75}}},
|
|
{"note": "The last copy is the far corner of the 3 by 2 grid: 40 mm along the first direction, 15 mm along the second."},
|
|
{"expect": {"query": {"command": "sketch.inspect", "path": ["curves", 10, "center_at", 0], "value": 40}}},
|
|
{"expect": {"query": {"command": "sketch.inspect", "path": ["curves", 10, "center_at", 1], "value": 75}}},
|
|
{"shot": "sketch_pattern_rect_grid"},
|
|
|
|
{"note": "A picked Direction reaches the command's dir: along the Y origin axis the instances run up the sketch, not across it. The grid above has grown the sketch well past the frame the first circle was drawn in, so refit the view before clicking a point 100 mm out."},
|
|
{"call": "ui.view", "params": {"view": "fit"}},
|
|
{"start": "sketch.circle.center"},
|
|
{"click": {"sketch": [100, 0]}},
|
|
{"click": {"sketch": [105, 0]}},
|
|
{"key": "Escape"},
|
|
{"expect": {"sketch_curves": {"own": 12}, "errors": 0}},
|
|
{"start": "sketch.pattern.rectangular"},
|
|
{"click": {"sketch": [105, 0]}},
|
|
{"click": {"handle": "dialog:Direction"}},
|
|
{"click": {"axis": "Y"}},
|
|
{"click": {"handle": "dialog:Quantity"}},
|
|
{"key": "A", "cmd": true},
|
|
{"text": "4"},
|
|
{"click": {"handle": "dialog:Spacing"}},
|
|
{"key": "A", "cmd": true},
|
|
{"text": "10"},
|
|
{"click": {"handle": "dialog:OK"}},
|
|
{"expect": {"dialog": null, "errors": 0, "sketch_curves": {"own": 15}}},
|
|
{"expect": {"query": {"command": "sketch.inspect", "path": ["curves", 14, "center_at", 0], "value": 100}}},
|
|
{"expect": {"query": {"command": "sketch.inspect", "path": ["curves", 14, "center_at", 1], "value": 30}}},
|
|
|
|
{"note": "Escape closes the window and leaves the sketch and its undo history exactly as they were."},
|
|
{"start": "sketch.pattern.rectangular"},
|
|
{"click": {"sketch": [105, 0]}},
|
|
{"expect": {"dialog": "PatternRect"}},
|
|
{"key": "Escape"},
|
|
{"expect": {"dialog": null, "errors": 0, "sketch_curves": {"own": 15}}}
|
|
]
|