{ "schema": "freecad-web-manual/scenario/v1", "chapter": "ch02", "workflow": "part-primitives-boolean", "title": "Part 图元、布尔与检查", "actions": [ { "type": "goto", "url": "/project.html?workbench=Part" }, { "type": "waitFor", "selector": "select[aria-label=\"Workbench\"]" }, { "type": "wait", "ms": 1000 }, { "type": "click", "selector": "nav[aria-label=\"Application menus\"] details", "hasText": "File", "target": ":scope > summary" }, { "type": "click", "role": "button", "name": "新建 Document", "exact": true }, { "type": "wait", "ms": 2000 }, { "type": "eval", "script": "for (const d of document.querySelectorAll('nav[aria-label=\"Application menus\"] details[open]')) d.open = false" }, { "type": "click", "selector": ".part-menu > summary" }, { "type": "wait", "ms": 250 }, { "type": "click", "selector": "details.part-submenu", "hasText": "Primitives", "target": ":scope > summary" }, { "type": "wait", "ms": 250 }, { "type": "click", "selector": "button[data-command=\"Part_Box\"]" }, { "type": "wait", "ms": 900 }, { "type": "click", "selector": ".fc-tree-text", "hasText": "Cube" }, { "type": "fill", "selector": "input[aria-label=\"Length\"]", "value": 80 }, { "type": "fill", "selector": "input[aria-label=\"Width\"]", "value": 60 }, { "type": "fill", "selector": "input[aria-label=\"Height\"]", "value": 20 }, { "type": "click", "role": "button", "name": "应用尺寸并重算", "exact": true }, { "type": "wait", "ms": 1200 }, { "type": "click", "role": "button", "name": "Close task / Cancel", "exact": true }, { "type": "click", "selector": ".fc-tree-text", "hasText": "Cube" }, { "type": "fill", "selector": "input[aria-label=\"Object Label\"]", "value": "PartBase" }, { "type": "press", "key": "Enter" }, { "type": "wait", "ms": 600 }, { "type": "click", "selector": ".part-menu > summary" }, { "type": "wait", "ms": 250 }, { "type": "click", "selector": "details.part-submenu", "hasText": "Primitives", "target": ":scope > summary" }, { "type": "wait", "ms": 250 }, { "type": "click", "selector": "button[data-command=\"Part_Cylinder\"]" }, { "type": "wait", "ms": 1400 }, { "type": "click", "selector": ".fc-tree-text", "hasText": "Cylinder" }, { "type": "wait", "ms": 400 }, { "type": "fill", "selector": "input[aria-label=\"Property Radius\"]", "value": 15 }, { "type": "press", "key": "Tab" }, { "type": "wait", "ms": 900 }, { "type": "fill", "selector": "input[aria-label=\"Property Height\"]", "value": 40 }, { "type": "press", "key": "Tab" }, { "type": "wait", "ms": 1200 }, { "type": "assertValue", "selector": "input[aria-label=\"Property Radius\"]", "value": 15 }, { "type": "assertValue", "selector": "input[aria-label=\"Property Height\"]", "value": 40 }, { "type": "click", "role": "button", "name": "Close task / Cancel", "exact": true, "optional": true }, { "type": "fill", "selector": "input[aria-label=\"Object Label\"]", "value": "PartHole" }, { "type": "press", "key": "Enter" }, { "type": "wait", "ms": 500 }, { "type": "click", "role": "button", "name": "Position", "exact": true }, { "type": "fill", "selector": "input[aria-label=\"Position X\"]", "value": 40 }, { "type": "fill", "selector": "input[aria-label=\"Position Y\"]", "value": 30 }, { "type": "fill", "selector": "input[aria-label=\"Position Z\"]", "value": -10 }, { "type": "click", "role": "button", "name": "应用位置与旋转", "exact": true }, { "type": "wait", "ms": 1000 }, { "type": "click", "role": "button", "name": "Close task / Cancel", "exact": true }, { "type": "shot", "name": "01-primitives", "fullPage": true }, { "type": "click", "selector": ".part-menu > summary" }, { "type": "wait", "ms": 250 }, { "type": "click", "selector": "details.part-submenu", "hasText": "Boolean", "target": ":scope > summary" }, { "type": "wait", "ms": 250 }, { "type": "click", "selector": "button[data-command=\"Part_Cut\"]" }, { "type": "wait", "ms": 2200 }, { "type": "click", "role": "button", "name": "Close task / Cancel", "exact": true, "optional": true }, { "type": "assertVisible", "selector": ".fc-tree-text:has-text(\"Cut\")" }, { "type": "shot", "name": "02-boolean-cut", "fullPage": true }, { "type": "click", "selector": ".fc-tree-text", "hasText": "Cut" }, { "type": "eval", "script": "const m=document.querySelector('.part-menu'); if(m) m.open=true; for(const d of document.querySelectorAll('details.part-submenu')) d.open=true" }, { "type": "wait", "ms": 400 }, { "type": "click", "selector": "button[data-command=\"Part_CheckGeometry\"]", "optional": true }, { "type": "wait", "ms": 1000 }, { "type": "shot", "name": "03-check-geometry", "fullPage": true }, { "type": "click", "role": "button", "name": "Close task / Cancel", "exact": true }, { "type": "shot", "name": "04-result", "fullPage": true }, { "type": "save" } ] }