Reference

The cad command

cad is the command your agent runs, and you can run it yourself. The install command installs it as a uv tool (uv tool install cad) and puts its folder on your PATH. One text-to-cad server runs on your computer, which keeps its workers warm between calls.

cad --help lists every command, cad <type> --help a document type's operations, and cad <command> --help a command's options. This page is that help, generated from the same parser.

cad <document_type> <operation> FILE [args...]
cad <integration> <operation> [FILE] [args...]
cad <command> [args...]

Operations by document type

A document type is a kind of file text-to-cad builds, shows or checks. Each has the operations that make sense for it, with one pattern: cad <document_type> <operation> <file>. A model is a model the server holds, named by its id; every other type takes a file.

Updates and the installation

cad installs every newer release of its major version by itself, and the install command installs and updates the plugin in your agent apps. Install says what the install command does, app by app, and how to update and remove.

CommandDescription
cad updateUpdate cad now to the newest release of its major version (--major: of all); update auto: whether it does so itself.
cad update autoShow or change whether cad updates itself: status, on, off.
cad pluginThe plugin: update it now; update auto: whether cad's updates do.
cad plugin updateRun the install command, which installs or updates the plugin in every agent app it finds; update auto shows or changes whether cad's updates run it.
cad plugin update autoShow or change whether cad's updates run the install command.
cad doctorReport this cad, its folders, its kernel and the server; it changes nothing.
cad cachecad's cache: dir, prune (what this release cannot use), clean (all of it).
cad cache dirPrint where cad's cache is.
cad cache pruneRemove what this release of cad cannot use.
cad cache cleanRemove all of cad's cache; cad makes it again as it needs it.
cad telemetryShow or change the usage stats and crash reports CAD sends: status, on, off.

cad update

cad installs every newer release of its major version by itself, and a new major version only when you run cad update --major. cad update updates cad now to the newest release of its major version, even with automatic updates off: cad asks PyPI and, once nothing is running, installs it. A cad server that was running starts again; with none running, none is started. cad update auto shows or changes whether cad updates itself.

