A Sketch Palette toggle (sketch.options show_construction) that hides construction geometry from drawing and picking; saved with the sketch's view options under format 17. Co-authored-by: William Dunn <william.dunn@quasarke.com>
52 lines
3.0 KiB
JSON
52 lines
3.0 KiB
JSON
[
|
|
{"note": "The Sketch Palette's Construction Geometries row hides construction geometry while sketching. Hidden construction geometry cannot be picked either, by a click or by a box, so nothing invisible is selectable. Ordinary geometry, centerlines, sketch points and the profile are untouched."},
|
|
{"start": "sketch.create"},
|
|
{"click": {"plane": "XY"}},
|
|
{"call": "engine.execute", "params": {"command": "sketch.rectangle.two_point", "params": {"p0": [0, 0], "p1": [40, 30]}}},
|
|
{"call": "engine.execute", "params": {"command": "sketch.line", "params": {"points": [[0, 45], [40, 45]], "connect": false, "infer": false}}},
|
|
{"call": "engine.execute", "params": {"command": "sketch.line", "params": {"points": [[0, 55], [40, 55]], "connect": false, "infer": false}}},
|
|
{"call": "engine.execute", "params": {"command": "sketch.construction", "params": {"curves": ["l5"], "value": true}}},
|
|
{"call": "engine.execute", "params": {"command": "sketch.centerline", "params": {"curves": ["l6"], "value": true}}},
|
|
{"call": "ui.view", "params": {"view": "top"}},
|
|
{"expect": {"shown": "Construction Geometries"}},
|
|
{"expect": {"query": {"command": "sketch.options", "path": ["options", "show_construction"], "value": true}}},
|
|
|
|
{"note": "Shown: the construction line picks, and a box over it takes the line and its two end points."},
|
|
{"click": {"sketch": [20, 45]}},
|
|
{"expect": {"selection": 1}},
|
|
{"key": "Escape"},
|
|
{"drag": [{"sketch": [-6, 40]}, {"sketch": [46, 50]}], "steps": 10},
|
|
{"expect": {"selection": 3}},
|
|
{"key": "Escape"},
|
|
{"expect": {"selection": 0}},
|
|
|
|
{"note": "Turn the row off from the palette itself."},
|
|
{"widget": "Construction Geometries"},
|
|
{"expect": {"query": {"command": "sketch.options", "path": ["options", "show_construction"], "value": false}}},
|
|
|
|
{"note": "Hidden: the same click reaches nothing. The same box takes only the two end points, which are sketch points and answer to the Points row, not to this one."},
|
|
{"click": {"sketch": [20, 45]}},
|
|
{"expect": {"selection": 0}},
|
|
{"drag": [{"sketch": [-6, 40]}, {"sketch": [46, 50]}], "steps": 10},
|
|
{"expect": {"selection": 2}},
|
|
{"key": "Escape"},
|
|
|
|
{"note": "The centerline, the rectangle and the profile are all still there."},
|
|
{"click": {"sketch": [20, 55]}},
|
|
{"expect": {"selection": 1}},
|
|
{"key": "Escape"},
|
|
{"click": {"sketch": [20, 0]}},
|
|
{"expect": {"selection": 1}},
|
|
{"key": "Escape"},
|
|
{"expect": {"query": {"command": "sketch.inspect", "path": ["curves", 4, "construction"], "value": true}}},
|
|
{"expect": {"query": {"command": "sketch.inspect", "path": ["curves", 5, "construction"], "value": false}}},
|
|
{"expect": {"sketch_curves": {"own": 6, "linked": 0}}},
|
|
|
|
{"note": "Turning it back on brings the construction line back, pickable again."},
|
|
{"widget": "Construction Geometries"},
|
|
{"expect": {"query": {"command": "sketch.options", "path": ["options", "show_construction"], "value": true}}},
|
|
{"click": {"sketch": [20, 45]}},
|
|
{"expect": {"selection": 1}},
|
|
{"shot": "s37_construction_geometries_toggle"}
|
|
]
|