UI scenarios, batch 2: edit an early sketch from the timeline, components with a revolute joint driven to 90°, sheet metal base and edge flange to flat pattern and DXF, STEP export, new design and STEP insert with a hole on the imported face, parameters table drives the model, sketch constraints workflow (dimensions, delete and undo, fix, construction), rectangular pattern. Harness: widgets found by their text through the accessibility tree, file pickers answered from the scenario's folder, model renders at shot steps (SOLVECRAFT_SCENARIO_SHOTS), query/file checks; ui.at takes a dimension. Fix: a click on a sketch point under a dimension line (a diameter through the centre) selects the point; only the dimension's text takes precedence

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AS5Tn3xieewUSg3uxrMVdL
This commit is contained in:
bherbruckandClaude Opus 5.5 committed 2026-10-08 10:15:21 +00:00
1 parent 717b181082
commit 187e9a97b9
13 files changed
+1115 -6

No files matched your search

+14 -1
View File
@@ -22,4 +22,17 @@ macro_rules! scenarios {
};
}
scenarios!(s01_box_fillet_hole_shell, s02_revolve_on_xz, s03_sketch_on_face_cut, s04_mirror_body, s05_delete_and_undo);
scenarios!(
s01_box_fillet_hole_shell,
s02_revolve_on_xz,
s03_sketch_on_face_cut,
s04_mirror_body,
s05_delete_and_undo,
s06_edit_early_feature,
s07_components_joint_drive,
s08_sheet_metal_flat_dxf,
s09_step_roundtrip_hole,
s10_parameters_drive_model,
s11_sketch_constraints,
s12_pattern_bodies
);
@@ -0,0 +1,145 @@
[
{
"start": "SketchCreate"
},
{
"click": {
"plane": "XY"
}
},
{
"start": "ShapeRectangleTwoPoint"
},
{
"click": {
"sketch": [
0,
0
]
}
},
{
"click": {
"sketch": [
40,
30
]
}
},
{
"key": "Escape"
},
{
"start": "SketchDimension"
},
{
"click": {
"sketch": [
20,
0
]
}
},
{
"text": "40"
},
{
"key": "Enter"
},
{
"key": "Escape"
},
{
"start": "SketchStop"
},
{
"call": "ui.view",
"params": {
"view": "iso"
}
},
{
"start": "Extrude"
},
{
"text": "10"
},
{
"key": "Enter"
},
{
"start": "FusionFilletEdgesCommand"
},
{
"click": {
"world": [
40,
15,
10
]
}
},
{
"text": "2"
},
{
"key": "Enter"
},
{
"expect": {
"bodies": 1,
"errors": 0,
"features": 3,
"volume": [
11974.25,
1e-05
]
}
},
{
"call": "ui.editFeature",
"params": {
"feature": "Sketch1"
}
},
{
"expect": {
"sketching": true
}
},
{
"click": {
"dimension": "d1"
},
"double": true
},
{
"text": "60"
},
{
"key": "Enter"
},
{
"expect": {
"param": {
"d1": 60
}
}
},
{
"shot": "s06_edit_sketch"
},
{
"start": "SketchStop"
},
{
"expect": {
"sketching": false,
"errors": 0,
"bodies": 1
}
},
{
"shot": "s06_updated"
}
]
@@ -0,0 +1,224 @@
[
{
"start": "FusionCreateNewComponentCommand"
},
{
"key": "Enter"
},
{
"start": "SketchCreate"
},
{
"click": {
"plane": "XY"
}
},
{
"start": "ShapeRectangleTwoPoint"
},
{
"click": {
"sketch": [
0,
0
]
}
},
{
"click": {
"sketch": [
20,
20
]
}
},
{
"key": "Escape"
},
{
"start": "SketchStop"
},
{
"call": "ui.view",
"params": {
"view": "iso"
}
},
{
"start": "Extrude"
},
{
"text": "10"
},
{
"key": "Enter"
},
{
"call": "ui.menu",
"params": {
"x": 100,
"y": 170,
"target": {
"type": "component",
"id": 0
}
}
},
{
"call": "ui.menuPick",
"params": {
"item": "Activate"
}
},
{
"start": "FusionCreateNewComponentCommand"
},
{
"key": "Enter"
},
{
"start": "SketchCreate"
},
{
"click": {
"plane": "XZ"
}
},
{
"start": "ShapeRectangleTwoPoint"
},
{
"click": {
"sketch": [
30,
0
]
}
},
{
"click": {
"sketch": [
50,
10
]
}
},
{
"key": "Escape"
},
{
"start": "SketchStop"
},
{
"call": "ui.view",
"params": {
"view": "iso"
}
},
{
"start": "Extrude"
},
{
"click": {
"world": [
40,
0,
5
]
}
},
{
"text": "20"
},
{
"key": "Enter"
},
{
"expect": {
"bodies": 2,
"errors": 0
}
},
{
"start": "JointAssembleCmdNew"
},
{
"click": {
"world": [
10,
10,
10
]
}
},
{
"click": {
"world": [
40,
0,
5
]
}
},
{
"widget": "Rigid"
},
{
"widget": "Revolute"
},
{
"shot": "s07_joint"
},
{
"widget": "OK"
},
{
"expect": {
"dialog": null,
"errors": 0,
"query": {
"command": "joint.list",
"path": [
"joints",
0,
"type"
],
"value": "revolute"
}
}
},
{
"start": "FusionMoveJointsCommand"
},
{
"widget": "0 deg"
},
{
"key": "A",
"cmd": true
},
{
"text": "90"
},
{
"key": "Enter"
},
{
"expect": {
"query": {
"command": "joint.list",
"path": [
"joints",
0,
"values",
0,
"value"
],
"value": 90
}
}
},
{
"shot": "s07_driven"
}
]
@@ -0,0 +1,116 @@
[
{
"call": "ui.set",
"params": {
"tab": "SHEET METAL"
}
},
{
"start": "SketchCreate"
},
{
"click": {
"plane": "XY"
}
},
{
"start": "ShapeRectangleTwoPoint"
},
{
"click": {
"sketch": [
0,
0
]
}
},
{
"click": {
"sketch": [
60,
40
]
}
},
{
"key": "Escape"
},
{
"start": "SketchStop"
},
{
"call": "ui.view",
"params": {
"view": "iso"
}
},
{
"start": "FusionSheetMetalFlangeCommand"
},
{
"click": {
"world": [
30,
20,
0
]
}
},
{
"key": "Enter"
},
{
"expect": {
"bodies": 1,
"errors": 0,
"dialog": null
}
},
{
"expect": {
"volume": 6000
}
},
{
"shot": "s08_base"
},
{
"start": "FusionSheetMetalFlangeCommand"
},
{
"click": {
"world": [
30,
0,
2.5
]
}
},
{
"key": "Enter"
},
{
"expect": {
"bodies": 1,
"errors": 0,
"dialog": null
}
},
{
"shot": "s08_flange"
},
{
"start": "FusionSheetMetalFlatPatternCmd"
},
{
"widget": "Export DXF\u2026"
},
{
"expect": {
"file": "Untitled-Body1.dxf"
}
},
{
"shot": "s08_flat"
}
]
@@ -0,0 +1,126 @@
[
{
"start": "SketchCreate"
},
{
"click": {
"plane": "XY"
}
},
{
"start": "ShapeRectangleTwoPoint"
},
{
"click": {
"sketch": [
0,
0
]
}
},
{
"click": {
"sketch": [
40,
30
]
}
},
{
"key": "Escape"
},
{
"start": "SketchStop"
},
{
"start": "Extrude"
},
{
"text": "15"
},
{
"key": "Enter"
},
{
"expect": {
"bodies": 1,
"volume": 18000
}
},
{
"click": [
127,
16
]
},
{
"widget": "Export STEP\u2026"
},
{
"expect": {
"file": "Untitled.step"
}
},
{
"key": "N",
"cmd": true
},
{
"expect": {
"bodies": 0,
"features": 0
}
},
{
"choose_file": "Untitled.step"
},
{
"click": [
127,
16
]
},
{
"widget": "Insert STEP\u2026"
},
{
"debug": 1
},
{
"expect": {
"bodies": 1,
"volume": 18000
}
},
{
"call": "ui.view",
"params": {
"view": "iso"
}
},
{
"start": "FusionHoleCommand"
},
{
"click": {
"world": [
20,
15,
15
]
}
},
{
"key": "Enter"
},
{
"expect": {
"bodies": 1,
"errors": 0,
"dialog": null
}
},
{
"shot": "s09_hole_on_import"
}
]
@@ -0,0 +1,111 @@
[
{
"start": "SketchCreate"
},
{
"click": {
"plane": "XY"
}
},
{
"start": "ShapeRectangleTwoPoint"
},
{
"click": {
"sketch": [
0,
0
]
}
},
{
"click": {
"sketch": [
40,
30
]
}
},
{
"key": "Escape"
},
{
"start": "SketchDimension"
},
{
"click": {
"sketch": [
20,
0
]
}
},
{
"text": "40"
},
{
"key": "Enter"
},
{
"key": "Escape"
},
{
"start": "SketchStop"
},
{
"start": "Extrude"
},
{
"text": "10"
},
{
"key": "Enter"
},
{
"expect": {
"volume": 12000
}
},
{
"start": "ChangeParameterCommand"
},
{
"shot": "s10_params"
},
{
"widget": "40"
},
{
"key": "A",
"cmd": true
},
{
"text": "55"
},
{
"key": "Enter"
},
{
"debug": 1
},
{
"expect": {
"param": {
"d1": 55
},
"volume": 16500,
"errors": 0
}
},
{
"widget": "Close window"
},
{
"expect": {
"dialog": null
}
},
{
"shot": "s10_updated"
}
]
@@ -0,0 +1,222 @@
[
{
"start": "SketchCreate"
},
{
"click": {
"plane": "XY"
}
},
{
"start": "DrawPolyline"
},
{
"click": {
"sketch": [
0,
0
]
}
},
{
"click": {
"sketch": [
40,
0
]
}
},
{
"click": {
"sketch": [
40,
25
]
}
},
{
"click": {
"sketch": [
0,
25
]
}
},
{
"click": {
"sketch": [
0,
0
]
}
},
{
"key": "Escape"
},
{
"key": "Escape"
},
{
"expect": {
"dof": 2,
"sketch_status": "solved"
}
},
{
"start": "CircleCenterRadius"
},
{
"click": {
"sketch": [
20,
12
]
}
},
{
"click": {
"sketch": [
25,
12
]
}
},
{
"key": "Escape"
},
{
"start": "SketchDimension"
},
{
"click": {
"sketch": [
20,
0
]
}
},
{
"text": "40"
},
{
"key": "Enter"
},
{
"click": {
"sketch": [
40,
12
]
}
},
{
"text": "25"
},
{
"key": "Enter"
},
{
"click": {
"sketch": [
25,
12
]
}
},
{
"text": "10"
},
{
"key": "Enter"
},
{
"key": "Escape"
},
{
"expect": {
"dof": 2
}
},
{
"click": {
"sketch": [
20,
12
]
}
},
{
"expect": {
"selection": 1
}
},
{
"key": "Delete",
"fail": false
},
{
"expect": {
"dof": 0,
"selection": 0
}
},
{
"key": "Z",
"cmd": true
},
{
"expect": {
"dof": 2
}
},
{
"start": "ConstraintFix"
},
{
"click": {
"sketch": [
20,
12
]
}
},
{
"key": "Escape"
},
{
"expect": {
"dof": 0
}
},
{
"shot": "s11_constrained"
},
{
"click": {
"sketch": [
0,
12
]
}
},
{
"key": "X"
},
{
"expect": {
"dof": 0
}
},
{
"start": "SketchStop"
},
{
"expect": {
"sketching": false,
"errors": 0
}
},
{
"shot": "s11_done"
}
]
@@ -0,0 +1,23 @@
[
{"start": "SketchCreate"},
{"click": {"plane": "XY"}},
{"start": "CircleCenterRadius"},
{"click": {"sketch": [10, 10]}},
{"click": {"sketch": [14, 10]}},
{"key": "Escape"},
{"start": "SketchStop"},
{"call": "ui.view", "params": {"view": "iso"}},
{"start": "Extrude"},
{"text": "8"},
{"key": "Enter"},
{"expect": {"bodies": 1}},
{"start": "PatternRectangular"},
{"click": {"world": [10, 10, 8]}},
{"call": "ui.dialogInput", "params": {"index": 1}},
{"click": {"axis": "X"}},
{"debug": "widgets"},
{"key": "Enter"},
{"debug": 1},
{"expect": {"errors": 0, "dialog": null, "volume": [1206.37, 1e-3]}},
{"shot": "s12_pattern"}
]