cad update [--major]
cad update auto [{status,on,off}]
ArgumentDescription
{auto} ...One of auto.
OptionDescription
--majorInstall the newest release of all, a new major version included, which may ask for changes (https://github.com/earthtojake/text-to-cad/tree/main/docs/migrations).

cad update auto

Show or change whether cad updates itself to the newest release of its major version: once nothing has run for a minute, the cad server stops, installs it and starts again. A new major version never installs itself: cad update --major installs it. On by default, for a global install (uv tool install cad).

cad update auto [{status,on,off}]
ArgumentDescription
{status,on,off}One of status, on, off. Optional.

cad plugin

The plugin in your agent apps: install or update it with the install command, or say whether cad's own updates run that command again.

cad plugin {update} ...
ArgumentDescription
{update} ...One of update.

cad plugin update

Run the install command (curl -fsSL https://texttocad.dev/install.sh | sh; on Windows irm https://www.texttocad.dev/install.ps1 | iex), which installs or updates the plugin in every agent app it finds. Its output and exit status are this command's.

cad plugin update [auto [{status,on,off}]]
ArgumentDescription
{auto} ...One of auto.

cad plugin update auto

Show or change whether cad runs the install command once each time it is newer than the release that command is up to date for, however it was updated, so the plugin stays as new as cad. Off by default; the install command turns it on.

cad plugin update auto [{status,on,off}]
ArgumentDescription
{status,on,off}One of status, on, off. Optional.

cad doctor

Report this cad: its release, its data and cache folders and what cad cache prune would free, the CAD kernel environment and the integrations', and the server. It changes nothing. Exit 1 when the CAD kernel is installed and does not load.

cad doctor [--check] [--json]
OptionDescription
--checkThe same report.
--jsonThe report as one JSON document: each check's name, status (ok, info, warning, failed) and detail.

cad cache

cad's cache: what cad makes again when it needs it (environments, bytecode, meshes it derived). Never your documents or settings.

cad cache {dir,prune,clean} ...
ArgumentDescription
{dir,prune,clean} ...One of dir, prune, clean.

cad cache dir

Print where cad's cache is.

cad cache dir

cad cache prune

Remove what this release of cad cannot use: environments made for other releases, and the release folders of 0.11.11 and earlier.

cad cache prune

cad cache clean

Remove all of cad's cache, and what prune removes; cad makes it again as it needs it. Refused while the cad server runs.

cad cache clean

cad telemetry

Show or change the usage stats and crash reports cad sends from CAD's apps (the CAD app in an agent app, and the viewer) and its build daemon. By default, once a cad command has said so: a random install id, versions, the OS and agent app, counts of CAD tool calls, view activity, which of the viewer's tools and settings are used (never a value or a name), files shown by format, builds and snapshots, how they ended and how long they took, and where cad's own code failed (never a message). off sends nothing. Never file names, paths, contents or prompts.

cad telemetry [{status,on,off}]
ArgumentDescription
{status,on,off}One of status, on, off. Optional.

The server

One server runs on your computer, and every command and the viewer go through it. cad server start starts it; in the Codex app, the plugin starts it (cad mcp).

CommandDescription
cad serverThe cad server: start, stop, status.
cad server startStart the cad server where it is not running.
cad server stopStop the cad server.
cad server statusThe cad server's workers, what each is building, and its served documents.
cad mcpServe the CAD app to the agent app that starts it, over MCP on stdin and stdout.

cad server

The cad server, which builds, keeps and serves your documents: start it, stop it, or say what it runs.

cad server [--rotate-token] [--yes] {start,stop,status} ...
ArgumentDescription
{start,stop,status} ...One of start, stop, status.
OptionDescription
--rotate-tokenReplace the page token: every link and browser session made before stops working, in the server running too; asked first.
-y, --yesWith --rotate-token, replace the token without asking; where nobody can be asked (an agent, a pipe, --json) the command does nothing without it.

cad server start

Start the cad server, detached, where it is not running: one of an older release is replaced (stopped first, its work cut short), and one of a newer release is joined, left running. Pages open on the server replaced are served on the same port by the one that starts.

cad server start [--port PORT] [--foreground]
OptionDescription
--port PORTThe HTTP port the server takes, refused when another process holds it (else CAD_ENGINE_PORT, else 3245 or the port it rolled to); 0 takes any free port.
--foregroundRun it in this process, its log on this terminal, until it is stopped.

cad server stop

Stop the cad server.

cad server stop [--json]
OptionDescription
--jsonWhat was stopped as JSON.

cad server status

The cad server's workers, what each is building, and its served documents.

cad server status [--json]
OptionDescription
--jsonThe server's answer as JSON.

cad mcp

Serve CAD to the agent app that started this process, over MCP on standard input and output: this release's cad server started first, as cad server start starts it, and every request passed on to it. The app starts it; there is nothing to configure.

cad mcp

Running and viewing

CommandDescription
cad runRun a script (or -m, -c) as uv run does, cad pinned at this device's release with the integrations its imports use.
cad viewerOpen a viewer page on the running cad server.
cad deleteDelete documents: record, cached document, the engine's copy.

cad run

Run a program as uv run does, with cad pinned at this device's release: a script's # /// script header names its own packages, and cad's integrations are worked out from its imports (a header naming cad[...] decides them); a command an integration declares (kicad-cli) gets that integration and runs headless. A script that imports bpy gets the blender integration, on Python 3.13, the one its tool is built for. The environment is made once, by the device's engine, and used again. uv run's options are taken as uv takes them.

cad run [uv run's options] SCRIPT.py [ARGS...] | -m MODULE [ARGS...] | -c CODE [ARGS...] | COMMAND [ARGS...]

cad viewer

Open the running server's viewer page: the home, or each file named (no server running: its one line, which says to run cad server start). The page is the engine's one page, whose explorer opens where it was last, else your home folder. Each FILE (an on-disk CAD file, a relative one read from this folder, or a document id the engine holds) is registered and printed as its page, /<id>.

cad viewer [--host HOST] [--port PORT] [--json] [--no-open] [--dist DIST] [--api-only] [FILE ...]
ArgumentDescription
FILEA CAD file to open (or a document id the engine holds): its page is /<id>. Optional. Repeatable.
OptionDescription
--host HOSTPin the engine bind address; default loopback.
--port PORTPin this installation’s engine HTTP port.
--jsonPrint launch information without opening a browser.
--no-openPrint the URL without opening a browser.
--dist DISTBuilt viewer client directory.
--api-onlyAnnounce the engine for a Vite frontend, without its client build.

cad delete

delete documents: each one's record and its document in the engine's cache, and what the engine holds of it; never a file of yours

cad delete [--dry-run] [--yes] [--json] DOC [DOC ...]
ArgumentDescription
DOCA document's id, a model's script (every document recorded of it), or a CAD file a page opened; your own files — a script, its declared files, an opened file — are never touched. Repeatable.
OptionDescription
--dry-runSay which documents would be deleted, and how many, and delete nothing.
-y, --yesDelete them without asking; where nobody can be asked (an agent, a pipe, --json) the command does nothing without it.
--jsonWhat was deleted (or would be) as JSON.

Document types

Each type's operations, as cad <document_type> <operation>. A file of another type is refused by name, and a check prints its findings, or with --json one JSON document.

cad model

model: A model built from code and held in the engine's memory, with no file behind it: addressed by its document id (cad run SCRIPT.py prints it) or the handle its call returns.

cad model <operation> ID [options]

In Python: cad.model.

cad model export

Write the document to other files, each kind by its suffix (.step, .glb, .stl, .3mf, .dxf, .xbf, .xml (MJCF, its meshes beside it), .urdf (its meshes beside it)); --tolerance and --angle mesh a .glb, an .stl or a .3mf finer.

cad model export [--tolerance MM] [--angle DEG] [--zero STATE] [--json] SRC DST [DST ...]

In Python: cad.model.export.

ArgumentDescription
SRCA model's document id, which cad run SCRIPT.py prints: the document the engine holds of it, never built.
DST.xbf (from a STEP), .step, .glb, .stl, .3mf, .dxf (of a planar document), .xml (MJCF, its meshes in assets/ beside it) or .urdf (its meshes in meshes/ beside it): the document as its code built it. Every one is checked, a DXF's drawing too, before any is written: a refused export writes none. Repeatable.
OptionDescription
--tolerance MMMesh a .glb, an .stl or a .3mf to within this absolute tolerance, in mm (at least 0.001), where it is finer than the viewer's quarter per cent of a part: for a print whose fits are finer, or a picture whose curves are. Every destination is then a .glb, an .stl or a .3mf: export a .step or any other file in a command of its own.
--angle DEGMesh a .glb, an .stl or a .3mf to within this angular deflection, in degrees (1 to 28.5, the viewer's own): small radii drawn in more segments. Every destination is then a .glb, an .stl or a .3mf.
--zero STATETake an .xml (MJCF) or a .urdf at this mechanism state: every body posed there and each joint's value there its zero, its limits and the other states around it (as built without it).
--jsonPrint what was written as JSON, a robot description's with what it holds (robot).

cad model snapshot

Draw it as the viewer does, into a PNG.

cad model snapshot SRC OUT.png [options] | --job PACKET [SRC] [options]

In Python: cad.model.snapshot.

ArgumentDescription
SRCA model's document id, which cad run SCRIPT.py prints: the document the engine holds of it, never built; with --job, drawn in place of every job's input. Optional.
OUT.pngThe .png to write, or a folder (one that is there, or a path ending in a separator) to write <SRC's stem>_<UTC time>.png into. Optional.
OptionDescription
--job PACKETA Quick Edit packet (the .snapshot.json the viewer writes), a job or a list of jobs, as JSON or a file of it: every picture its outputs name drawn, each job's view as it was — its camera, display, hidden and isolated parts, pose — with the packet's ink and dimensions, at its output settings (padding, tightFrame, transparent, background, renderScale, sizeProfile); the other flags override every job.
--display DISPLAYA mode (solid, shaded, parts, xray, hidden-line, wireframe), exploded=AMOUNT (the parts moved apart, 0 to 1; with a mode: hidden-line,exploded=0.6), edges=CLASS (the edges of one class alone: feature, tangent or seam; edges=feature draws no line where faces meet smoothly or a face closes on itself), or the display JSON object (mode, grid, camera, clip, exploded, edges, hidden, isolated: part refs the picture leaves out, or alone draws), or a JSON file of it; a drawing takes none; a KiCad board a board mode (board, copper, assembly, placement) or {mode, side, poured, layers, active, others, zones, tracks, window: [x0, y0, x1, y1], the box of the board to frame, in its mm}; a KiCad schematic {sheet, border, title} (title: KiCad's title block, on unless false; border: the page's edge and frame). Every snapshot is drawn light.
--gridDraw the measuring grid.
--camera CAMERAA preset (iso, front, back, left, right, top, bottom), azimuth:elevation, a camera JSON object (its position, target and orthographicHalfHeight in the viewer's scene coordinates, as a Quick Edit packet carries them: a document's or a GLB's mm, a robot's m, a 3MF's unit), or authored: the view --annotation's ink was drawn in, from its Quick Edit packet, exactly.
--width WIDTH—
--height HEIGHT—
--size-profileOne of assembly, assembly-large, contact-sheet, diagnostic, labeled, presentation, presentation-large, simple, simple-square.
--previewThe viewer's Preview in place of a display mode: the model lit in a studio, in its materials, on a floor with its shadow, in perspective (a job's: "preview": true).
--pose POSEA configuration's name (a robot's SRDF group state), a configuration sequence at a time of it (walk@0.6: where the viewer's playbar shows the mechanism then), or joint and coupling values as JSON ('{"elbow": 45}', '{"curl": 0.6}'; degrees, and a slide in the file's unit: a document's mm, a robot's m): the mechanism posed there; as built without it (a robot where the viewer opens it).
--annotation FILEThe viewer's annotation file, or the Quick Edit packet (.snapshot.json) that carries it: its ink drawn over the model, on the parts it was drawn on.
--measurements FILEMeasure's dimensions (a JSON list of {start, end, label, color}; the points in the viewer's scene coordinates, as --camera's lengths), drawn over the model.
--jsonPrint what was drawn and its timings as JSON.

cad model inspect

What the document holds, then its build closure; with a ref, what one element or part is and what made it.

cad model inspect [--query {summary,structure,closure,geometry,build}] [--json] document [ref]

In Python: cad.model.inspect.

ArgumentDescription
documentA model's document id, which cad run SCRIPT.py prints: the document the engine holds of it, never built.
ref[FILE#][OWNER/]ELEMENT or [FILE#]OWNER (cad.engine.refs): OWNER a part's or an assembly's label, or its occurrence path (hand/finger.2); ELEMENT an element name (f:..., e:..., v:...) or face N (edge, vertex). An element answers what the kernel measures of it, placed where its occurrence stands, and what made it; a part or an assembly its volume, mass and world bounds, a part its placement. Without it: what the document holds (its state, parts, bounds, volume, materials, joints, couplings, states, sequences, animations and declared files), then its build closure. Optional.
OptionDescription
--queryInspect a summary and the closure (the default without REF); the structure: the summary without its bounds, volume and masses, so nothing is measured, and the closure; the closure alone; geometry (requires REF); or build metadata. Never builds a model or meshes a part; a part's volume and box are measured once by the engine and kept for its geometry. One of summary, structure, closure, geometry, build.
--jsonWithout REF, the summary (or the structure) and the closure as one JSON object (a REF's answer is JSON).

cad model dfm

Check a part for a manufacturing process: CNC machining, sheet metal, injection molding or 3D printing. Exit 0: OK. Exit 1: FAILED, a finding is an error (with --strict, a warning too). Exit 3: NOT CHECKED, something was not judged: never a pass. Exit 2: the command line's mistake.

cad model dfm [--process {cnc,sheet,molding,printing}] [--material MATERIAL] [--axes AXES] [--turning] [--tools TOOLS] [--stock STOCK] [--thickness THICKNESS] [--k-factor FACTOR] [--bend-radius RADIUS] [--kerf KERF] [--sheet-size SIZE] [--pull PULL] [--wall-limit WALL_LIMIT] [--zero-tol TOL] [--cavities CAVITIES] [--technology {fdm,sls,sla,mjf,pbf}] [--build-volume VOLUME] [--angle-limit ANGLE_LIMIT] [--samples SAMPLES] [--layer-height HEIGHT] [--nozzle NOZZLE] [--printer PRINTER] [--candidates] [--strict] [--json] SOURCE

In Python: cad.model.dfm.

ArgumentDescription
SOURCEA model's document id the engine holds (cad run SCRIPT.py prints it), or the handle its call returns.
OptionDescription
--processCnc, sheet, molding or printing; default, for a STEP, an xbf or a model, the process the parts declare (part.material = metals.aluminum(process=machined()): machined is cnc, molded molding, fdm, sls, mjf, slm and vat printing with technology fdm, sls, mjf, pbf and sla), when every part agrees. One of cnc, sheet, molding, printing.
--material MATERIALThe part's material (aluminum, steel, stainless, abs, pc, nylon, ...): picks the material's limits; default the material the part declares (part.material = metals.aluminum()), when every part agrees.
--axes AXESCnc: the milling machine's axes, 3, 4 or 5; default 3.
--turningCnc: the part is turned on a lathe (its axis found), not milled.
--tools TOOLSCnc: the end mill diameters available, in mm, comma separated (3,6,10); default none: a corner is held to the smallest tool that can exist (0.05 mm across, cad's own floor) and to how deep a tool of its size reaches; a radius of 1.25 mm or more (a 2.5 mm end mill's) is recommended.
--stock STOCKCnc: the stock's size in mm (100x60x25); default the part's box.
--thickness THICKNESSSheet: the stock's thickness in mm; default measured.
--k-factor FACTORSheet: the neutral axis's place in the thickness, for the flat pattern (the shop's bend table's); default a K-factor chart's, by the material and each bend's radius.
--bend-radius RADIUSSheet: the shop's inside bend radius in mm, compared with the part's.
--kerf KERFSheet: the cutting kerf in mm, for small features.
--sheet-size SIZESheet: the shop's largest sheet in mm (1219x2438); default a standard 5 x 10 ft sheet (3048x1524), assumed.
--pull PULLMolding: the pull direction, an axis (z, -y) or x,y,z components; default z.
--wall-limit WALL_LIMITMolding: faces at or above this many degrees from the pull are not walls; default 45.
--zero-tol TOLMolding: draft under this many degrees is zero draft; default 0.05.
--cavities CAVITIESMolding: cavities in the mold, for the clamp force; default 1.
--technologyPrinting: fdm, sls, sla, mjf or pbf (metal powder bed); default fdm. One of fdm, sls, sla, mjf, pbf.
--build-volume VOLUMEPrinting: the printer's build volume in mm (256x256x256); default a typical machine of the technology's, assumed.
--angle-limit ANGLE_LIMITPrinting: down-facing faces under this many degrees from horizontal need support; default the technology's.
--samples SAMPLESPrinting: rays cast for the wall-thickness field on a mesh; default 2000.
--layer-height HEIGHTPrinting: the layer height in mm, for stair-stepping; default the technology's.
--nozzle NOZZLEPrinting: fdm's nozzle diameter in mm; default 0.4.
--printer PRINTERPrinting: a file of the printer's settings — a 3MF OrcaSlicer or Bambu Studio saved, or a complete machine preset JSON — for its build volume and nozzle; --build-volume and --nozzle win.
--candidatesRank the candidates instead: molding the pulls (x, y, z and the part's principal axes), printing the orientations.
--strictA warning fails the check too (exit 1): a gate that takes no recommendation broken.
--jsonPrint the result as one JSON line on stdout instead of human lines.

cad model interference

Which parts share volume, as built and at each pose asked (--pose: a mechanism state, a configuration sequence at a time, or joint values): a pair with air between its parts ruled out on their meshes, every other measured exactly on the parts' own solids, the fits named on purpose (--fit A B) listed apart, and each pair it could not measure said.

cad model interference [--pose POSE] [--fit A B A B] [--min-volume MM3] [--json] ID

In Python: cad.model.interference.

ArgumentDescription
IDThe model's document id (cad run SCRIPT.py prints it).
OptionDescription
--pose POSEA pose to check at beside as built, as snapshot's --pose takes one: a mechanism state's name, a configuration sequence at a time of it (walk@0.6), or joint and coupling values as JSON ('{"elbow": 45}'). Repeatable: the check takes the poses it is given, and chooses none. Repeatable.
--fit A B A BTwo parts meant to share volume (a press-fit pin, a bearing in its bore), each a ref or a glob: their overlap is listed as a fit and is no overlap to fix. Repeatable. Repeatable.
--min-volume MM3A shared volume at or below this is none (default 0.001: the rounding along a face where two parts touch).
--jsonPrint the result as one JSON line on stdout instead of human lines.

cad model solve

A linear static stress study of a part or an assembly bonded where its parts touch.

cad model solve [--study STUDY] [--out OUT] [--occurrence OCCURRENCE] [--deck] [--verbose] [--json] SOURCE

In Python: cad.model.solve.

ArgumentDescription
SOURCEThe part or the assembly: a .step or .xbf, or a model's document id the engine holds (cad model solve), or the handle its call returns.
OptionDescription
--study STUDYThe study: a JSON file path, inline JSON, or (a library caller) a dict: the fixed faces, the loads (forces, pressures, gravity, acceleration), a material where the model has none, an assembly's parts and connections and the checks to judge. Without it, the setup.
--out OUTThe folder a solve writes its results into, made when missing; a study's alone.
--occurrence OCCURRENCEThe part whose faces the setup lists, by its name or ref, where the document holds several.
--deckAlso write ccx.inp, the input CalculiX solved (the finer solve's when there were two); a study's alone.
--verboseSay every progress line and the timings on stderr. Without it a long solve still says how far it has got about every 10 s.
--jsonPrint the result as one JSON line on stdout instead of human lines.

cad model ranges

Each joint's stops, found from the geometry: where its parts first meet another part.

cad model ranges [--step STEP] [--clearance CLEARANCE] [--joint JOINT] [--verbose] [--json] SOURCE

In Python: cad.model.ranges.

ArgumentDescription
SOURCEThe document: a .step or .xbf, or a model's document id the engine holds (cad model ranges), or the handle its call returns.
OptionDescriptionDefault
--step STEPThe sweep's step: degrees for a turning joint, millimetres for a sliding one; default 1.1
--clearance CLEARANCEHow near two parts' surfaces come before they count as touching, in millimetres; default 0.3, the least (where they all but touch): a larger one stops each joint where its parts first come that near.0.3
--joint JOINTSweep this joint alone (repeat it for several); default every joint a person moves. A name the document has no such joint by is refused, naming its joints. Repeatable.
--verboseSay on stderr each step as it starts (reading the document, sampling its surfaces, each joint) and each joint's stops as it ends (a joint or a sampling that takes long is said either way).
--jsonPrint the result as one JSON line on stdout instead of human lines.

cad xbf

XBF: The engine's own document saved as a file: an XCAF document as BinXCAF, with its build closure. Files: .xbf.

cad xbf <operation> FILE [options]

In Python: cad.xbf.

cad xbf export

Write the document to other files, each kind by its suffix (.step, .glb, .stl, .3mf, .dxf, .xbf, .xml (MJCF, its meshes beside it), .urdf (its meshes beside it)); --tolerance and --angle mesh a .glb, an .stl or a .3mf finer.

cad xbf export [--tolerance MM] [--angle DEG] [--zero STATE] [--json] SRC DST [DST ...]

In Python: cad.xbf.export.

ArgumentDescription
SRCThe .xbf file.
DST.xbf (from a STEP), .step, .glb, .stl, .3mf, .dxf (of a planar document), .xml (MJCF, its meshes in assets/ beside it) or .urdf (its meshes in meshes/ beside it): the document as its code built it. Every one is checked, a DXF's drawing too, before any is written: a refused export writes none. Repeatable.
OptionDescription
--tolerance MMMesh a .glb, an .stl or a .3mf to within this absolute tolerance, in mm (at least 0.001), where it is finer than the viewer's quarter per cent of a part: for a print whose fits are finer, or a picture whose curves are. Every destination is then a .glb, an .stl or a .3mf: export a .step or any other file in a command of its own.
--angle DEGMesh a .glb, an .stl or a .3mf to within this angular deflection, in degrees (1 to 28.5, the viewer's own): small radii drawn in more segments. Every destination is then a .glb, an .stl or a .3mf.
--zero STATETake an .xml (MJCF) or a .urdf at this mechanism state: every body posed there and each joint's value there its zero, its limits and the other states around it (as built without it).
--jsonPrint what was written as JSON, a robot description's with what it holds (robot).

cad xbf snapshot

Draw it as the viewer does, into a PNG.

cad xbf snapshot SRC OUT.png [options] | --job PACKET [SRC] [options]

In Python: cad.xbf.snapshot.

ArgumentDescription
SRCThe .xbf file; with --job, drawn in place of every job's input. Optional.
OUT.pngThe .png to write, or a folder (one that is there, or a path ending in a separator) to write <SRC's stem>_<UTC time>.png into. Optional.
OptionDescription
--job PACKETA Quick Edit packet (the .snapshot.json the viewer writes), a job or a list of jobs, as JSON or a file of it: every picture its outputs name drawn, each job's view as it was — its camera, display, hidden and isolated parts, pose — with the packet's ink and dimensions, at its output settings (padding, tightFrame, transparent, background, renderScale, sizeProfile); the other flags override every job.
--display DISPLAYA mode (solid, shaded, parts, xray, hidden-line, wireframe), exploded=AMOUNT (the parts moved apart, 0 to 1; with a mode: hidden-line,exploded=0.6), edges=CLASS (the edges of one class alone: feature, tangent or seam; edges=feature draws no line where faces meet smoothly or a face closes on itself), or the display JSON object (mode, grid, camera, clip, exploded, edges, hidden, isolated: part refs the picture leaves out, or alone draws), or a JSON file of it; a drawing takes none; a KiCad board a board mode (board, copper, assembly, placement) or {mode, side, poured, layers, active, others, zones, tracks, window: [x0, y0, x1, y1], the box of the board to frame, in its mm}; a KiCad schematic {sheet, border, title} (title: KiCad's title block, on unless false; border: the page's edge and frame). Every snapshot is drawn light.
--gridDraw the measuring grid.
--camera CAMERAA preset (iso, front, back, left, right, top, bottom), azimuth:elevation, a camera JSON object (its position, target and orthographicHalfHeight in the viewer's scene coordinates, as a Quick Edit packet carries them: a document's or a GLB's mm, a robot's m, a 3MF's unit), or authored: the view --annotation's ink was drawn in, from its Quick Edit packet, exactly.
--width WIDTH—
--height HEIGHT—
--size-profileOne of assembly, assembly-large, contact-sheet, diagnostic, labeled, presentation, presentation-large, simple, simple-square.
--previewThe viewer's Preview in place of a display mode: the model lit in a studio, in its materials, on a floor with its shadow, in perspective (a job's: "preview": true).
--pose POSEA configuration's name (a robot's SRDF group state), a configuration sequence at a time of it (walk@0.6: where the viewer's playbar shows the mechanism then), or joint and coupling values as JSON ('{"elbow": 45}', '{"curl": 0.6}'; degrees, and a slide in the file's unit: a document's mm, a robot's m): the mechanism posed there; as built without it (a robot where the viewer opens it).
--annotation FILEThe viewer's annotation file, or the Quick Edit packet (.snapshot.json) that carries it: its ink drawn over the model, on the parts it was drawn on.
--measurements FILEMeasure's dimensions (a JSON list of {start, end, label, color}; the points in the viewer's scene coordinates, as --camera's lengths), drawn over the model.
--jsonPrint what was drawn and its timings as JSON.

cad xbf inspect

What the document holds, then its build closure; with a ref, what one element or part is and what made it.

cad xbf inspect [--query {summary,structure,closure,geometry,build}] [--json] document [ref]

In Python: cad.xbf.inspect.

ArgumentDescription
documentThe .xbf file.
ref[FILE#][OWNER/]ELEMENT or [FILE#]OWNER (cad.engine.refs): OWNER a part's or an assembly's label, or its occurrence path (hand/finger.2); ELEMENT an element name (f:..., e:..., v:...) or face N (edge, vertex). An element answers what the kernel measures of it, placed where its occurrence stands, and what made it; a part or an assembly its volume, mass and world bounds, a part its placement. Without it: what the document holds (its state, parts, bounds, volume, materials, joints, couplings, states, sequences, animations and declared files), then its build closure. Optional.
OptionDescription
--queryInspect a summary and the closure (the default without REF); the structure: the summary without its bounds, volume and masses, so nothing is measured, and the closure; the closure alone; geometry (requires REF); or build metadata. Never builds a model or meshes a part; a part's volume and box are measured once by the engine and kept for its geometry. One of summary, structure, closure, geometry, build.
--jsonWithout REF, the summary (or the structure) and the closure as one JSON object (a REF's answer is JSON).

cad xbf dfm

Check a part for a manufacturing process: CNC machining, sheet metal, injection molding or 3D printing. Exit 0: OK. Exit 1: FAILED, a finding is an error (with --strict, a warning too). Exit 3: NOT CHECKED, something was not judged: never a pass. Exit 2: the command line's mistake.

cad xbf dfm [--process {cnc,sheet,molding,printing}] [--material MATERIAL] [--axes AXES] [--turning] [--tools TOOLS] [--stock STOCK] [--thickness THICKNESS] [--k-factor FACTOR] [--bend-radius RADIUS] [--kerf KERF] [--sheet-size SIZE] [--pull PULL] [--wall-limit WALL_LIMIT] [--zero-tol TOL] [--cavities CAVITIES] [--technology {fdm,sls,sla,mjf,pbf}] [--build-volume VOLUME] [--angle-limit ANGLE_LIMIT] [--samples SAMPLES] [--layer-height HEIGHT] [--nozzle NOZZLE] [--printer PRINTER] [--candidates] [--strict] [--json] SOURCE

In Python: cad.xbf.dfm.

ArgumentDescription
SOURCEThe .xbf file to check.
OptionDescription
--processCnc, sheet, molding or printing; default, for a STEP, an xbf or a model, the process the parts declare (part.material = metals.aluminum(process=machined()): machined is cnc, molded molding, fdm, sls, mjf, slm and vat printing with technology fdm, sls, mjf, pbf and sla), when every part agrees. One of cnc, sheet, molding, printing.
--material MATERIALThe part's material (aluminum, steel, stainless, abs, pc, nylon, ...): picks the material's limits; default the material the part declares (part.material = metals.aluminum()), when every part agrees.
--axes AXESCnc: the milling machine's axes, 3, 4 or 5; default 3.
--turningCnc: the part is turned on a lathe (its axis found), not milled.
--tools TOOLSCnc: the end mill diameters available, in mm, comma separated (3,6,10); default none: a corner is held to the smallest tool that can exist (0.05 mm across, cad's own floor) and to how deep a tool of its size reaches; a radius of 1.25 mm or more (a 2.5 mm end mill's) is recommended.
--stock STOCKCnc: the stock's size in mm (100x60x25); default the part's box.
--thickness THICKNESSSheet: the stock's thickness in mm; default measured.
--k-factor FACTORSheet: the neutral axis's place in the thickness, for the flat pattern (the shop's bend table's); default a K-factor chart's, by the material and each bend's radius.
--bend-radius RADIUSSheet: the shop's inside bend radius in mm, compared with the part's.
--kerf KERFSheet: the cutting kerf in mm, for small features.
--sheet-size SIZESheet: the shop's largest sheet in mm (1219x2438); default a standard 5 x 10 ft sheet (3048x1524), assumed.
--pull PULLMolding: the pull direction, an axis (z, -y) or x,y,z components; default z.
--wall-limit WALL_LIMITMolding: faces at or above this many degrees from the pull are not walls; default 45.
--zero-tol TOLMolding: draft under this many degrees is zero draft; default 0.05.
--cavities CAVITIESMolding: cavities in the mold, for the clamp force; default 1.
--technologyPrinting: fdm, sls, sla, mjf or pbf (metal powder bed); default fdm. One of fdm, sls, sla, mjf, pbf.
--build-volume VOLUMEPrinting: the printer's build volume in mm (256x256x256); default a typical machine of the technology's, assumed.
--angle-limit ANGLE_LIMITPrinting: down-facing faces under this many degrees from horizontal need support; default the technology's.
--samples SAMPLESPrinting: rays cast for the wall-thickness field on a mesh; default 2000.
--layer-height HEIGHTPrinting: the layer height in mm, for stair-stepping; default the technology's.
--nozzle NOZZLEPrinting: fdm's nozzle diameter in mm; default 0.4.
--printer PRINTERPrinting: a file of the printer's settings — a 3MF OrcaSlicer or Bambu Studio saved, or a complete machine preset JSON — for its build volume and nozzle; --build-volume and --nozzle win.
--candidatesRank the candidates instead: molding the pulls (x, y, z and the part's principal axes), printing the orientations.
--strictA warning fails the check too (exit 1): a gate that takes no recommendation broken.
--jsonPrint the result as one JSON line on stdout instead of human lines.

cad xbf interference

Which parts share volume, as built and at each pose asked (--pose: a mechanism state, a configuration sequence at a time, or joint values): a pair with air between its parts ruled out on their meshes, every other measured exactly on the parts' own solids, the fits named on purpose (--fit A B) listed apart, and each pair it could not measure said.

cad xbf interference [--pose POSE] [--fit A B A B] [--min-volume MM3] [--json] FILE

In Python: cad.xbf.interference.

ArgumentDescription
FILEThe .xbf file.
OptionDescription
--pose POSEA pose to check at beside as built, as snapshot's --pose takes one: a mechanism state's name, a configuration sequence at a time of it (walk@0.6), or joint and coupling values as JSON ('{"elbow": 45}'). Repeatable: the check takes the poses it is given, and chooses none. Repeatable.
--fit A B A BTwo parts meant to share volume (a press-fit pin, a bearing in its bore), each a ref or a glob: their overlap is listed as a fit and is no overlap to fix. Repeatable. Repeatable.
--min-volume MM3A shared volume at or below this is none (default 0.001: the rounding along a face where two parts touch).
--jsonPrint the result as one JSON line on stdout instead of human lines.

cad xbf solve

A linear static stress study of a part or an assembly bonded where its parts touch.

cad xbf solve [--study STUDY] [--out OUT] [--occurrence OCCURRENCE] [--deck] [--verbose] [--json] SOURCE

In Python: cad.xbf.solve.

ArgumentDescription
SOURCEThe part or the assembly: a .step or .xbf, or a model's document id the engine holds (cad model solve), or the handle its call returns.
OptionDescription
--study STUDYThe study: a JSON file path, inline JSON, or (a library caller) a dict: the fixed faces, the loads (forces, pressures, gravity, acceleration), a material where the model has none, an assembly's parts and connections and the checks to judge. Without it, the setup.
--out OUTThe folder a solve writes its results into, made when missing; a study's alone.
--occurrence OCCURRENCEThe part whose faces the setup lists, by its name or ref, where the document holds several.
--deckAlso write ccx.inp, the input CalculiX solved (the finer solve's when there were two); a study's alone.
--verboseSay every progress line and the timings on stderr. Without it a long solve still says how far it has got about every 10 s.
--jsonPrint the result as one JSON line on stdout instead of human lines.

cad xbf ranges

Each joint's stops, found from the geometry: where its parts first meet another part.

cad xbf ranges [--step STEP] [--clearance CLEARANCE] [--joint JOINT] [--verbose] [--json] SOURCE

In Python: cad.xbf.ranges.

ArgumentDescription
SOURCEThe document: a .step or .xbf, or a model's document id the engine holds (cad model ranges), or the handle its call returns.
OptionDescriptionDefault
--step STEPThe sweep's step: degrees for a turning joint, millimetres for a sliding one; default 1.1
--clearance CLEARANCEHow near two parts' surfaces come before they count as touching, in millimetres; default 0.3, the least (where they all but touch): a larger one stops each joint where its parts first come that near.0.3
--joint JOINTSweep this joint alone (repeat it for several); default every joint a person moves. A name the document has no such joint by is refused, naming its joints. Repeatable.
--verboseSay on stderr each step as it starts (reading the document, sampling its surfaces, each joint) and each joint's stops as it ends (a joint or a sampling that takes long is said either way).
--jsonPrint the result as one JSON line on stdout instead of human lines.

cad step

STEP: An ISO 10303 (AP242) exchange file of exact geometry. Files: .step, .stp.

cad step <operation> FILE [options]

In Python: cad.step.

cad step export

Write the document to other files, each kind by its suffix (.step, .glb, .stl, .3mf, .dxf, .xbf, .xml (MJCF, its meshes beside it), .urdf (its meshes beside it)); --tolerance and --angle mesh a .glb, an .stl or a .3mf finer.

cad step export [--tolerance MM] [--angle DEG] [--zero STATE] [--json] SRC DST [DST ...]

In Python: cad.step.export.

ArgumentDescription
SRCThe .step or .stp file.
DST.xbf (from a STEP), .step, .glb, .stl, .3mf, .dxf (of a planar document), .xml (MJCF, its meshes in assets/ beside it) or .urdf (its meshes in meshes/ beside it): the document as its code built it. Every one is checked, a DXF's drawing too, before any is written: a refused export writes none. Repeatable.
OptionDescription
--tolerance MMMesh a .glb, an .stl or a .3mf to within this absolute tolerance, in mm (at least 0.001), where it is finer than the viewer's quarter per cent of a part: for a print whose fits are finer, or a picture whose curves are. Every destination is then a .glb, an .stl or a .3mf: export a .step or any other file in a command of its own.
--angle DEGMesh a .glb, an .stl or a .3mf to within this angular deflection, in degrees (1 to 28.5, the viewer's own): small radii drawn in more segments. Every destination is then a .glb, an .stl or a .3mf.
--zero STATETake an .xml (MJCF) or a .urdf at this mechanism state: every body posed there and each joint's value there its zero, its limits and the other states around it (as built without it).
--jsonPrint what was written as JSON, a robot description's with what it holds (robot).

cad step snapshot

Draw it as the viewer does, into a PNG.

cad step snapshot SRC OUT.png [options] | --job PACKET [SRC] [options]

In Python: cad.step.snapshot.

ArgumentDescription
SRCThe .step or .stp file; with --job, drawn in place of every job's input. Optional.
OUT.pngThe .png to write, or a folder (one that is there, or a path ending in a separator) to write <SRC's stem>_<UTC time>.png into. Optional.
OptionDescription
--job PACKETA Quick Edit packet (the .snapshot.json the viewer writes), a job or a list of jobs, as JSON or a file of it: every picture its outputs name drawn, each job's view as it was — its camera, display, hidden and isolated parts, pose — with the packet's ink and dimensions, at its output settings (padding, tightFrame, transparent, background, renderScale, sizeProfile); the other flags override every job.
--display DISPLAYA mode (solid, shaded, parts, xray, hidden-line, wireframe), exploded=AMOUNT (the parts moved apart, 0 to 1; with a mode: hidden-line,exploded=0.6), edges=CLASS (the edges of one class alone: feature, tangent or seam; edges=feature draws no line where faces meet smoothly or a face closes on itself), or the display JSON object (mode, grid, camera, clip, exploded, edges, hidden, isolated: part refs the picture leaves out, or alone draws), or a JSON file of it; a drawing takes none; a KiCad board a board mode (board, copper, assembly, placement) or {mode, side, poured, layers, active, others, zones, tracks, window: [x0, y0, x1, y1], the box of the board to frame, in its mm}; a KiCad schematic {sheet, border, title} (title: KiCad's title block, on unless false; border: the page's edge and frame). Every snapshot is drawn light.
--gridDraw the measuring grid.
--camera CAMERAA preset (iso, front, back, left, right, top, bottom), azimuth:elevation, a camera JSON object (its position, target and orthographicHalfHeight in the viewer's scene coordinates, as a Quick Edit packet carries them: a document's or a GLB's mm, a robot's m, a 3MF's unit), or authored: the view --annotation's ink was drawn in, from its Quick Edit packet, exactly.
--width WIDTH—
--height HEIGHT—
--size-profileOne of assembly, assembly-large, contact-sheet, diagnostic, labeled, presentation, presentation-large, simple, simple-square.
--previewThe viewer's Preview in place of a display mode: the model lit in a studio, in its materials, on a floor with its shadow, in perspective (a job's: "preview": true).
--pose POSEA configuration's name (a robot's SRDF group state), a configuration sequence at a time of it (walk@0.6: where the viewer's playbar shows the mechanism then), or joint and coupling values as JSON ('{"elbow": 45}', '{"curl": 0.6}'; degrees, and a slide in the file's unit: a document's mm, a robot's m): the mechanism posed there; as built without it (a robot where the viewer opens it).
--annotation FILEThe viewer's annotation file, or the Quick Edit packet (.snapshot.json) that carries it: its ink drawn over the model, on the parts it was drawn on.
--measurements FILEMeasure's dimensions (a JSON list of {start, end, label, color}; the points in the viewer's scene coordinates, as --camera's lengths), drawn over the model.
--jsonPrint what was drawn and its timings as JSON.

cad step inspect

What the document holds, then its build closure; with a ref, what one element or part is and what made it.

cad step inspect [--query {summary,structure,closure,geometry,build}] [--json] document [ref]

In Python: cad.step.inspect.

ArgumentDescription
documentThe .step or .stp file.
ref[FILE#][OWNER/]ELEMENT or [FILE#]OWNER (cad.engine.refs): OWNER a part's or an assembly's label, or its occurrence path (hand/finger.2); ELEMENT an element name (f:..., e:..., v:...) or face N (edge, vertex). An element answers what the kernel measures of it, placed where its occurrence stands, and what made it; a part or an assembly its volume, mass and world bounds, a part its placement. Without it: what the document holds (its state, parts, bounds, volume, materials, joints, couplings, states, sequences, animations and declared files), then its build closure. Optional.
OptionDescription
--queryInspect a summary and the closure (the default without REF); the structure: the summary without its bounds, volume and masses, so nothing is measured, and the closure; the closure alone; geometry (requires REF); or build metadata. Never builds a model or meshes a part; a part's volume and box are measured once by the engine and kept for its geometry. One of summary, structure, closure, geometry, build.
--jsonWithout REF, the summary (or the structure) and the closure as one JSON object (a REF's answer is JSON).

cad step dfm

Check a part for a manufacturing process: CNC machining, sheet metal, injection molding or 3D printing. Exit 0: OK. Exit 1: FAILED, a finding is an error (with --strict, a warning too). Exit 3: NOT CHECKED, something was not judged: never a pass. Exit 2: the command line's mistake.

cad step dfm [--process {cnc,sheet,molding,printing}] [--material MATERIAL] [--axes AXES] [--turning] [--tools TOOLS] [--stock STOCK] [--thickness THICKNESS] [--k-factor FACTOR] [--bend-radius RADIUS] [--kerf KERF] [--sheet-size SIZE] [--pull PULL] [--wall-limit WALL_LIMIT] [--zero-tol TOL] [--cavities CAVITIES] [--technology {fdm,sls,sla,mjf,pbf}] [--build-volume VOLUME] [--angle-limit ANGLE_LIMIT] [--samples SAMPLES] [--layer-height HEIGHT] [--nozzle NOZZLE] [--printer PRINTER] [--candidates] [--strict] [--json] SOURCE

In Python: cad.step.dfm.

ArgumentDescription
SOURCEThe .step or .stp file to check.
OptionDescription
--processCnc, sheet, molding or printing; default, for a STEP, an xbf or a model, none: a STEP keeps no process. One of cnc, sheet, molding, printing.
--material MATERIALThe part's material (aluminum, steel, stainless, abs, pc, nylon, ...): picks the material's limits; default the material the part declares (part.material = metals.aluminum()), when every part agrees.
--axes AXESCnc: the milling machine's axes, 3, 4 or 5; default 3.
--turningCnc: the part is turned on a lathe (its axis found), not milled.
--tools TOOLSCnc: the end mill diameters available, in mm, comma separated (3,6,10); default none: a corner is held to the smallest tool that can exist (0.05 mm across, cad's own floor) and to how deep a tool of its size reaches; a radius of 1.25 mm or more (a 2.5 mm end mill's) is recommended.
--stock STOCKCnc: the stock's size in mm (100x60x25); default the part's box.
--thickness THICKNESSSheet: the stock's thickness in mm; default measured.
--k-factor FACTORSheet: the neutral axis's place in the thickness, for the flat pattern (the shop's bend table's); default a K-factor chart's, by the material and each bend's radius.
--bend-radius RADIUSSheet: the shop's inside bend radius in mm, compared with the part's.
--kerf KERFSheet: the cutting kerf in mm, for small features.
--sheet-size SIZESheet: the shop's largest sheet in mm (1219x2438); default a standard 5 x 10 ft sheet (3048x1524), assumed.
--pull PULLMolding: the pull direction, an axis (z, -y) or x,y,z components; default z.
--wall-limit WALL_LIMITMolding: faces at or above this many degrees from the pull are not walls; default 45.
--zero-tol TOLMolding: draft under this many degrees is zero draft; default 0.05.
--cavities CAVITIESMolding: cavities in the mold, for the clamp force; default 1.
--technologyPrinting: fdm, sls, sla, mjf or pbf (metal powder bed); default fdm. One of fdm, sls, sla, mjf, pbf.
--build-volume VOLUMEPrinting: the printer's build volume in mm (256x256x256); default a typical machine of the technology's, assumed.
--angle-limit ANGLE_LIMITPrinting: down-facing faces under this many degrees from horizontal need support; default the technology's.
--samples SAMPLESPrinting: rays cast for the wall-thickness field on a mesh; default 2000.
--layer-height HEIGHTPrinting: the layer height in mm, for stair-stepping; default the technology's.
--nozzle NOZZLEPrinting: fdm's nozzle diameter in mm; default 0.4.
--printer PRINTERPrinting: a file of the printer's settings — a 3MF OrcaSlicer or Bambu Studio saved, or a complete machine preset JSON — for its build volume and nozzle; --build-volume and --nozzle win.
--candidatesRank the candidates instead: molding the pulls (x, y, z and the part's principal axes), printing the orientations.
--strictA warning fails the check too (exit 1): a gate that takes no recommendation broken.
--jsonPrint the result as one JSON line on stdout instead of human lines.

cad step interference

Which parts share volume, as built and at each pose asked (--pose: a mechanism state, a configuration sequence at a time, or joint values): a pair with air between its parts ruled out on their meshes, every other measured exactly on the parts' own solids, the fits named on purpose (--fit A B) listed apart, and each pair it could not measure said.

cad step interference [--pose POSE] [--fit A B A B] [--min-volume MM3] [--json] FILE

In Python: cad.step.interference.

ArgumentDescription
FILEThe .step file.
OptionDescription
--pose POSEA pose to check at beside as built, as snapshot's --pose takes one: a mechanism state's name, a configuration sequence at a time of it (walk@0.6), or joint and coupling values as JSON ('{"elbow": 45}'). Repeatable: the check takes the poses it is given, and chooses none. Repeatable.
--fit A B A BTwo parts meant to share volume (a press-fit pin, a bearing in its bore), each a ref or a glob: their overlap is listed as a fit and is no overlap to fix. Repeatable. Repeatable.
--min-volume MM3A shared volume at or below this is none (default 0.001: the rounding along a face where two parts touch).
--jsonPrint the result as one JSON line on stdout instead of human lines.

cad step solve

A linear static stress study of a part or an assembly bonded where its parts touch.

cad step solve [--study STUDY] [--out OUT] [--occurrence OCCURRENCE] [--deck] [--verbose] [--json] SOURCE

In Python: cad.step.solve.

ArgumentDescription
SOURCEThe part or the assembly: a .step or .xbf, or a model's document id the engine holds (cad model solve), or the handle its call returns.
OptionDescription
--study STUDYThe study: a JSON file path, inline JSON, or (a library caller) a dict: the fixed faces, the loads (forces, pressures, gravity, acceleration), a material where the model has none, an assembly's parts and connections and the checks to judge. Without it, the setup.
--out OUTThe folder a solve writes its results into, made when missing; a study's alone.
--occurrence OCCURRENCEThe part whose faces the setup lists, by its name or ref, where the document holds several.
--deckAlso write ccx.inp, the input CalculiX solved (the finer solve's when there were two); a study's alone.
--verboseSay every progress line and the timings on stderr. Without it a long solve still says how far it has got about every 10 s.
--jsonPrint the result as one JSON line on stdout instead of human lines.

cad step ranges

Each joint's stops, found from the geometry: where its parts first meet another part.

cad step ranges [--step STEP] [--clearance CLEARANCE] [--joint JOINT] [--verbose] [--json] SOURCE

In Python: cad.step.ranges.

ArgumentDescription
SOURCEThe document: a .step or .xbf, or a model's document id the engine holds (cad model ranges), or the handle its call returns.
OptionDescriptionDefault
--step STEPThe sweep's step: degrees for a turning joint, millimetres for a sliding one; default 1.1
--clearance CLEARANCEHow near two parts' surfaces come before they count as touching, in millimetres; default 0.3, the least (where they all but touch): a larger one stops each joint where its parts first come that near.0.3
--joint JOINTSweep this joint alone (repeat it for several); default every joint a person moves. A name the document has no such joint by is refused, naming its joints. Repeatable.
--verboseSay on stderr each step as it starts (reading the document, sampling its surfaces, each joint) and each joint's stops as it ends (a joint or a sampling that takes long is said either way).
--jsonPrint the result as one JSON line on stdout instead of human lines.

cad stl

STL: A binary STL of one triangle mesh. Files: .stl.

cad stl <operation> FILE [options]

In Python: cad.stl.

cad stl export

Write the mesh to the other mesh kinds (.glb, .stl, .3mf).

cad stl export [--json] SRC DST [DST ...]

In Python: cad.stl.export.

ArgumentDescription
SRCThe .stl file.
DSTThe other mesh kinds (.glb, .stl, .3mf), each holding what its format carries. Repeatable.
OptionDescription
--jsonPrint what was written as JSON.

cad stl snapshot

Draw it as the viewer does, into a PNG.

cad stl snapshot SRC OUT.png [options] | --job PACKET [SRC] [options]

In Python: cad.stl.snapshot.

ArgumentDescription
SRCThe .stl file; with --job, drawn in place of every job's input. Optional.
OUT.pngThe .png to write, or a folder (one that is there, or a path ending in a separator) to write <SRC's stem>_<UTC time>.png into. Optional.
OptionDescription
--job PACKETA Quick Edit packet (the .snapshot.json the viewer writes), a job or a list of jobs, as JSON or a file of it: every picture its outputs name drawn, each job's view as it was — its camera, display, hidden and isolated parts, pose — with the packet's ink and dimensions, at its output settings (padding, tightFrame, transparent, background, renderScale, sizeProfile); the other flags override every job.
--display DISPLAYA mode (solid, shaded, parts, xray, hidden-line, wireframe), exploded=AMOUNT (the parts moved apart, 0 to 1; with a mode: hidden-line,exploded=0.6), edges=CLASS (the edges of one class alone: feature, tangent or seam; edges=feature draws no line where faces meet smoothly or a face closes on itself), or the display JSON object (mode, grid, camera, clip, exploded, edges, hidden, isolated: part refs the picture leaves out, or alone draws), or a JSON file of it; a drawing takes none; a KiCad board a board mode (board, copper, assembly, placement) or {mode, side, poured, layers, active, others, zones, tracks, window: [x0, y0, x1, y1], the box of the board to frame, in its mm}; a KiCad schematic {sheet, border, title} (title: KiCad's title block, on unless false; border: the page's edge and frame). Every snapshot is drawn light.
--gridDraw the measuring grid.
--camera CAMERAA preset (iso, front, back, left, right, top, bottom), azimuth:elevation, a camera JSON object (its position, target and orthographicHalfHeight in the viewer's scene coordinates, as a Quick Edit packet carries them: a document's or a GLB's mm, a robot's m, a 3MF's unit), or authored: the view --annotation's ink was drawn in, from its Quick Edit packet, exactly.
--width WIDTH—
--height HEIGHT—
--size-profileOne of assembly, assembly-large, contact-sheet, diagnostic, labeled, presentation, presentation-large, simple, simple-square.
--previewThe viewer's Preview in place of a display mode: the model lit in a studio, in its materials, on a floor with its shadow, in perspective (a job's: "preview": true).
--pose POSEA configuration's name (a robot's SRDF group state), a configuration sequence at a time of it (walk@0.6: where the viewer's playbar shows the mechanism then), or joint and coupling values as JSON ('{"elbow": 45}', '{"curl": 0.6}'; degrees, and a slide in the file's unit: a document's mm, a robot's m): the mechanism posed there; as built without it (a robot where the viewer opens it).
--annotation FILEThe viewer's annotation file, or the Quick Edit packet (.snapshot.json) that carries it: its ink drawn over the model, on the parts it was drawn on.
--measurements FILEMeasure's dimensions (a JSON list of {start, end, label, color}; the points in the viewer's scene coordinates, as --camera's lengths), drawn over the model.
--jsonPrint what was drawn and its timings as JSON.

cad stl dfm

Check a mesh for 3D printing. Exit 0: OK. Exit 1: FAILED, a finding is an error (with --strict, a warning too). Exit 3: NOT CHECKED, something was not judged: never a pass. Exit 2: the command line's mistake.

cad stl dfm [--process {cnc,sheet,molding,printing}] [--material MATERIAL] [--units {mm,cm,m,in,ft}] [--technology {fdm,sls,sla,mjf,pbf}] [--build-volume VOLUME] [--angle-limit LIMIT] [--samples SAMPLES] [--layer-height HEIGHT] [--nozzle NOZZLE] [--printer PRINTER] [--candidates] [--strict] [--json] SOURCE

In Python: cad.stl.dfm.

ArgumentDescription
SOURCEThe .stl file to check.
OptionDescriptionDefault
--processPrinting, the one process a mesh is checked for (the default); cnc, sheet and molding are judged on exact geometry: check the part's STEP or model for them. One of cnc, sheet, molding, printing.printing
--material MATERIALThe part's material (aluminum, steel, stainless, abs, pc, nylon, ...): picks the material's limits; default the material the part declares (part.material = metals.aluminum()), when every part agrees.
--unitsThe file's length units (mm, cm, m, in, ft): an STL's (default mm), or a DXF's (default the ones it declares; needed where it declares none, as an R12 file). One of mm, cm, m, in, ft.
--technologyPrinting: fdm, sls, sla, mjf or pbf (metal powder bed); default fdm. One of fdm, sls, sla, mjf, pbf.
--build-volume VOLUMEPrinting: the printer's build volume in mm (256x256x256); default a typical machine of the technology's, assumed.
--angle-limit LIMITPrinting: down-facing faces under this many degrees from horizontal need support; default the technology's.
--samples SAMPLESPrinting: rays cast for the wall-thickness field on a mesh; default 2000.
--layer-height HEIGHTPrinting: the layer height in mm, for stair-stepping; default the technology's.
--nozzle NOZZLEPrinting: fdm's nozzle diameter in mm; default 0.4.
--printer PRINTERPrinting: a file of the printer's settings — a 3MF OrcaSlicer or Bambu Studio saved, or a complete machine preset JSON — for its build volume and nozzle; --build-volume and --nozzle win.
--candidatesRank the candidates instead: printing the orientations.
--strictA warning fails the check too (exit 1): a gate that takes no recommendation broken.
--jsonPrint the result as one JSON line on stdout instead of human lines.

cad glb

GLB: A binary glTF scene of triangle meshes. Files: .glb.

cad glb <operation> FILE [options]

In Python: cad.glb.

cad glb export

Write the mesh to the other mesh kinds (.glb, .stl, .3mf).

cad glb export [--json] SRC DST [DST ...]

In Python: cad.glb.export.

ArgumentDescription
SRCThe .glb file.
DSTThe other mesh kinds (.glb, .stl, .3mf), each holding what its format carries. Repeatable.
OptionDescription
--jsonPrint what was written as JSON.

cad glb snapshot

Draw it as the viewer does, into a PNG.

cad glb snapshot SRC OUT.png [options] | --job PACKET [SRC] [options]

In Python: cad.glb.snapshot.

ArgumentDescription
SRCThe .glb file; with --job, drawn in place of every job's input. Optional.
OUT.pngThe .png to write, or a folder (one that is there, or a path ending in a separator) to write <SRC's stem>_<UTC time>.png into. Optional.
OptionDescription
--job PACKETA Quick Edit packet (the .snapshot.json the viewer writes), a job or a list of jobs, as JSON or a file of it: every picture its outputs name drawn, each job's view as it was — its camera, display, hidden and isolated parts, pose — with the packet's ink and dimensions, at its output settings (padding, tightFrame, transparent, background, renderScale, sizeProfile); the other flags override every job.
--display DISPLAYA mode (solid, shaded, parts, xray, hidden-line, wireframe), exploded=AMOUNT (the parts moved apart, 0 to 1; with a mode: hidden-line,exploded=0.6), edges=CLASS (the edges of one class alone: feature, tangent or seam; edges=feature draws no line where faces meet smoothly or a face closes on itself), or the display JSON object (mode, grid, camera, clip, exploded, edges, hidden, isolated: part refs the picture leaves out, or alone draws), or a JSON file of it; a drawing takes none; a KiCad board a board mode (board, copper, assembly, placement) or {mode, side, poured, layers, active, others, zones, tracks, window: [x0, y0, x1, y1], the box of the board to frame, in its mm}; a KiCad schematic {sheet, border, title} (title: KiCad's title block, on unless false; border: the page's edge and frame). Every snapshot is drawn light.
--gridDraw the measuring grid.
--camera CAMERAA preset (iso, front, back, left, right, top, bottom), azimuth:elevation, a camera JSON object (its position, target and orthographicHalfHeight in the viewer's scene coordinates, as a Quick Edit packet carries them: a document's or a GLB's mm, a robot's m, a 3MF's unit), or authored: the view --annotation's ink was drawn in, from its Quick Edit packet, exactly.
--width WIDTH—
--height HEIGHT—
--size-profileOne of assembly, assembly-large, contact-sheet, diagnostic, labeled, presentation, presentation-large, simple, simple-square.
--previewThe viewer's Preview in place of a display mode: the model lit in a studio, in its materials, on a floor with its shadow, in perspective (a job's: "preview": true).
--pose POSEA configuration's name (a robot's SRDF group state), a configuration sequence at a time of it (walk@0.6: where the viewer's playbar shows the mechanism then), or joint and coupling values as JSON ('{"elbow": 45}', '{"curl": 0.6}'; degrees, and a slide in the file's unit: a document's mm, a robot's m): the mechanism posed there; as built without it (a robot where the viewer opens it).
--annotation FILEThe viewer's annotation file, or the Quick Edit packet (.snapshot.json) that carries it: its ink drawn over the model, on the parts it was drawn on.
--measurements FILEMeasure's dimensions (a JSON list of {start, end, label, color}; the points in the viewer's scene coordinates, as --camera's lengths), drawn over the model.
--jsonPrint what was drawn and its timings as JSON.

cad glb inspect

Its nodes, meshes and animations.

cad glb inspect [--query {summary,structure,closure,geometry,build}] [--json] document [ref]

In Python: cad.glb.inspect.

ArgumentDescription
documentThe .glb file.
ref[FILE#][OWNER/]ELEMENT or [FILE#]OWNER (cad.engine.refs): OWNER a part's or an assembly's label, or its occurrence path (hand/finger.2); ELEMENT an element name (f:..., e:..., v:...) or face N (edge, vertex). An element answers what the kernel measures of it, placed where its occurrence stands, and what made it; a part or an assembly its volume, mass and world bounds, a part its placement. Without it: what the document holds (its state, parts, bounds, volume, materials, joints, couplings, states, sequences, animations and declared files), then its build closure. Optional.
OptionDescription
--queryInspect a summary and the closure (the default without REF); the structure: the summary without its bounds, volume and masses, so nothing is measured, and the closure; the closure alone; geometry (requires REF); or build metadata. Never builds a model or meshes a part; a part's volume and box are measured once by the engine and kept for its geometry. One of summary, structure, closure, geometry, build.
--jsonWithout REF, the summary (or the structure) and the closure as one JSON object (a REF's answer is JSON).

cad glb dfm

Check a mesh for 3D printing. Exit 0: OK. Exit 1: FAILED, a finding is an error (with --strict, a warning too). Exit 3: NOT CHECKED, something was not judged: never a pass. Exit 2: the command line's mistake.

cad glb dfm [--process {cnc,sheet,molding,printing}] [--material MATERIAL] [--technology {fdm,sls,sla,mjf,pbf}] [--build-volume VOLUME] [--angle-limit LIMIT] [--samples SAMPLES] [--layer-height HEIGHT] [--nozzle NOZZLE] [--printer PRINTER] [--candidates] [--strict] [--json] SOURCE

In Python: cad.glb.dfm.

ArgumentDescription
SOURCEThe .glb file to check.
OptionDescriptionDefault
--processPrinting, the one process a mesh is checked for (the default); cnc, sheet and molding are judged on exact geometry: check the part's STEP or model for them. One of cnc, sheet, molding, printing.printing
--material MATERIALThe part's material (aluminum, steel, stainless, abs, pc, nylon, ...): picks the material's limits; default the material the part declares (part.material = metals.aluminum()), when every part agrees.
--technologyPrinting: fdm, sls, sla, mjf or pbf (metal powder bed); default fdm. One of fdm, sls, sla, mjf, pbf.
--build-volume VOLUMEPrinting: the printer's build volume in mm (256x256x256); default a typical machine of the technology's, assumed.
--angle-limit LIMITPrinting: down-facing faces under this many degrees from horizontal need support; default the technology's.
--samples SAMPLESPrinting: rays cast for the wall-thickness field on a mesh; default 2000.
--layer-height HEIGHTPrinting: the layer height in mm, for stair-stepping; default the technology's.
--nozzle NOZZLEPrinting: fdm's nozzle diameter in mm; default 0.4.
--printer PRINTERPrinting: a file of the printer's settings — a 3MF OrcaSlicer or Bambu Studio saved, or a complete machine preset JSON — for its build volume and nozzle; --build-volume and --nozzle win.
--candidatesRank the candidates instead: printing the orientations.
--strictA warning fails the check too (exit 1): a gate that takes no recommendation broken.
--jsonPrint the result as one JSON line on stdout instead of human lines.

cad threemf

3MF: A 3D Manufacturing Format package of triangle meshes. Files: .3mf.

cad threemf <operation> FILE [options]

In Python: cad.threemf.

cad threemf export

Write the mesh to the other mesh kinds (.glb, .stl, .3mf).

cad threemf export [--json] SRC DST [DST ...]

In Python: cad.threemf.export.

ArgumentDescription
SRCThe .3mf file.
DSTThe other mesh kinds (.glb, .stl, .3mf), each holding what its format carries. Repeatable.
OptionDescription
--jsonPrint what was written as JSON.

cad threemf snapshot

Draw it as the viewer does, into a PNG.

cad threemf snapshot SRC OUT.png [options] | --job PACKET [SRC] [options]

In Python: cad.threemf.snapshot.

ArgumentDescription
SRCThe .3mf file; with --job, drawn in place of every job's input. Optional.
OUT.pngThe .png to write, or a folder (one that is there, or a path ending in a separator) to write <SRC's stem>_<UTC time>.png into. Optional.
OptionDescription
--job PACKETA Quick Edit packet (the .snapshot.json the viewer writes), a job or a list of jobs, as JSON or a file of it: every picture its outputs name drawn, each job's view as it was — its camera, display, hidden and isolated parts, pose — with the packet's ink and dimensions, at its output settings (padding, tightFrame, transparent, background, renderScale, sizeProfile); the other flags override every job.
--display DISPLAYA mode (solid, shaded, parts, xray, hidden-line, wireframe), exploded=AMOUNT (the parts moved apart, 0 to 1; with a mode: hidden-line,exploded=0.6), edges=CLASS (the edges of one class alone: feature, tangent or seam; edges=feature draws no line where faces meet smoothly or a face closes on itself), or the display JSON object (mode, grid, camera, clip, exploded, edges, hidden, isolated: part refs the picture leaves out, or alone draws), or a JSON file of it; a drawing takes none; a KiCad board a board mode (board, copper, assembly, placement) or {mode, side, poured, layers, active, others, zones, tracks, window: [x0, y0, x1, y1], the box of the board to frame, in its mm}; a KiCad schematic {sheet, border, title} (title: KiCad's title block, on unless false; border: the page's edge and frame). Every snapshot is drawn light.
--gridDraw the measuring grid.
--camera CAMERAA preset (iso, front, back, left, right, top, bottom), azimuth:elevation, a camera JSON object (its position, target and orthographicHalfHeight in the viewer's scene coordinates, as a Quick Edit packet carries them: a document's or a GLB's mm, a robot's m, a 3MF's unit), or authored: the view --annotation's ink was drawn in, from its Quick Edit packet, exactly.
--width WIDTH—
--height HEIGHT—
--size-profileOne of assembly, assembly-large, contact-sheet, diagnostic, labeled, presentation, presentation-large, simple, simple-square.
--previewThe viewer's Preview in place of a display mode: the model lit in a studio, in its materials, on a floor with its shadow, in perspective (a job's: "preview": true).
--pose POSEA configuration's name (a robot's SRDF group state), a configuration sequence at a time of it (walk@0.6: where the viewer's playbar shows the mechanism then), or joint and coupling values as JSON ('{"elbow": 45}', '{"curl": 0.6}'; degrees, and a slide in the file's unit: a document's mm, a robot's m): the mechanism posed there; as built without it (a robot where the viewer opens it).
--annotation FILEThe viewer's annotation file, or the Quick Edit packet (.snapshot.json) that carries it: its ink drawn over the model, on the parts it was drawn on.
--measurements FILEMeasure's dimensions (a JSON list of {start, end, label, color}; the points in the viewer's scene coordinates, as --camera's lengths), drawn over the model.
--jsonPrint what was drawn and its timings as JSON.

cad threemf dfm

Check a mesh for 3D printing. Exit 0: OK. Exit 1: FAILED, a finding is an error (with --strict, a warning too). Exit 3: NOT CHECKED, something was not judged: never a pass. Exit 2: the command line's mistake.

cad threemf dfm [--process {cnc,sheet,molding,printing}] [--material MATERIAL] [--technology {fdm,sls,sla,mjf,pbf}] [--build-volume VOLUME] [--angle-limit LIMIT] [--samples SAMPLES] [--layer-height HEIGHT] [--nozzle NOZZLE] [--printer PRINTER] [--candidates] [--strict] [--json] SOURCE

In Python: cad.threemf.dfm.

ArgumentDescription
SOURCEThe .3mf file to check.
OptionDescriptionDefault
--processPrinting, the one process a mesh is checked for (the default); cnc, sheet and molding are judged on exact geometry: check the part's STEP or model for them. One of cnc, sheet, molding, printing.printing
--material MATERIALThe part's material (aluminum, steel, stainless, abs, pc, nylon, ...): picks the material's limits; default the material the part declares (part.material = metals.aluminum()), when every part agrees.
--technologyPrinting: fdm, sls, sla, mjf or pbf (metal powder bed); default fdm. One of fdm, sls, sla, mjf, pbf.
--build-volume VOLUMEPrinting: the printer's build volume in mm (256x256x256); default a typical machine of the technology's, assumed.
--angle-limit LIMITPrinting: down-facing faces under this many degrees from horizontal need support; default the technology's.
--samples SAMPLESPrinting: rays cast for the wall-thickness field on a mesh; default 2000.
--layer-height HEIGHTPrinting: the layer height in mm, for stair-stepping; default the technology's.
--nozzle NOZZLEPrinting: fdm's nozzle diameter in mm; default 0.4.
--printer PRINTERPrinting: a file of the printer's settings — a 3MF OrcaSlicer or Bambu Studio saved, or a complete machine preset JSON — for its build volume and nozzle; --build-volume and --nozzle win.
--candidatesRank the candidates instead: printing the orientations.
--strictA warning fails the check too (exit 1): a gate that takes no recommendation broken.
--jsonPrint the result as one JSON line on stdout instead of human lines.

cad dxf

DXF: A 2D drawing of a planar document. Files: .dxf.

cad dxf <operation> FILE [options]

In Python: cad.dxf.

cad dxf snapshot

Draw it as the viewer does, into a PNG.

cad dxf snapshot SRC OUT.png [options] | --job PACKET [SRC] [options]

In Python: cad.dxf.snapshot.

ArgumentDescription
SRCThe .dxf file; with --job, drawn in place of every job's input. Optional.
OUT.pngThe .png to write, or a folder (one that is there, or a path ending in a separator) to write <SRC's stem>_<UTC time>.png into. Optional.
OptionDescription
--job PACKETA Quick Edit packet (the .snapshot.json the viewer writes), a job or a list of jobs, as JSON or a file of it: every picture its outputs name drawn, each job's view as it was — its camera, display, hidden and isolated parts, pose — with the packet's ink and dimensions, at its output settings (padding, tightFrame, transparent, background, renderScale, sizeProfile); the other flags override every job.
--display DISPLAYA mode (solid, shaded, parts, xray, hidden-line, wireframe), exploded=AMOUNT (the parts moved apart, 0 to 1; with a mode: hidden-line,exploded=0.6), edges=CLASS (the edges of one class alone: feature, tangent or seam; edges=feature draws no line where faces meet smoothly or a face closes on itself), or the display JSON object (mode, grid, camera, clip, exploded, edges, hidden, isolated: part refs the picture leaves out, or alone draws), or a JSON file of it; a drawing takes none; a KiCad board a board mode (board, copper, assembly, placement) or {mode, side, poured, layers, active, others, zones, tracks, window: [x0, y0, x1, y1], the box of the board to frame, in its mm}; a KiCad schematic {sheet, border, title} (title: KiCad's title block, on unless false; border: the page's edge and frame). Every snapshot is drawn light.
--gridDraw the measuring grid.
--camera CAMERAA preset (iso, front, back, left, right, top, bottom), azimuth:elevation, a camera JSON object (its position, target and orthographicHalfHeight in the viewer's scene coordinates, as a Quick Edit packet carries them: a document's or a GLB's mm, a robot's m, a 3MF's unit), or authored: the view --annotation's ink was drawn in, from its Quick Edit packet, exactly.
--width WIDTH—
--height HEIGHT—
--size-profileOne of assembly, assembly-large, contact-sheet, diagnostic, labeled, presentation, presentation-large, simple, simple-square.
--previewThe viewer's Preview in place of a display mode: the model lit in a studio, in its materials, on a floor with its shadow, in perspective (a job's: "preview": true).
--pose POSEA configuration's name (a robot's SRDF group state), a configuration sequence at a time of it (walk@0.6: where the viewer's playbar shows the mechanism then), or joint and coupling values as JSON ('{"elbow": 45}', '{"curl": 0.6}'; degrees, and a slide in the file's unit: a document's mm, a robot's m): the mechanism posed there; as built without it (a robot where the viewer opens it).
--annotation FILEThe viewer's annotation file, or the Quick Edit packet (.snapshot.json) that carries it: its ink drawn over the model, on the parts it was drawn on.
--measurements FILEMeasure's dimensions (a JSON list of {start, end, label, color}; the points in the viewer's scene coordinates, as --camera's lengths), drawn over the model.
--jsonPrint what was drawn and its timings as JSON.

cad dxf dfm

Check a sheet's cut file (a DXF) for laser, waterjet or router cutting: the sheet process. Exit 0: OK. Exit 1: FAILED, a finding is an error (with --strict, a warning too). Exit 3: NOT CHECKED, something was not judged: never a pass. Exit 2: the command line's mistake.

cad dxf dfm [--process {sheet}] [--material MATERIAL] [--units {mm,cm,m,in,ft}] [--thickness THICKNESS] [--k-factor FACTOR] [--bend-radius RADIUS] [--kerf KERF] [--sheet-size SIZE] [--strict] [--json] SOURCE

In Python: cad.dxf.dfm.

ArgumentDescription
SOURCEThe .dxf cut file to check.
OptionDescriptionDefault
--processSheet, the one process a DXF is checked for (the default). One of sheet.sheet
--material MATERIALThe part's material (aluminum, steel, stainless, abs, pc, nylon, ...): picks the material's limits; default the material the part declares (part.material = metals.aluminum()), when every part agrees.
--unitsThe file's length units (mm, cm, m, in, ft): an STL's (default mm), or a DXF's (default the ones it declares; needed where it declares none, as an R12 file). One of mm, cm, m, in, ft.
--thickness THICKNESSSheet: the stock's thickness in mm; default measured.
--k-factor FACTORSheet: the neutral axis's place in the thickness, for the flat pattern (the shop's bend table's); default a K-factor chart's, by the material and each bend's radius.
--bend-radius RADIUSSheet: the shop's inside bend radius in mm, compared with the part's.
--kerf KERFSheet: the cutting kerf in mm, for small features.
--sheet-size SIZESheet: the shop's largest sheet in mm (1219x2438); default a standard 5 x 10 ft sheet (3048x1524), assumed.
--strictA warning fails the check too (exit 1): a gate that takes no recommendation broken.
--jsonPrint the result as one JSON line on stdout instead of human lines.

cad urdf

URDF: A robot description (ROS's Unified Robot Description Format). Files: .urdf.

cad urdf <operation> FILE [options]

In Python: cad.urdf.

cad urdf snapshot

Draw it as the viewer does, into a PNG.

cad urdf snapshot SRC OUT.png [options] | --job PACKET [SRC] [options]

In Python: cad.urdf.snapshot.

ArgumentDescription
SRCThe .urdf file; with --job, drawn in place of every job's input. Optional.
OUT.pngThe .png to write, or a folder (one that is there, or a path ending in a separator) to write <SRC's stem>_<UTC time>.png into. Optional.
OptionDescription
--job PACKETA Quick Edit packet (the .snapshot.json the viewer writes), a job or a list of jobs, as JSON or a file of it: every picture its outputs name drawn, each job's view as it was — its camera, display, hidden and isolated parts, pose — with the packet's ink and dimensions, at its output settings (padding, tightFrame, transparent, background, renderScale, sizeProfile); the other flags override every job.
--display DISPLAYA mode (solid, shaded, parts, xray, hidden-line, wireframe), exploded=AMOUNT (the parts moved apart, 0 to 1; with a mode: hidden-line,exploded=0.6), edges=CLASS (the edges of one class alone: feature, tangent or seam; edges=feature draws no line where faces meet smoothly or a face closes on itself), or the display JSON object (mode, grid, camera, clip, exploded, edges, hidden, isolated: part refs the picture leaves out, or alone draws), or a JSON file of it; a drawing takes none; a KiCad board a board mode (board, copper, assembly, placement) or {mode, side, poured, layers, active, others, zones, tracks, window: [x0, y0, x1, y1], the box of the board to frame, in its mm}; a KiCad schematic {sheet, border, title} (title: KiCad's title block, on unless false; border: the page's edge and frame). Every snapshot is drawn light.
--gridDraw the measuring grid.
--camera CAMERAA preset (iso, front, back, left, right, top, bottom), azimuth:elevation, a camera JSON object (its position, target and orthographicHalfHeight in the viewer's scene coordinates, as a Quick Edit packet carries them: a document's or a GLB's mm, a robot's m, a 3MF's unit), or authored: the view --annotation's ink was drawn in, from its Quick Edit packet, exactly.
--width WIDTH—
--height HEIGHT—
--size-profileOne of assembly, assembly-large, contact-sheet, diagnostic, labeled, presentation, presentation-large, simple, simple-square.
--previewThe viewer's Preview in place of a display mode: the model lit in a studio, in its materials, on a floor with its shadow, in perspective (a job's: "preview": true).
--pose POSEA configuration's name (a robot's SRDF group state), a configuration sequence at a time of it (walk@0.6: where the viewer's playbar shows the mechanism then), or joint and coupling values as JSON ('{"elbow": 45}', '{"curl": 0.6}'; degrees, and a slide in the file's unit: a document's mm, a robot's m): the mechanism posed there; as built without it (a robot where the viewer opens it).
--annotation FILEThe viewer's annotation file, or the Quick Edit packet (.snapshot.json) that carries it: its ink drawn over the model, on the parts it was drawn on.
--measurements FILEMeasure's dimensions (a JSON list of {start, end, label, color}; the points in the viewer's scene coordinates, as --camera's lengths), drawn over the model.
--jsonPrint what was drawn and its timings as JSON.

cad urdf validate

Check one URDF robot description for conformance.

cad urdf validate [--strict] [--packages NAME=PATH] [--verbose] [--json] PATH

In Python: cad.urdf.validate.

ArgumentDescription
PATHThe .urdf file to validate.
OptionDescription
--strictTreat warnings as blocking.
--packages NAME=PATHResolve package://NAME/... mesh URIs against PATH. Repeatable. Repeatable.
--verboseNarrate the target on stderr.
--jsonPrint the result as one JSON line on stdout instead of human lines.

cad srdf

SRDF: A MoveIt semantic robot description, read against its URDF. Files: .srdf.

cad srdf <operation> FILE [options]

In Python: cad.srdf.

cad srdf snapshot

Draw it as the viewer does, into a PNG.

cad srdf snapshot SRC OUT.png [options] | --job PACKET [SRC] [options]

In Python: cad.srdf.snapshot.

ArgumentDescription
SRCThe .srdf file; with --job, drawn in place of every job's input. Optional.
OUT.pngThe .png to write, or a folder (one that is there, or a path ending in a separator) to write <SRC's stem>_<UTC time>.png into. Optional.
OptionDescription
--job PACKETA Quick Edit packet (the .snapshot.json the viewer writes), a job or a list of jobs, as JSON or a file of it: every picture its outputs name drawn, each job's view as it was — its camera, display, hidden and isolated parts, pose — with the packet's ink and dimensions, at its output settings (padding, tightFrame, transparent, background, renderScale, sizeProfile); the other flags override every job.
--display DISPLAYA mode (solid, shaded, parts, xray, hidden-line, wireframe), exploded=AMOUNT (the parts moved apart, 0 to 1; with a mode: hidden-line,exploded=0.6), edges=CLASS (the edges of one class alone: feature, tangent or seam; edges=feature draws no line where faces meet smoothly or a face closes on itself), or the display JSON object (mode, grid, camera, clip, exploded, edges, hidden, isolated: part refs the picture leaves out, or alone draws), or a JSON file of it; a drawing takes none; a KiCad board a board mode (board, copper, assembly, placement) or {mode, side, poured, layers, active, others, zones, tracks, window: [x0, y0, x1, y1], the box of the board to frame, in its mm}; a KiCad schematic {sheet, border, title} (title: KiCad's title block, on unless false; border: the page's edge and frame). Every snapshot is drawn light.
--gridDraw the measuring grid.
--camera CAMERAA preset (iso, front, back, left, right, top, bottom), azimuth:elevation, a camera JSON object (its position, target and orthographicHalfHeight in the viewer's scene coordinates, as a Quick Edit packet carries them: a document's or a GLB's mm, a robot's m, a 3MF's unit), or authored: the view --annotation's ink was drawn in, from its Quick Edit packet, exactly.
--width WIDTH—
--height HEIGHT—
--size-profileOne of assembly, assembly-large, contact-sheet, diagnostic, labeled, presentation, presentation-large, simple, simple-square.
--previewThe viewer's Preview in place of a display mode: the model lit in a studio, in its materials, on a floor with its shadow, in perspective (a job's: "preview": true).
--pose POSEA configuration's name (a robot's SRDF group state), a configuration sequence at a time of it (walk@0.6: where the viewer's playbar shows the mechanism then), or joint and coupling values as JSON ('{"elbow": 45}', '{"curl": 0.6}'; degrees, and a slide in the file's unit: a document's mm, a robot's m): the mechanism posed there; as built without it (a robot where the viewer opens it).
--annotation FILEThe viewer's annotation file, or the Quick Edit packet (.snapshot.json) that carries it: its ink drawn over the model, on the parts it was drawn on.
--measurements FILEMeasure's dimensions (a JSON list of {start, end, label, color}; the points in the viewer's scene coordinates, as --camera's lengths), drawn over the model.
--jsonPrint what was drawn and its timings as JSON.

cad srdf validate

Check one SRDF against its paired URDF.

cad srdf validate [--strict] [--urdf URDF] [--verbose] [--json] PATH

In Python: cad.srdf.validate.

ArgumentDescription
PATHThe .srdf file to check.
OptionDescription
--strictTreat warnings as blocking.
--urdf URDFThe URDF to check it against; found from its robot name and folder without it.
--verboseNarrate the target on stderr.
--jsonPrint the result as one JSON line on stdout instead of human lines.

cad sdf

SDF: An SDFormat world or model (Gazebo's Simulation Description Format). Files: .sdf.

cad sdf <operation> FILE [options]

In Python: cad.sdf.

cad sdf snapshot

Draw it as the viewer does, into a PNG.

cad sdf snapshot SRC OUT.png [options] | --job PACKET [SRC] [options]

In Python: cad.sdf.snapshot.

ArgumentDescription
SRCThe .sdf file; with --job, drawn in place of every job's input. Optional.
OUT.pngThe .png to write, or a folder (one that is there, or a path ending in a separator) to write <SRC's stem>_<UTC time>.png into. Optional.
OptionDescription
--job PACKETA Quick Edit packet (the .snapshot.json the viewer writes), a job or a list of jobs, as JSON or a file of it: every picture its outputs name drawn, each job's view as it was — its camera, display, hidden and isolated parts, pose — with the packet's ink and dimensions, at its output settings (padding, tightFrame, transparent, background, renderScale, sizeProfile); the other flags override every job.
--display DISPLAYA mode (solid, shaded, parts, xray, hidden-line, wireframe), exploded=AMOUNT (the parts moved apart, 0 to 1; with a mode: hidden-line,exploded=0.6), edges=CLASS (the edges of one class alone: feature, tangent or seam; edges=feature draws no line where faces meet smoothly or a face closes on itself), or the display JSON object (mode, grid, camera, clip, exploded, edges, hidden, isolated: part refs the picture leaves out, or alone draws), or a JSON file of it; a drawing takes none; a KiCad board a board mode (board, copper, assembly, placement) or {mode, side, poured, layers, active, others, zones, tracks, window: [x0, y0, x1, y1], the box of the board to frame, in its mm}; a KiCad schematic {sheet, border, title} (title: KiCad's title block, on unless false; border: the page's edge and frame). Every snapshot is drawn light.
--gridDraw the measuring grid.
--camera CAMERAA preset (iso, front, back, left, right, top, bottom), azimuth:elevation, a camera JSON object (its position, target and orthographicHalfHeight in the viewer's scene coordinates, as a Quick Edit packet carries them: a document's or a GLB's mm, a robot's m, a 3MF's unit), or authored: the view --annotation's ink was drawn in, from its Quick Edit packet, exactly.
--width WIDTH—
--height HEIGHT—
--size-profileOne of assembly, assembly-large, contact-sheet, diagnostic, labeled, presentation, presentation-large, simple, simple-square.
--previewThe viewer's Preview in place of a display mode: the model lit in a studio, in its materials, on a floor with its shadow, in perspective (a job's: "preview": true).
--pose POSEA configuration's name (a robot's SRDF group state), a configuration sequence at a time of it (walk@0.6: where the viewer's playbar shows the mechanism then), or joint and coupling values as JSON ('{"elbow": 45}', '{"curl": 0.6}'; degrees, and a slide in the file's unit: a document's mm, a robot's m): the mechanism posed there; as built without it (a robot where the viewer opens it).
--annotation FILEThe viewer's annotation file, or the Quick Edit packet (.snapshot.json) that carries it: its ink drawn over the model, on the parts it was drawn on.
--measurements FILEMeasure's dimensions (a JSON list of {start, end, label, color}; the points in the viewer's scene coordinates, as --camera's lengths), drawn over the model.
--jsonPrint what was drawn and its timings as JSON.

cad sdf validate

Check one SDFormat world or model for conformance.

cad sdf validate [--strict] [--gz-check {auto,required,never}] [--gz-remote] [--verbose] [--json] PATH

In Python: cad.sdf.validate.

ArgumentDescription
PATHThe .sdf file to check.
OptionDescriptionDefault
--strictTreat warnings as blocking.
--gz-checkRun gz sdf --check as external validation — auto (when the tool is installed), required (fail without it), or never. One of auto, required, never.auto
--gz-remoteLet gz sdf --check resolve the document's remote <uri> references (http, https, fuel). Off by default: gz does not run on a document that names one, so validating a file never fetches from a host the file names.
--verboseNarrate the target on stderr.
--jsonPrint the result as one JSON line on stdout instead of human lines.

cad kicad_pcb

KiCad PCB: A KiCad printed circuit board, read with the .kicad_pro beside it. Files: .kicad_pcb.

cad kicad_pcb <operation> FILE [options]

In Python: cad.kicad_pcb.

cad kicad_pcb export

Write a saved KiCad board's fabrication, assembly or 3D output with KiCad's kicad-cli, headless, into a folder.

cad kicad_pcb export --to {gerbers,drill,pos,bom,step,glb,odb,ipc2581,pdf,dxf} --out DIR [--json] BOARD

In Python: cad.kicad_pcb.export.

ArgumentDescription
BOARDThe .kicad_pcb (its .kicad_pro beside it).
OptionDescription
--toRequired. What to write: gerbers and drill (a folder of files), pos (placement CSV), bom (the schematic's parts CSV), step and glb (3D), odb (ODB++ zip), ipc2581, pdf (a front and a back fabrication drawing) or dxf (the outline and holes). One of gerbers, drill, pos, bom, step, glb, odb, ipc2581, pdf, dxf.
-o, --out DIRRequired. The folder to write into, made when missing.
--jsonPrint the answer as one JSON line on stdout.

cad kicad_pcb snapshot

Draw it flat, as the viewer's board view does, into a PNG.

cad kicad_pcb snapshot SRC OUT.png [options] | --job PACKET [SRC] [options]

In Python: cad.kicad_pcb.snapshot.

ArgumentDescription
SRCThe .kicad_pcb file; with --job, drawn in place of every job's input. Optional.
OUT.pngThe .png to write, or a folder (one that is there, or a path ending in a separator) to write <SRC's stem>_<UTC time>.png into. Optional.
OptionDescription
--job PACKETA Quick Edit packet (the .snapshot.json the viewer writes), a job or a list of jobs, as JSON or a file of it: every picture its outputs name drawn, each job's view as it was — its camera, display, hidden and isolated parts, pose — with the packet's ink and dimensions, at its output settings (padding, tightFrame, transparent, background, renderScale, sizeProfile); the other flags override every job.
--display DISPLAYA mode (solid, shaded, parts, xray, hidden-line, wireframe), exploded=AMOUNT (the parts moved apart, 0 to 1; with a mode: hidden-line,exploded=0.6), edges=CLASS (the edges of one class alone: feature, tangent or seam; edges=feature draws no line where faces meet smoothly or a face closes on itself), or the display JSON object (mode, grid, camera, clip, exploded, edges, hidden, isolated: part refs the picture leaves out, or alone draws), or a JSON file of it; a drawing takes none; a KiCad board a board mode (board, copper, assembly, placement) or {mode, side, poured, layers, active, others, zones, tracks, window: [x0, y0, x1, y1], the box of the board to frame, in its mm}; a KiCad schematic {sheet, border, title} (title: KiCad's title block, on unless false; border: the page's edge and frame). Every snapshot is drawn light.
--gridDraw the measuring grid.
--camera CAMERAA preset (iso, front, back, left, right, top, bottom), azimuth:elevation, a camera JSON object (its position, target and orthographicHalfHeight in the viewer's scene coordinates, as a Quick Edit packet carries them: a document's or a GLB's mm, a robot's m, a 3MF's unit), or authored: the view --annotation's ink was drawn in, from its Quick Edit packet, exactly.
--width WIDTH—
--height HEIGHT—
--size-profileOne of assembly, assembly-large, contact-sheet, diagnostic, labeled, presentation, presentation-large, simple, simple-square.
--previewThe viewer's Preview in place of a display mode: the model lit in a studio, in its materials, on a floor with its shadow, in perspective (a job's: "preview": true).
--pose POSEA configuration's name (a robot's SRDF group state), a configuration sequence at a time of it (walk@0.6: where the viewer's playbar shows the mechanism then), or joint and coupling values as JSON ('{"elbow": 45}', '{"curl": 0.6}'; degrees, and a slide in the file's unit: a document's mm, a robot's m): the mechanism posed there; as built without it (a robot where the viewer opens it).
--annotation FILEThe viewer's annotation file, or the Quick Edit packet (.snapshot.json) that carries it: its ink drawn over the model, on the parts it was drawn on.
--measurements FILEMeasure's dimensions (a JSON list of {start, end, label, color}; the points in the viewer's scene coordinates, as --camera's lengths), drawn over the model.
--jsonPrint what was drawn and its timings as JSON.
--window X0,Y0,X1,Y1Draw only this box of the board, filling the picture: two opposite corners in the board's millimetres as KiCad shows them (y down; the box board.area(x0, y0, x1, y1) and #@x10y5..x20y15 name), e.g. --window 40,60,80,90 (--window=-10,5,20,30 when the first is negative). With --width alone the height follows the box's shape (and the width with --height alone); the same as --display '{"window": [X0, Y0, X1, Y1]}'. Takes no --camera.

cad kicad_pcb inspect

What a saved KiCad board holds: its format, thickness, size, layers, parts and nets.

cad kicad_pcb inspect [--json] BOARD

In Python: cad.kicad_pcb.inspect.

ArgumentDescription
BOARDThe .kicad_pcb (its .kicad_pro beside it).
OptionDescription
--jsonPrint the answer as one JSON line on stdout.

cad kicad_pcb drc

Check the KiCad board BOARD with KiCad's design rule check.

cad kicad_pcb drc [--json] BOARD

In Python: cad.kicad_pcb.drc.

ArgumentDescription
BOARDThe .kicad_pcb to check (its .kicad_pro beside it carries the rules).
OptionDescription
--jsonPrint the result as one JSON line on stdout instead of human lines.

cad kicad_sch

KiCad schematic: A KiCad schematic, read with every sheet of its project's hierarchy. Files: .kicad_sch.

cad kicad_sch <operation> FILE [options]

In Python: cad.kicad_sch.

cad kicad_sch export

Write a saved KiCad schematic's outputs with KiCad's kicad-cli, headless, into a folder: a pdf of every sheet, an svg per sheet, the netlist (the board imports it) or a BOM.

cad kicad_sch export --to {pdf,svg,netlist,bom} --out DIR [--json] SCHEMATIC

In Python: cad.kicad_sch.export.

ArgumentDescription
SCHEMATICThe .kicad_sch (any sheet of its project: the whole hierarchy is read).
OptionDescription
--toRequired. What to write: pdf, svg, netlist, bom. One of pdf, svg, netlist, bom.
-o, --out DIRRequired. The folder to write into, made when missing.
--jsonPrint the answer as one JSON line on stdout.

cad kicad_sch snapshot

draw a document or a file the viewer opens as the viewer does, into a PNG

cad kicad_sch snapshot SRC OUT.png [options] | --job PACKET [SRC] [options]

In Python: cad.kicad_sch.snapshot.

ArgumentDescription
SRCA document (.xbf, .step), a mesh file (.glb, .stl, .3mf), a robot (.urdf, .sdf, .srdf), a drawing (.dxf), a KiCad board (.kicad_pcb) or schematic (.kicad_sch), or a document id (a model's, which cad run SCRIPT.py prints: drawn from what the engine holds); with --job, drawn in place of every job's input. Optional.
OUT.pngThe .png to write, or a folder (one that is there, or a path ending in a separator) to write <SRC's stem>_<UTC time>.png into. Optional.
OptionDescription
--job PACKETA Quick Edit packet (the .snapshot.json the viewer writes), a job or a list of jobs, as JSON or a file of it: every picture its outputs name drawn, each job's view as it was — its camera, display, hidden and isolated parts, pose — with the packet's ink and dimensions, at its output settings (padding, tightFrame, transparent, background, renderScale, sizeProfile); the other flags override every job.
--display DISPLAYA mode (solid, shaded, parts, xray, hidden-line, wireframe), exploded=AMOUNT (the parts moved apart, 0 to 1; with a mode: hidden-line,exploded=0.6), edges=CLASS (the edges of one class alone: feature, tangent or seam; edges=feature draws no line where faces meet smoothly or a face closes on itself), or the display JSON object (mode, grid, camera, clip, exploded, edges, hidden, isolated: part refs the picture leaves out, or alone draws), or a JSON file of it; a drawing takes none; a KiCad board a board mode (board, copper, assembly, placement) or {mode, side, poured, layers, active, others, zones, tracks, window: [x0, y0, x1, y1], the box of the board to frame, in its mm}; a KiCad schematic {sheet, border, title} (title: KiCad's title block, on unless false; border: the page's edge and frame). Every snapshot is drawn light.
--gridDraw the measuring grid.
--camera CAMERAA preset (iso, front, back, left, right, top, bottom), azimuth:elevation, a camera JSON object (its position, target and orthographicHalfHeight in the viewer's scene coordinates, as a Quick Edit packet carries them: a document's or a GLB's mm, a robot's m, a 3MF's unit), or authored: the view --annotation's ink was drawn in, from its Quick Edit packet, exactly.
--width WIDTH—
--height HEIGHT—
--size-profileOne of assembly, assembly-large, contact-sheet, diagnostic, labeled, presentation, presentation-large, simple, simple-square.
--previewThe viewer's Preview in place of a display mode: the model lit in a studio, in its materials, on a floor with its shadow, in perspective (a job's: "preview": true).
--pose POSEA configuration's name (a robot's SRDF group state), a configuration sequence at a time of it (walk@0.6: where the viewer's playbar shows the mechanism then), or joint and coupling values as JSON ('{"elbow": 45}', '{"curl": 0.6}'; degrees, and a slide in the file's unit: a document's mm, a robot's m): the mechanism posed there; as built without it (a robot where the viewer opens it).
--annotation FILEThe viewer's annotation file, or the Quick Edit packet (.snapshot.json) that carries it: its ink drawn over the model, on the parts it was drawn on.
--measurements FILEMeasure's dimensions (a JSON list of {start, end, label, color}; the points in the viewer's scene coordinates, as --camera's lengths), drawn over the model.
--jsonPrint what was drawn and its timings as JSON.
--sheet PATHThe sheet to draw, by its path: / (the root, the default), /Power/; the same as --display '{"sheet": PATH}'.
--borderDraw KiCad's page as printed: the page's edge and the drawing sheet's frame (off by default; the title block is drawn unless --display '{"title": false}').

cad kicad_sch inspect

What a saved KiCad schematic holds: its sheets, parts and nets, read from its project's root; with REF, what that reference names (#U3, #U3.7, #net:VBUS, #sheet:/Power/, #wire:<uuid>).

cad kicad_sch inspect [--json] SCHEMATIC [REF]

In Python: cad.kicad_sch.inspect.

ArgumentDescription
SCHEMATICThe .kicad_sch (any sheet of its project: the whole hierarchy is read).
REFA reference to resolve: #U3, #U3.7, #net:GND. Optional.
OptionDescription
--jsonPrint the answer as one JSON line on stdout.

cad kicad_sch erc

Check the KiCad schematic SCHEMATIC with KiCad's electrical rules check.

cad kicad_sch erc [--json] SCHEMATIC

In Python: cad.kicad_sch.erc.

ArgumentDescription
SCHEMATICThe .kicad_sch to check (any sheet of its project: the check reads the whole hierarchy).
OptionDescription
--jsonPrint the result as one JSON line on stdout instead of human lines.

Integrations

An integration is a tool text-to-cad runs for you. For a file of its tool's own that is no document type, it has operations of its own, as cad <integration> <operation>.

cad mujoco

MuJoCo, the physics engine, as its headless core (mujoco-core: the compiler and the bindings, no renderer) and MuJoCo Studio's web viewer: cad.mujoco makes a document a mujoco.MjSpec, chooses a part's collision on it and saves it; cad mujoco check robot.xml compiles a MuJoCo model with the core, so what MuJoCo refuses is a finding with MuJoCo's own words; and cad run mujoco-studio --model scene.xml serves the model in Studio for the person to open in a browser.

cad mujoco <operation> FILE [options]

In Python: cad.mujoco.

cad mujoco check

Compile one MuJoCo model with MuJoCo and check it.

cad mujoco check [--strict] [--verbose] [--json] PATH

In Python: cad.mujoco.check.

ArgumentDescription
PATHThe .xml or .mjcf file to check.
OptionDescription
--strictTreat warnings as blocking.
--verboseNarrate the target on stderr.
--jsonPrint the result as one JSON line on stdout instead of human lines.

cad orcaslicer

OrcaSlicer, the slicer, whose command line slices only with complete presets: cad orcaslicer presets machine lists the presets a person can select, from their own OrcaSlicer folders and the app's profiles, and cad orcaslicer complete writes a printer, a process and filaments complete, every parent merged in and the printer named as compatible, for OrcaSlicer's own command line to slice with.

cad orcaslicer <operation> FILE [options]

In Python: cad.orcaslicer.

cad orcaslicer presets

List the OrcaSlicer presets of one kind a person can select.

cad orcaslicer presets [--match MATCH] [--profiles PROFILES] [--json] KIND

In Python: cad.orcaslicer.presets.

ArgumentDescription
KINDMachine (a printer), process or filament. One of machine, process, filament.
OptionDescription
--match MATCHOnly names containing this text, in any case.
--profiles PROFILESAnother folder of OrcaSlicer presets to search first; once per folder. Repeatable.
--jsonPrint the result as one JSON line on stdout instead of human lines.

cad orcaslicer complete

Write a printer, a process and filaments complete, for OrcaSlicer's command line.

cad orcaslicer complete --printer PRINTER --process PROCESS [--filament FILAMENT] [--out OUT] [--profiles PROFILES] [--json]

In Python: cad.orcaslicer.complete.

OptionDescription
--printer PRINTERRequired. The printer (machine) preset's name, or a preset JSON file.
--process PROCESSRequired. The process preset's name, or a preset JSON file.
--filament FILAMENTA filament preset's name or file; once per material, in the printer's filament order. Repeatable.
--out OUTThe folder the complete presets are written into.
--profiles PROFILESAnother folder of OrcaSlicer presets to search first; once per folder. Repeatable.
--jsonPrint the result as one JSON line on stdout instead of human lines.