← Commit history

fusion-lane proposals for 0.3.0 (ruled in #6, agreed by altium-lane in #5): bodies, render_board_layers, plan_route, generate_body, library_views, close_all_documents, document_info

Colby Knox ·aa59c9efef ·14d ago ·parent 844a61d
1 file changed +305
tools/proposed/fusion-lane.jsonadded+305
@@ -0,0 +1,305 @@+[+ {+  "name": "bodies",+  "tier": "core",+  "summary": "Every part's 3D body as a box: its footprint rectangle on the board and its height range above the surface it sits on (a bottom part measures down from the bottom). Names the parts with no 3D body and the ones whose body is not where the board puts the part. Read only.",+  "input": {+   "filePath": "path to the board (optional; default the open board)",+   "refs": "[ref] (default every part)"+  },+  "output": {+   "bodies": "[{ref, side: top|bottom, x0, y0, x1, y1, z0, z1}]: the bodies companion (schema/companions.schema.json), mm",+   "noBody": "[ref]: parts with no 3D body, so no height",+   "suspect": "[{ref, why: [string]}]: a body off its footprint, floating above the board or sunk into it",+   "tallest": "{top: {ref, heightMm}, bottom: {ref, heightMm}}",+   "surfaceZMm": "{top, bottom}: the z of each board surface",+   "revision": "string"+  },+  "hint": "The rows are the bodies companion, which height_check, placement_check and enclosure checks read. One box per body and one box per part are both valid; checks take the union per part.",+  "pitfalls": [+   "A part whose library has no 3D model is in noBody: it has no height, not a height of 0.",+   "A body in suspect usually comes from a wrong or offset library model: fix it before trusting its height."+  ],+  "related": [+   "height_check",+   "placement_check",+   "add_body",+   "render_board_3d"+  ],+  "example": {+   "refs": [+    "U1",+    "J2"+   ]+  },+  "longRunning": false,+  "timeoutSeconds": 120,+  "proposedBy": "fusion-lane",+  "since": "0.3.0",+  "agreedBy": [+   "altium-lane"+  ]+ },+ {+  "name": "render_board_layers",+  "tier": "native",+  "summary": "Render chosen board layers to an image file without opening a window: a preset view (copper, silkscreen, solder mask, paste, outline, drill, assembly or fabrication, of either side) or a list of layers, as png or svg.",+  "input": {+   "preset": "all | top_copper | bottom_copper | top_silkscreen | bottom_silkscreen | top_soldermask | bottom_soldermask | top_paste | bottom_paste | outline | drill | assembly_top | assembly_bottom | fabrication (default all)",+   "layers": "[layer]: copper by its standard name (F.Cu, In1.Cu, B.Cu) or any layer by the tool's own id; overrides preset",+   "format": "png | svg (default png)",+   "dpi": "int, default 300 (png)",+   "mirror": "bool, default false: draw the board as seen from below",+   "monochrome": "bool, default false",+   "outputPath": "the image file to write (default beside the board)",+   "listPresets": "bool: answer the presets and their layers, and make no image"+  },+  "output": {+   "path": "path",+   "format": "png | svg",+   "widthPx": "int (png)",+   "heightPx": "int (png)",+   "preset": "string, or custom when layers was given",+   "layers": "[layer]: what was drawn",+   "presets": "{name: description} (listPresets)"+  },+  "hint": "Each preset is a fixed set of layers, so two bridges draw the same view. For a 3D picture use render_board_3d. The show_* verbs open a window; this one does not.",+  "pitfalls": [+   "Mirroring is never automatic: a bottom preset is drawn as seen from the top unless mirror is true.",+   "Inner copper layers appear only when listed in layers."+  ],+  "related": [+   "render_board_3d",+   "render_schematic",+   "export_gerber",+   "export_pdf"+  ],+  "example": {+   "preset": "assembly_top",+   "format": "png",+   "dpi": 300+  },+  "longRunning": false,+  "timeoutSeconds": 60,+  "proposedBy": "fusion-lane",+  "since": "0.3.0",+  "agreedBy": [+   "altium-lane"+  ]+ },+ {+  "name": "plan_route",+  "tier": "checks",+  "summary": "Plan a path for one net between two pads without changing the board: a grid search around the existing copper that keeps the clearance rules, on the allowed copper layers, with vias where they help. Answered as route_net's arguments.",+  "input": {+   "net": "string (required)",+   "from": "the start pad as Ref.Pad (required)",+   "to": "the end pad as Ref.Pad (required)",+   "widthMm": "track width (default the net's rule width)",+   "layers": "[F.Cu, B.Cu, ...]: the layers it may use (default the outer layers)",+   "allowVias": "bool, default true",+   "viaSizeMm": "default 0.6",+   "viaDrillMm": "default 0.3",+   "gridMm": "search grid, default 0.5",+   "viaCost": "a via costs as much as this many mm of track, default 5",+   "expectedRevision": "the revision the plan is for"+  },+  "output": {+   "found": "bool",+   "routeNet": "{net, layer, width, viaSize, viaDrill, paths}: pass it to route_net unchanged",+   "lengthMm": "number",+   "vias": "int",+   "reason": "string when found is false: no path within the search limits, a pad not on the net",+   "revision": "string: the board the plan was made on"+  },+  "hint": "Read only. Pass routeNet to route_net with expectedRevision set to revision; run_drc after the route is still the proof.",+  "pitfalls": [+   "Between dense pads a finer grid can find a path the default 0.5 mm grid misses, at a cost in time.",+   "The plan holds for the revision it read: route_net refuses it with stale_board once the board changes."+  ],+  "related": [+   "route_net",+   "route_pair",+   "run_drc",+   "routing_state"+  ],+  "example": {+   "net": "SDA",+   "from": "U1.12",+   "to": "J3.4",+   "layers": [+    "F.Cu",+    "B.Cu"+   ]+  },+  "longRunning": false,+  "timeoutSeconds": 30,+  "proposedBy": "fusion-lane",+  "since": "0.3.0",+  "agreedBy": [+   "altium-lane"+  ]+ },+ {+  "name": "generate_body",+  "tier": "core",+  "summary": "Make a part's 3D body from its package family and its datasheet dimensions (chip, SOIC, QFN, QFP, BGA, SOT-23, DFN, MELF, electrolytic can, crystal, pin header and others), to IPC-7351 proportions, optionally with a marking on its top, and write it as a STEP file.",+  "input": {+   "family": "chip | soic | qfn | qfp | bga | sot23 | dfn | melf | ecap | crystal | header and others (required; an unknown one is answered with the families the bridge supports)",+   "dimensionsMm": "{letter: mm}: the package drawing's JEDEC letters (A height, D body length, E lead span, E1 body width, b lead width, e pitch, L lead length) plus pins; a missing one takes the family's default",+   "marking": "text on the top face (an MPN or a value code); a newline starts a second line",+   "markingStyle": "raised | engraved (default raised)",+   "outputPath": "the .step file to write (required)"+  },+  "output": {+   "stepPath": "path",+   "family": "string",+   "dimensionsMm": "{letter: mm}: every dimension used, defaults included",+   "bboxMm": "{x, y, z}",+   "marking": "string | null",+   "families": "[string] (when family is unknown)"+  },+  "hint": "The body is in the package's own frame (IPC-7351 zero orientation, seated on z = 0), ready for add_body. Compare bboxMm with the datasheet's body size before attaching it.",+  "pitfalls": [+   "A wrong dimension gives a plausible but wrong body: nothing checks it against a datasheet.",+   "A marking is real geometry: very small text on a small package is unreadable, which is not an error."+  ],+  "related": [+   "add_body",+   "bodies",+   "height_check",+   "library_views"+  ],+  "example": {+   "family": "soic",+   "dimensionsMm": {+    "pins": 8,+    "D": 4.9,+    "E": 6.0,+    "E1": 3.9,+    "A": 1.75,+    "e": 1.27+   },+   "marking": "LM358",+   "outputPath": "C:/parts/LM358.step"+  },+  "longRunning": false,+  "timeoutSeconds": 120,+  "proposedBy": "fusion-lane",+  "since": "0.3.0",+  "agreedBy": [+   "altium-lane"+  ]+ },+ {+  "name": "library_views",+  "tier": "app",+  "summary": "Pictures of library parts for review, each as an image file: the schematic symbol, the footprint (pads and layers), the 3D body seated on the footprint, and the device view that maps symbol pins to pads.",+  "input": {+   "libraryPath": "path to the library (required)",+   "parts": "[part name] (required)",+   "views": "[symbol, footprint, 3d, device] (default all four)",+   "outputDir": "folder for the images (default beside the library)"+  },+  "output": {+   "captured": "[{part, view, path, ok, error?}]"+  },+  "hint": "The four pictures a reviewer checks before a part is used: the pin names on the symbol, the pad shapes, the body on its pads, and every pin mapped to a pad.",+  "pitfalls": [+   "The 3d view needs a body on the part (add_body): a part without one is reported with ok false, not drawn empty."+  ],+  "related": [+   "add_body",+   "show_3d_chip",+   "read_symbol",+   "footprint_primitives",+   "list_library"+  ],+  "example": {+   "libraryPath": "C:/libs/power.lbr",+   "parts": [+    "TPS54202"+   ],+   "views": [+    "symbol",+    "footprint",+    "3d"+   ]+  },+  "longRunning": true,+  "timeoutSeconds": 300,+  "proposedBy": "fusion-lane",+  "since": "0.3.0",+  "agreedBy": [+   "altium-lane"+  ]+ },+ {+  "name": "close_all_documents",+  "tier": "app",+  "summary": "Close every open document without a save dialog. Unsaved work is never lost by default: a document with unsaved changes stays open and is listed, unless save or discardUnsaved says what to do with it.",+  "input": {+   "save": "bool, default false: save each changed document, then close it",+   "discardUnsaved": "bool, default false: close changed documents without saving (their changes are lost)",+   "includeScratch": "bool, default false: also close never-saved scratch documents"+  },+  "output": {+   "closed": "[name]",+   "saved": "[name]",+   "keptOpen": "[{name, why: unsaved changes | scratch}]"+  },+  "hint": "Use it to start from a clean editor. keptOpen tells you what still needs a decision.",+  "pitfalls": [+   "discardUnsaved loses changes that exist nowhere else: ask the person first.",+   "A scratch document was never saved, so closing one with unsaved changes loses it entirely."+  ],+  "related": [+   "close_document",+   "save",+   "document_info"+  ],+  "example": {+   "save": true+  },+  "longRunning": false,+  "timeoutSeconds": 120,+  "proposedBy": "fusion-lane",+  "since": "0.3.0",+  "agreedBy": [+   "altium-lane"+  ]+ },+ {+  "name": "document_info",+  "tier": "app",+  "summary": "The active document: its name, what kind it is, whether it has unsaved changes, where it is saved and which version it is. Read only; opens nothing.",+  "input": {},+  "output": {+   "name": "string",+   "kind": "project | schematic | board | library | model | other",+   "saved": "bool: it exists as a file or a cloud item",+   "modified": "bool: it has unsaved changes",+   "path": "file path or cloud location | null",+   "version": "int | null: the saved version, where the tool keeps versions",+   "project": "string | null"+  },+  "hint": "Cheap. Call it before an edit verb to make sure the right document is in front.",+  "pitfalls": [+   "A schematic and a board of one design are separate documents in some tools: kind says which one is in front."+  ],+  "related": [+   "open_document",+   "close_document",+   "save",+   "status"+  ],+  "example": {},+  "longRunning": false,+  "timeoutSeconds": 20,+  "proposedBy": "fusion-lane",+  "since": "0.3.0",+  "agreedBy": [+   "altium-lane"+  ]+ }+]