AnkusDrive
v0.5.7Drive FreeCAD from an agent: CAD modeling, drawings, FEM, CFD, EM, and multiphysics simulation.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
ping Ping
Check that the FreeCAD worker is alive. Returns 'pong' on success.
| Parameter | Type | Description |
|---|---|---|
workspace | string | Run this call in this named workspace |
restart_worker Restart Worker
Kill the current workspace's FreeCAD worker process and spawn a fresh one. Use when the worker is wedged (e.g. App.ActiveDocument desynced from internal state). All open documents, unsaved changes, and handles in THIS workspace are lost — save first if needed. Other workspaces are untouched. Returns {restarted: True, workspace: <name>, freecad: [...]}.
| Parameter | Type | Description |
|---|---|---|
workspace | string | Run this call in this named workspace |
use_workspace Use Workspace
Claim (creating if needed) an isolated workspace and make it the target of subsequent tool calls. Each workspace is its own freecadcmd process with its own ActiveDocument and handle registry — handles do NOT cross workspaces. The selection is SERVER-WIDE: it retargets every client sharing this server, including other subagents of the same session. Concurrent agents must instead pass `workspace=<unique name>` on every tool call, which pins just that call and leaves this selection alone. The pool is capped (ANKUSDRIVE_MAX_WORKSPACES, default 4) and idle workspaces…
| Parameter | Type | Description |
|---|---|---|
name * | string | |
workspace | string | Run this call in this named workspace |
list_workspaces List Workspaces
List the live workspaces (freecadcmd processes) and the pool limits. Each entry is {name, alive, idle_s, current}. Use to see who is holding a slot before claiming or closing one. `current` is the workspace THIS call runs in: the `workspace` you passed, else the use_workspace selection. `selected` is that server-wide selection, which a pinned call neither follows nor moves. Returns {current, selected, max, idle_reap_s, workspaces: [...]}.
| Parameter | Type | Description |
|---|---|---|
workspace | string | Run this call in this named workspace |
close_workspace Close Workspace
Shut down a workspace's worker and free its pool slot. All of that workspace's documents, unsaved changes, and handles are lost. The default workspace can be closed too (its worker respawns clean on next use). If `name` is the use_workspace selection, the selection returns to "default", whoever closes it. A call pinned with `workspace` never moves the selection otherwise: closing your own pinned workspace leaves the pin as it is, so your next call pinned to that name gets a fresh, empty worker (old handles fail). `current` is the workspace this call ran in (as in l…
| Parameter | Type | Description |
|---|---|---|
name * | string | |
workspace | string | Run this call in this named workspace |
session_transcript Session Transcript
Export this session as a Python script that regenerates it (model, drawings, simulations) by calling these same tools in a fresh worker — and, with it, the record of what computed each number. Read-only: returns the script as text and writes nothing. Covers one workspace (default: the current one). In the script, handles are variables, job polls are one s.wait(job), and inspection calls are dropped unless a later call used their result. Absolute paths become WORKDIR-relative. The header lists failed calls, run_script use and input files. THE AUDIT SURFACE. A…
| Parameter | Type | Description |
|---|---|---|
checkpoints | boolean | |
include_read_only | boolean | |
provenance | boolean | |
prune_aborted | boolean | |
workspace |
journal_export Journal Export
Export a past session from the on-disk journal (off by default; on with ANKUSDRIVE_JOURNAL_DIR) as session_transcript would have: the replay script, the recorded environment, and the ordered call ledger with each result's SHA-256. Read-only. session: an id or "latest"; omit to list sessions. workspace: default is the one current when the session ended. provenance=False skips solver version probes. A redacted journal (ANKUSDRIVE_JOURNAL_REDACT) exports an audit record, not a runnable script. More options: `ankusdrive journal export`. Returns {enabled, dir, live_sess…
| Parameter | Type | Description |
|---|---|---|
provenance | boolean | |
session | ||
workspace |
version Version
Return FreeCAD and bundled Python versions from the worker.
| Parameter | Type | Description |
|---|---|---|
workspace | string | Run this call in this named workspace |
new_document New Document
Create a new FreeCAD document and make it active. Returns {doc: <name>}.
| Parameter | Type | Description |
|---|---|---|
name | string | |
workspace | string | Run this call in this named workspace |
open_document Open Document
Open an existing .FCStd file, make it active. Returns doc name and object list.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
workspace | string | Run this call in this named workspace |
save_document Save Document
Save the active document to the given .FCStd path. visibility_hygiene (default True): before saving, hide any object that has been consumed as a producer-input (the Base/Tool of a Cut, the BaseFeature of a Body, every feature inside a Body's Group, etc.). Without this the re-opened doc double-renders intermediates on top of the final shape — a failure mode that looks identical to broken geometry. Pass False to keep explicit set_visibility overrides intact. attach_provenance: embed this document's journal_export record (PRIVACY.md).
| Parameter | Type | Description |
|---|---|---|
path * | string | |
attach_provenance | boolean | |
visibility_hygiene | boolean | |
workspace | string | Run this call in this named workspace |
list_objects List Objects
List objects in the active document. Returns [{name, type, label}, ...].
| Parameter | Type | Description |
|---|---|---|
workspace | string | Run this call in this named workspace |
add_primitive Add Primitive
Add a primitive to the active document. kind: 'box' (uses w, d, h), 'cylinder' (uses r, h), or 'sphere' (uses r). placement: optional [x, y, z] mm translation. name: optional human-facing name. It sets the object's LABEL — what list_objects, bom_extract and the drawing/manifest layers display — and leaves the internal FreeCAD Name alone, since handles and register_handle key off Name and it must stay unique and stable. Omit it and the label stays the type default ('Box' / 'Cylinder' / 'Sphere'), which BOM and designation checks read as an unnamed…
| Parameter | Type | Description |
|---|---|---|
kind * | string | |
d | number | |
h | number | |
name | ||
placement | ||
r | number | |
w | number | |
workspace | string | Run this call in this named workspace |
add_gear Add Gear
Add an involute spur gear (FreeCAD's core involute generator), extruded to a solid. teeth: tooth count (>= 3). module: mm (pitch diameter = module * teeth). height: extrusion thickness mm. pressure_angle: deg (default 20). external: True for an external gear; False for an internal/ring tooth profile. placement: optional [x, y, z] mm translation. Returns {handle, name, volume, pitch_radius, tip_radius, root_radius, teeth, module, external}. Two external gears MESH when their axes are spaced (pitch_radius_a + pitch_radius_b) apart; phase one by half a tooth to avoid…
| Parameter | Type | Description |
|---|---|---|
module * | number | |
teeth * | integer | |
external | boolean | |
height | number | |
name | string | |
placement | ||
pressure_angle | number | |
workspace | string | Run this call in this named workspace |
add_rack Add Rack
Add a linear gear rack (a spur gear's straight counterpart) as a solid. A rack is a gear of infinite radius: straight-flanked teeth on a rail. Standard full-depth tooth form (addendum = module, dedendum = 1.25*module, tooth height = 2.25*module, flanks at pressure_angle from vertical). teeth: number of teeth (>= 1). module: mm (sets tooth size; circular pitch = module * pi). height: extrusion thickness mm along +Y (the rack's face width; default 6). width: mm, rail base-band thickness below the tooth root line (default 10). pressure_angle: deg, flank angle fro…
| Parameter | Type | Description |
|---|---|---|
module * | number | |
teeth * | integer | |
height | number | |
name | string | |
placement | ||
pressure_angle | number | |
width | number | |
workspace | string | Run this call in this named workspace |
add_sprocket Add Sprocket
Add a roller-chain sprocket (ISO 606 / ANSI), built as a static solid plate. teeth: tooth count (>= 3). chain_pitch: chain link pitch in mm (e.g. 12.7 for #40 / ANSI 40 chain). roller_diameter: chain roller diameter in mm. height: plate thickness in mm (default 6.0). placement: optional [x, y, z] mm translation. Build: a disc of tip radius ~= pitch_radius + chain_pitch*0.3 with `teeth` roller seats (circular pockets, radius roller_diameter/2 * 1.05) cut on the pitch circle, one per tooth. This is a fit/visualisation approximation of the true ISO 606 tooth form…
| Parameter | Type | Description |
|---|---|---|
chain_pitch * | number | |
roller_diameter * | number | |
teeth * | integer | |
height | number | |
name | string | |
placement | ||
workspace | string | Run this call in this named workspace |
add_pulley Add Pulley
Add a timing-belt (or V) pulley as a static solid. Axis is +Z; toothed belt face spans z in [0, width]. teeth: tooth count (>= 6). belt_pitch: belt tooth pitch mm/tooth (e.g. 2.0 for GT2, 3.0 for GT3/HTD-3M); pitch diameter PD = belt_pitch * teeth / pi. width: belt-face length mm. flanged: True adds two thin guide discs (radius PD/2 + 2*belt_pitch) at each end to retain the belt. height: optional mm; OVERRIDES width when given (default height = width). placement: optional [x, y, z] mm translation of the axis base. name: object label. Returns {handle, name, vol…
| Parameter | Type | Description |
|---|---|---|
belt_pitch * | number | |
teeth * | integer | |
width * | number | |
flanged | boolean | |
height | ||
name | string | |
placement | ||
workspace | string | Run this call in this named workspace |
add_spring Add Spring
Add a helical compression spring: a round wire swept along a cylindrical helix. All lengths in mm; angles n/a. wire_diameter: wire (stock) diameter d, mm. outer_diameter: spring outer diameter OD, mm (must be > wire_diameter). free_length: uncompressed overall length along the axis, mm. coils: number of turns (active coils), may be fractional. kind: 'compression' (only supported mode in v1; end coils are not squared yet). placement: optional [x, y, z] mm translation of the spring's base. Geometry: mean coil diameter D = outer_diameter - wire_diameter; coil pit…
| Parameter | Type | Description |
|---|---|---|
coils * | number | |
free_length * | number | |
outer_diameter * | number | |
wire_diameter * | number | |
kind | string | |
name | string | |
placement | ||
workspace | string | Run this call in this named workspace |
add_fastener Add Fastener
Add a standard ISO metric fastener (screw / bolt / nut / washer) as a solid. kind: one of "socket_head_cap_screw", "hex_bolt", "hex_nut", "washer". - socket_head_cap_screw: cylindrical head with a cosmetic hex socket + plain shank (threads not modeled). - hex_bolt: hex head (across-flats) + plain shank. - hex_nut: hex prism with an axial clearance hole. - washer: flat annular ring. size: ISO designation, one of "M3","M4","M5","M6","M8","M10","M12". length: shank length in mm. REQUIRED for socket_head_cap_screw and hex_bolt; ignored for nut/was…
| Parameter | Type | Description |
|---|---|---|
kind * | string | |
size * | string | |
grade | ||
length | ||
name | ||
placement | ||
workspace | string | Run this call in this named workspace |
add_bearing Add Bearing
Add a deep-groove ball bearing as an assembly *envelope* solid: an annular ring (outer-diameter cylinder minus bore cylinder) of the given width, axis along +Z. Balls/races are not modeled — this is the fit envelope a coordinator needs to size the shaft, the housing bore, and the shoulder spacing. Specify dimensions ONE of two ways: - designation: a standard metric series code, looked up in a built-in table. Known: "608", "623", "624", "625", "626", "688", "6000", "6200", "6800", "6900". (e.g. "608" -> bore 8, OD 22, width 7 mm.) - bore + outer_diameter +…
| Parameter | Type | Description |
|---|---|---|
bore | ||
designation | ||
name | string | |
outer_diameter | ||
placement | ||
seals | string | |
width | ||
workspace | string | Run this call in this named workspace |
oring_groove O-Ring Groove
Compute a static O-ring gland (groove) and optionally cut it into a face. This is the gland calc designers always fumble, plus an optional cut. Given the O-ring cross-section it returns standard static-seal gland dimensions; with cut=True it also machines the annular groove into a flat face. cross_section: O-ring wire cross-section diameter in mm (e.g. 1.78, 2.62). Required, > 0. inner_diameter: groove inner diameter in mm (the O-ring's nominal seal ID). Required when cut=True; used to size the returned diameters either way. handle: host solid to cut into (req…
| Parameter | Type | Description |
|---|---|---|
cross_section * | number | |
compound | ||
cut | boolean | |
face | ||
gland_type | string | |
handle | ||
inner_diameter | number | |
name | string | |
workspace | string | Run this call in this named workspace |
chamfer_edges Chamfer Edges
Chamfer (bevel) edges of a shaped Part object — fillet_edges' counterpart. edges: e_* tags (preferred), 'EdgeN' strings, or 1-based ints. size: symmetric leg distance mm (> 0). per_edge / allow_partial: as fillet_edges. The base object is hidden. Validated exactly like fillet_edges (#283). Returns {handle, name, volume (mm^3), edges (indices chamfered), checks {valid, solids, envelope_ok, envelope_growth_mm, envelope_tol_mm}, mode, partial}; when partial, also skipped_edges and a warning. On a failed check the feature is removed and BlendCheckFailed names th…
| Parameter | Type | Description |
|---|---|---|
edges * | array | |
handle * | string | |
allow_partial | boolean | |
name | string | |
per_edge | boolean | |
size | number | |
workspace | string | Run this call in this named workspace |
shell_solid Shell Solid
Hollow a raw Part solid into a thin-walled shell (`thickness` does the same for PartDesign bodies). faces: NON-EMPTY list of faces to REMOVE (the openings) — f_* tags (preferred), 'FaceN', or 1-based ints. thickness: wall mm (> 0), grown INWARD so outer dimensions are kept. The input is hidden. Returns {handle (starts 'shell_'), name, volume (mm^3), wall_thickness, removed_faces}. Raises on empty faces, thickness <= 0, a bad index, or an offset too large for a valid shell.
| Parameter | Type | Description |
|---|---|---|
faces * | array | |
handle * | string | |
thickness * | number | |
name | string | |
workspace | string | Run this call in this named workspace |
add_thread Add Thread
Generate a REAL helical ISO-style 60-degree thread as a static solid. Unlike `hole`/`list_thread_options` (which only flag a thread as metadata), this cuts actual helical geometry: a truncated triangular rib swept along a helix and fused to a core cylinder. All lengths in mm, angles in degrees. diameter: nominal MAJOR (crest) diameter, mm. For internal=True this is the bore the tap fits. pitch: thread pitch, mm per turn (e.g. M8 coarse = 1.25). length: threaded length along +Z from z=0, mm. internal: False (default) -> a finished externally-threaded stud…
| Parameter | Type | Description |
|---|---|---|
diameter * | number | |
length * | number | |
pitch * | number | |
grade | ||
internal | boolean | |
name | string | |
placement | ||
starts | integer | |
workspace | string | Run this call in this named workspace |
engrave_text Engrave Text
Engrave (cut) or emboss (add) extruded text on a planar face of a solid, centred on the face centroid. The host is replaced by the returned handle. face: planar face — f_* tag (preferred), 'FaceN', or int. size: cap height mm. depth: engrave/emboss depth mm. mode: 'engrave' (removes material) | 'emboss' (adds). position: optional [u, v] mm offset from the centroid along the text's X/Y. font: absolute path to a .ttf/.ttc. Omitted: only macOS Arial/Helvetica are probed, so elsewhere it raises — pass a path. Returns {handle, name, volume (mm^3 of the resu…
| Parameter | Type | Description |
|---|---|---|
face * | string | |
handle * | string | |
text * | string | |
depth | number | |
font | ||
mode | string | |
name | string | |
position | ||
size | number | |
workspace | string | Run this call in this named workspace |
add_rib Add Rib
Add a reinforcing rib/web inside a PartDesign Body by thickening an OPEN sketch spine (line, arc, or connected polyline; NOT a closed loop) into a wall that fuses with the surrounding material. The sketch plane sets orientation. thickness: wall thickness mm (> 0). midplane: centre the wall on the spine (default) or grow one side. reversed: flip if the rib lands on the wrong side of its sketch plane. Returns {handle (starts 'rib_'), name, volume (the Body's mm^3 after — always greater), thickness}. Headless FreeCAD lacks PartDesign::Rib, so it is built as an…
| Parameter | Type | Description |
|---|---|---|
body * | string | |
sketch * | string | |
thickness * | number | |
midplane | boolean | |
name | string | |
reversed | boolean | |
workspace | string | Run this call in this named workspace |
transform Transform
Move and/or rotate an object in place (no new handle) — use instead of editing Placement via set_property. translate: [x, y, z] mm. rotate_axis: [x, y, z], any length (default Z); angle: DEGREES about it, around the object's local origin. relative: True composes onto the current placement; False sets it absolutely. Returns {handle, name, placement: {base [x,y,z] mm, axis, angle_deg}}.
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
angle | number | |
relative | boolean | |
rotate_axis | ||
translate | ||
workspace | string | Run this call in this named workspace |
scale_shape Scale Shape
Scale a shape uniformly or per-axis, baking a fresh static solid. Scaling breaks parametric history, so this produces a standalone Part::Feature (not a linked/parametric feature); the source object is hidden since its geometry is consumed into the scaled copy. handle: source shape handle. factor: scalar for uniform scale, or [sx, sy, sz] for per-axis scale. All factors must be > 0. center: optional [x, y, z] mm pivot to scale about; when omitted the scale is about the world origin (so the shape also moves away from/toward origin). name: object labe…
| Parameter | Type | Description |
|---|---|---|
factor * | ||
handle * | string | |
center | ||
name | string | |
workspace | string | Run this call in this named workspace |
copy_shape Copy Shape
Duplicate a shaped object as an INDEPENDENT static solid. Unlike add_part (which creates an App::Link that tracks the source), this deep-copies the geometry: later edits to the original do NOT propagate to the copy. Use it to seed a mirror/pattern, or to drop a standalone duplicate instance into an assembly. handle: handle of the source object (must have a Shape). placement: optional absolute [x, y, z] translation in mm applied to the copy's base. Omit to leave the copy coincident with the source. The source object is unchanged and stays visible. n…
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
name | ||
placement | ||
workspace | string | Run this call in this named workspace |
measure_distance Measure Distance
Minimum (closest-approach) distance between two entities, mm — verify gaps, clearances, and contact. 0 means touching or interpenetrating; for overlap volume use min_clearance / interference_check. a, b: object handles. a_ref, b_ref: optional sub-shape to measure from instead of the whole solid — an f_* / e_* tag or "FaceN"/"EdgeN" (1-based). Returns {distance_mm, point_on_a ([x,y,z] mm), point_on_b, touching (distance_mm < 1e-7)}. A measurement: no handle.
| Parameter | Type | Description |
|---|---|---|
a * | string | |
b * | string | |
a_ref | ||
b_ref | ||
workspace | string | Run this call in this named workspace |
measure_angle Measure Angle
Angle (degrees) between two planar faces or two straight edges. a, b: object handles. a_ref, b_ref: REQUIRED sub-shape references, one per handle. Both must be the SAME kind: - face tags ('f_*' from list_faces/query_faces, or 'FaceN', or 1-based int) -> angle is between the faces' outward normals. Faces must be planar. - edge tags ('e_*' from list_edges, or 'EdgeN', or 1-based int) -> angle is between the edges' tangent directions. Edges must be straight. Mixing a face ref with an edge ref, a non-planar face, or a curved edge raises. Units: degrees…
| Parameter | Type | Description |
|---|---|---|
a * | string | |
a_ref * | string | |
b * | string | |
b_ref * | string | |
workspace | string | Run this call in this named workspace |
bounding_box Bounding Box
Axis-aligned bounding box (AABB) of a shaped object, mm, world coordinates. A measurement: returns numbers, creates nothing. QUIRK (#284): min/max/size are OCC's ANALYTIC box, an UPPER bound. A trimmed face is boxed by its untrimmed carrier surface, so cuts through fillets, chamfers, lofts or spheres can report mm of material that isn't there (a real trim at X=-32.0 read -36.7). Before calling a part wrong-sized, check `verified` and pass tight=True. oriented: also return the minimum-volume box at any orientation (OBB) under "oriented" (null if u…
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
deflection | ||
oriented | boolean | |
tight | boolean | |
workspace | string | Run this call in this named workspace |
min_clearance Min Clearance
Closest approach between two solids — the measured gap, richer than the binary interference_check. `a` and `b` are object handles. All lengths mm, volumes mm³. Returns a dict: status: "clear" (a positive gap separates them), "contact" (faces/edges touch, gap ~ 0), or "interference" (the solids interpenetrate / share material). clearance_mm: minimum distance between the two solids (mm). 0.0 when they are touching or interfering. overlap_volume_mm3: volume of interpenetration (mm³). Present ONLY when status == "interf…
| Parameter | Type | Description |
|---|---|---|
a * | string | |
b * | string | |
workspace | string | Run this call in this named workspace |
check_shape Check Shape
Check a shaped object's validity and topology before building on it — a guard after booleans/sweeps/imports. Inspection only; does NOT auto-repair. Watertight does not mean an internal channel is unobstructed: for ducts and manifolds use check_airtight_path. Returns {valid (OCC topology/geometry sound), watertight_solid (one solid AND valid AND closed — the 'safe to keep building' verdict), shape_type ('Solid', 'Shell', 'Compound', ...), closed (no free edges), solids (want 1), shells, faces, edges, volume_mm3 (0 for open/2D), is_null, check (only when invalid;…
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
workspace | string | Run this call in this named workspace |
check_airtight_path Check Airtight Path
Functional check for an enclosed-flow part (a vacuum adapter, manifold, duct): is there a single connected void joining the inlet to the outlet, bounded by solid everywhere else? This catches what `check_shape` cannot — a watertight solid can still have a blocked flow path or a hidden leak. Inspection only: measures, returns no handle, mutates nothing. handle: the part to inspect. inlet / outlet: a face reference naming each port OPENING (the rim face around the hole) — an f_* tag, 'FaceN', int index, or a role/name declared with annotate_face (e.g. "in…
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
inlet * | ||
outlet * | ||
min_aperture_mm2 | ||
pad_mm | ||
workspace | string | Run this call in this named workspace |
classify_face_sides Classify Face Sides
Inside-vs-outside topology: for every face, decide whether its outward side opens into an enclosed cavity (wetted) or ambient (exterior). Answers the "which faces are inside the airflow path" question from issue #19 and suggests a role per face. Inspection only; returns no handle, mutates nothing. With seal_ports=True (default) any declared inlet/outlet roles (annotate_face) are capped first, so an OPEN duct's bore reads as the enclosed flow cavity rather than as ambient. handle: the part. seal_ports: cap declared inlet/outlet before classifying. Returns a li…
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
seal_ports | boolean | |
workspace | string | Run this call in this named workspace |
section_view Section View
Cut a solid with a plane and measure the exposed cross-section — the way to "see inside" a part blind. Does not modify the input. mm / mm^2. plane: "XY", "XZ", "YZ" (normals +Z, -Y, +X, as FreeCAD) or a datum-plane handle (its local +Z). offset: plane shift along its normal, mm (plane="XY", offset=10 cuts z=10). emit_profile: also add the section wires as a new registered object and return its handle (raises if the plane misses). Default: measure only. name: the emitted profile's name. Returns {plane, offset_mm, normal, section_area_mm2 (closed wires…
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
emit_profile | boolean | |
name | string | |
offset | number | |
plane | string | |
workspace | string | Run this call in this named workspace |
list_faces List Faces
List all faces of a shaped object with stable tags + geometric descriptors. Returns [{tag, index, kind, area, centroid, normal?, axis?, radius?}, ...]. Tags survive geometry edits as long as the face's surface kind, area, centroid, and (where meaningful) normal/axis/radius do not change. Use the tag in subsequent calls instead of the FaceN index.
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
workspace | string | Run this call in this named workspace |
list_edges List Edges
List all edges of a shaped object with stable tags + descriptors. Returns [{tag, index, kind, length, centroid, axis?, radius?}, ...]. Same stability story as list_faces.
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
workspace | string | Run this call in this named workspace |
query_faces Query Faces
Filter faces by a structured predicate. Returns matching descriptors. Predicate fields (all optional, ANDed): - kind / type: 'planar' | 'cylindrical' | 'conical' | 'spherical' | 'toroidal' | 'spline' - normal_dir: [x, y, z] unit vector for planar faces (with normal_tol) - radius_eq: float, matches cylindrical/conical/spherical (with radius_tol) - area_min / area_max: bounds in mm^2 Optional ordering: - centroid_max / centroid_min: 'x' | 'y' | 'z' (sorts result) - order: 'area_desc' | 'area_asc' Example: {"type": "planar", "normal_dir": [0, 0, 1…
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
predicate * | object | |
workspace | string | Run this call in this named workspace |
resolve_face Resolve Face
Resolve a face tag to the current FaceN index. Errors on miss or ambiguity. Use this when you need to pass a (object, 'FaceN') reference into a tool that doesn't accept tags directly (e.g. legacy FEM constraints).
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
tag * | string | |
workspace | string | Run this call in this named workspace |
resolve_edge Resolve Edge
Resolve an edge tag to the current EdgeN index. Errors on miss or ambiguity.
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
tag * | string | |
workspace | string | Run this call in this named workspace |
make_body Make Body
Create a PartDesign Body. Subsequent sketches/features go inside it. Returns {handle, name}.
| Parameter | Type | Description |
|---|---|---|
name | string | |
workspace | string | Run this call in this named workspace |
make_datum_plane Make Datum Plane
Create a Datum Plane in a Body. base: 'XY' | 'XZ' | 'YZ' for body origin planes. Pass a face_tag dict {handle, tag} for attachment to a face on another shape. offset: shift along the plane normal in mm.
| Parameter | Type | Description |
|---|---|---|
body * | string | |
base | string | |
name | string | |
offset | number | |
workspace | string | Run this call in this named workspace |
make_sketch Make Sketch
Create a sketch in a Body, attached to a plane. plane: 'XY' | 'XZ' | 'YZ' for origin planes, or a datum-plane handle. Returns {handle, name}.
| Parameter | Type | Description |
|---|---|---|
body * | string | |
name | string | |
plane | string | |
workspace | string | Run this call in this named workspace |
add_sketch_geometry Add Sketch Geometry
Append geometric primitives to a sketch. items is a list of dicts: - {type: 'line', start: [x,y], end: [x,y], construction?: bool} - {type: 'circle', center: [x,y], radius: float} - {type: 'arc', center: [x,y], radius, start_angle, end_angle} (radians) - {type: 'point', pos: [x,y]} Returns {indices: [...]} — Sketcher-assigned indices for use in constraints.
| Parameter | Type | Description |
|---|---|---|
items * | array | |
sketch * | string | |
workspace | string | Run this call in this named workspace |
add_sketch_constraint Add Sketch Constraint
Add a constraint to a sketch. type: Coincident, Horizontal, Vertical, Distance, DistanceX, DistanceY, Radius, Diameter, Equal, Parallel, Perpendicular, Tangent, Block, Symmetric, Angle. refs: list of [geom_idx, vertex_role] pairs. vertex_role: 0=edge, 1=start, 2=end, 3=center. value: numeric value (mm or radians) for dimensional constraints.
| Parameter | Type | Description |
|---|---|---|
refs * | array | |
sketch * | string | |
type * | string | |
value | ||
workspace | string | Run this call in this named workspace |
close_sketch Close Sketch
Recompute and report DOF status. Returns {geometry_count, constraint_count, open_vertices, fully_constrained}.
| Parameter | Type | Description |
|---|---|---|
sketch * | string | |
workspace | string | Run this call in this named workspace |
pad Pad
Pad a sketch by `length` mm. symmetric=True extrudes both directions.
| Parameter | Type | Description |
|---|---|---|
sketch * | string | |
length | number | |
name | string | |
reversed | boolean | |
symmetric | boolean | |
workspace | string | Run this call in this named workspace |
pocket Pocket
Subtract a pad of `length` mm from the body. through_all ignores length. through ('wall'|'body'): preferred over through_all. 'wall' ray-casts to the first exit and cuts exactly one wall — right for solids AND shelled bodies; 'body' (legacy ThroughAll) punches every wall of a shell. Implies direction='into_body'; result carries wall_depth_mm. direction ('into_body'|'away_from_body', preferred over the legacy raw `reversed`, honoured only when neither is set): the tool probes both Reversed values and picks the one that does / does not remove material.…
| Parameter | Type | Description |
|---|---|---|
sketch * | string | |
direction | ||
length | number | |
name | string | |
reversed | boolean | |
strict | boolean | |
through | ||
through_all | boolean | |
workspace | string | Run this call in this named workspace |
revolve Revolve
Revolve a sketch around a body origin axis ('X'|'Y'|'Z') by `angle` deg.
| Parameter | Type | Description |
|---|---|---|
sketch * | string | |
angle | number | |
axis | string | |
name | string | |
reversed | boolean | |
workspace | string | Run this call in this named workspace |
partdesign_fillet PartDesign Fillet
PartDesign Fillet on edges of a feature in a Body. `edges` accepts e_* tags or 'EdgeN' index strings; `radius` in mm (> 0). Validated before a handle is issued, like fillet_edges (issue #283): Shape.isValid(), unchanged solid count, and no growth of the tight bounding box. PartDesign needs it as badly as the Part workbench — r=0.6 on a 40x40x1 pad returns an 'Up-to-date' single solid 15% LARGER than the pad. per_edge: add the edges one at a time, validating after each. allow_partial: accept a partial result instead of aborting. Off by default. Returns {hand…
| Parameter | Type | Description |
|---|---|---|
edges * | array | |
feature * | string | |
allow_partial | boolean | |
name | string | |
per_edge | boolean | |
radius | number | |
workspace | string | Run this call in this named workspace |
partdesign_chamfer PartDesign Chamfer
PartDesign Chamfer on edges of a feature in a Body. `edges` accepts e_* tags or 'EdgeN' index strings; `size` is the chamfer leg in mm (> 0). Validated and rolled back on failure exactly like partdesign_fillet (issue #283), with the same per_edge / allow_partial opt-ins. Returns {handle, name, volume (mm^3), edges (the 'EdgeN' names actually chamfered), checks {valid, solids, envelope_ok, envelope_growth_mm, envelope_tol_mm}, mode, partial}; when partial is True, also skipped_edges and a warnings entry. On a failed check the feature is removed, the Body's Tip…
| Parameter | Type | Description |
|---|---|---|
edges * | array | |
feature * | string | |
allow_partial | boolean | |
name | string | |
per_edge | boolean | |
size | number | |
workspace | string | Run this call in this named workspace |
hole Hole
Drill a parametric Hole from a sketch (one or more circles) placed on a face of an existing body feature. Lengths mm. depth_type: 'Dimension' (use `depth`) or 'ThroughAll'. cut_type: 'None' | 'Counterbore' | 'Countersink' | 'Counterdrill'; when not 'None', cut_diameter (head clearance) and cut_depth apply. threaded=True taps it. thread_type / thread_size are COUPLED enums ('M4' fits 'ISOMetricProfile', not 'UNC') — discover them with list_thread_options(). intended_for ('print'|'machine'|'drawing'): sets the ModelThread default when threaded. print →…
| Parameter | Type | Description |
|---|---|---|
sketch * | string | |
cut_depth | ||
cut_diameter | ||
cut_type | string | |
depth | number | |
depth_type | string | |
diameter | number | |
direction | ||
intended_for | ||
model_thread | ||
name | string | |
reversed | boolean | |
strict | boolean | |
thread_size | ||
thread_type | ||
threaded | boolean | |
through | ||
workspace | string | Run this call in this named workspace |
list_thread_options List Hole Thread Options
Discover the COUPLED ThreadType / ThreadSize enums on the hole tool. Call with no args to list valid thread_type values. Call with thread_type=... to list the valid thread_size values for that type (the coupling: thread_size='M4' is valid for 'ISOMetricProfile' but not for 'UNC'). Use this BEFORE calling hole(threaded=True, thread_type=..., thread_size=...) to avoid a failed enum-value call. Returns either {thread_types: [...]} or {thread_type, thread_sizes: [...]}.
| Parameter | Type | Description |
|---|---|---|
thread_type | ||
workspace | string | Run this call in this named workspace |
linear_pattern Linear Pattern
Repeat a PartDesign feature linearly along a direction. direction: 'X'|'Y'|'Z' for body origin axes, or {handle, edge: tag|'EdgeN'} for an edge-aligned direction. length: total span (mm) covered by the pattern. occurrences: number of copies (>=2). Includes the original.
| Parameter | Type | Description |
|---|---|---|
feature * | string | |
direction | ||
length | number | |
name | string | |
occurrences | integer | |
reversed | boolean | |
workspace | string | Run this call in this named workspace |
polar_pattern Polar Pattern
Repeat a PartDesign feature around an axis. axis: 'X'|'Y'|'Z' for body origin axes, or {handle, edge: tag|'EdgeN'}. angle_deg: total swept angle (default 360 = full circle). occurrences: number of copies (>=2). Includes the original.
| Parameter | Type | Description |
|---|---|---|
feature * | string | |
angle_deg | number | |
axis | ||
name | string | |
occurrences | integer | |
reversed | boolean | |
workspace | string | Run this call in this named workspace |
mirrored Mirrored
Mirror a PartDesign feature across a plane. plane: 'XY'|'XZ'|'YZ' for body origin planes, a datum-plane handle string, or {handle, face: tag|'FaceN'} for a face-defined mirror plane.
| Parameter | Type | Description |
|---|---|---|
feature * | string | |
name | string | |
plane | ||
workspace | string | Run this call in this named workspace |
loft Loft
Loft (additively) between two or more sketches. sketches: ordered list of sketch handles. The first becomes the Profile, the rest become Sections. closed: True connects the last section back to the first (toroidal). ruled: True uses straight ruled surfaces between adjacent sections.
| Parameter | Type | Description |
|---|---|---|
sketches * | array | |
closed | boolean | |
name | string | |
reversed | boolean | |
ruled | boolean | |
workspace | string | Run this call in this named workspace |
sweep Sweep
Sweep a profile sketch along a spine sketch (additive pipe). profile: handle of the cross-section sketch. spine: handle of the path sketch (in the same body). mode: 'Standard' | 'Frenet' | 'Auxiliary' | 'Binormal'. transition: 'Transformed' | 'Right corner' | 'Round corner'.
| Parameter | Type | Description |
|---|---|---|
profile * | string | |
spine * | string | |
mode | string | |
name | string | |
transition | string | |
workspace | string | Run this call in this named workspace |
helix Helix
Generate a Part::Helix curve. radius, pitch, height in mm. angle (deg) is the cone angle (0 = cylindrical helix, >0 = conical). Returns a handle to a 1D helical curve. To get a 3D helical solid (e.g. for threads), use the curve as the spine of a sweep.
| Parameter | Type | Description |
|---|---|---|
angle | number | |
height | number | |
name | string | |
pitch | number | |
radius | number | |
workspace | string | Run this call in this named workspace |
thickness Thickness
Hollow out a solid into a shell. base: handle of the body's tip feature (the solid to hollow). open_faces: list of {handle, face: tag|'FaceN'} that become the shell's openings. thickness: wall thickness (mm). reversed: True (default) grows the wall INWARD into the solid (the natural "hollow this part" interpretation). False grows outward. join: 'Arc' | 'Intersection'. mode: 'Skin' | 'Pipe' | 'RectoVerso'.
| Parameter | Type | Description |
|---|---|---|
base * | string | |
open_faces * | array | |
join | ||
mode | ||
name | string | |
reversed | boolean | |
thickness | number | |
workspace | string | Run this call in this named workspace |
draft Draft
Apply a draft angle to faces (for moldability). base: feature handle. faces: list of {handle, face: tag|'FaceN'}. angle_deg: draft angle (positive degrees). neutral_plane: {handle, face: tag|'FaceN'} for the plane along which the angle is measured (typically the parting plane). reversed: flip the direction of the draft.
| Parameter | Type | Description |
|---|---|---|
base * | string | |
faces * | array | |
angle_deg | number | |
name | string | |
neutral_plane | ||
reversed | boolean | |
workspace | string | Run this call in this named workspace |
list_documents List Documents
List all open documents: [{name, label, file_path, dirty, active, object_count}, ...].
| Parameter | Type | Description |
|---|---|---|
workspace | string | Run this call in this named workspace |
set_active_document Set Active Document
Switch the active document by name (the value returned from new_document/open_document).
| Parameter | Type | Description |
|---|---|---|
name * | string | |
workspace | string | Run this call in this named workspace |
close_document Close Document
Close a document by name (or 'active' for the currently active one). Frees its objects and invalidates any handles into the closed doc. Returns {closed, invalidated_handles}.
| Parameter | Type | Description |
|---|---|---|
name | string | |
workspace | string | Run this call in this named workspace |
transaction_open Transaction Open
Begin an undoable transaction on the active document. Pair with transaction_commit (keep the changes) or transaction_abort (roll back). Transactions nest — the most-recent open is committed/aborted first.
| Parameter | Type | Description |
|---|---|---|
label | string | |
workspace | string | Run this call in this named workspace |
transaction_commit Transaction Commit
Commit the most recent open transaction; changes are kept.
| Parameter | Type | Description |
|---|---|---|
workspace | string | Run this call in this named workspace |
transaction_abort Transaction Abort
Roll back the most recent open transaction. Implementation note: FreeCAD 1.1 headless `abortTransaction` is unreliable, so the worker commits then undoes — net effect is a clean rollback.
| Parameter | Type | Description |
|---|---|---|
workspace | string | Run this call in this named workspace |
add_sketch_external Add Sketch External
Project an external edge/face/vertex into a sketch as construction geometry. ref: {handle, edge: tag|'EdgeN'} (or face/vertex variant; or {handle, tag} where tag is e_/f_ prefixed). The projected element gets a negative geom index so subsequent constraints can reference it. Use this to make a sketch that stays anchored to upstream geometry (e.g. a hole 5mm from a tagged edge that survives pad-length edits).
| Parameter | Type | Description |
|---|---|---|
ref * | object | |
sketch * | string | |
workspace | string | Run this call in this named workspace |
get_object Get Object
Dump a handle's properties + shape stats. Useful when no dedicated tool exposes what you need.
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
workspace | string | Run this call in this named workspace |
set_property Set Property
Set a single property by name on an object. Coerces lists → Vector for Vector properties; other values pass through.
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
name * | string | |
value * | ||
workspace | string | Run this call in this named workspace |
verify_feature Verify Feature
Compare a feature's actual volume change against an expected signed delta. Run after each subtractive/additive operation to catch silent failures — Pocket on a curved surface that under-cut, Hole that drilled outside the body, Cut whose Tool didn't intersect the Base. handle: PartDesign feature (Pad/Pocket/Hole/Revolve/etc.) or Part::Cut. expected_delta_mm3: SIGNED expected change. Subtractive → negative, additive → positive. Wrong sign is its own useful error. tolerance: relative tolerance (default 0.05 = 5%).…
| Parameter | Type | Description |
|---|---|---|
expected_delta_mm3 * | number | |
handle * | string | |
abs_tolerance | number | |
tolerance | number | |
workspace | string | Run this call in this named workspace |
set_visibility Set Visibility
Override an object's persistent Visibility flag. By default save_document auto-hides producer-inputs (the Base/Tool of a Cut, features inside a Body) so the re-opened doc shows just the final composition. Use this to override — e.g. to keep a reference primitive visible next to a derived part. Note that the next save_document with visibility_hygiene=True (the default) may re-hide it; pass visibility_hygiene=False to save_document to lock the override in.
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
visible * | boolean | |
workspace | string | Run this call in this named workspace |
fillet_edges Fillet Edges
Fillet edges of a shaped Part object. `edges`: e_* tags (preferred), 'EdgeN' strings, or 1-based ints; `radius` mm (> 0). Validated before a handle is issued (#283) — this OCC fillet can silently return corrupt geometry (a 20 mm cube, all 12 edges at r=11, comes back one LARGER solid). Checks: Shape.isValid(), unchanged solid count, no growth of the tight bounding box. per_edge: add edges one at a time, validating each (slower; for blend-hostile geometry). allow_partial: accept a partial result instead of aborting (off by default). Returns {handle,…
| Parameter | Type | Description |
|---|---|---|
edges * | array | |
handle * | string | |
allow_partial | boolean | |
per_edge | boolean | |
radius | number | |
workspace | string | Run this call in this named workspace |
boolean_op Boolean Op
Boolean operation on two objects by handle. op: 'cut' (base minus tool), 'fuse' (union), or 'common' (intersection). strict: raise instead of warning on a degenerate cut. Returns {handle, volume, removed_volume (base - result mm3; negative on a fuse), volume_ratio (result/base, None if base empty)}, plus `warnings` ONLY on a degenerate cut ("warnings" in result is the test): annihilation (result ~0 — later features operate on nothing) or miss (result == base — nothing removed). Warn-don't-fail by default; strict=True makes both errors.
| Parameter | Type | Description |
|---|---|---|
base * | string | |
op * | string | |
tool * | string | |
strict | boolean | |
workspace | string | Run this call in this named workspace |
export_shape Export Shape
Export a shape to STEP/IGES/BREP/STL. Format inferred from path extension. object: FreeCAD object name (NOT a AnkusDrive handle). If omitted, exports the document's single final shape: inputs consumed by another feature (a cut's base/tool, Body features) are skipped, and solids win over sketches. If more than one final shape remains, it raises and lists them. It never picks one for you.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
object | ||
workspace | string | Run this call in this named workspace |
run_script Run Python Script
Escape hatch: execute Python in the worker with App/Part/ObjectsFem in scope. Set `__result__` in the script to return a JSON-serializable value. auto_register (default True): any new shape-bearing object the script creates is automatically registered into the handle table. The result includes a `registered` list of {handle, name, type} entries so the next tool call (render_view, list_faces, fillet_edges, mass_properties, etc.) can address script-created objects via handle without a separate register_handle round-trip. Disabled unless ANKUSDRIVE_ALLOW_RUN_SCR…
| Parameter | Type | Description |
|---|---|---|
code * | string | |
auto_register | boolean | |
workspace | string | Run this call in this named workspace |
register_handle Register Handle
Register an existing FreeCAD object into the AnkusDrive handle table. Use after run_script (when auto_register=False) or after open_document to bring objects into the handle ecosystem so subsequent tool calls accept them via handle. object: the FreeCAD object's .Name (e.g. 'Helix001', 'Cut'). prefix: handle prefix (default 'manual'). Each call returns a fresh handle; registering the same object twice produces two aliases. Returns {handle, name, type, label}.
| Parameter | Type | Description |
|---|---|---|
object * | string | |
prefix | string | |
workspace | string | Run this call in this named workspace |
mass_properties Mass Properties
Mass properties of a shaped object: volume (mm³), surface area (mm²), centroid, bounding box, inertia tensor. If density (kg/mm³) is given, also returns mass (kg). Steel = 7.9e-6, aluminum = 2.7e-6, ABS = 1.05e-6.
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
density | ||
workspace | string | Run this call in this named workspace |
make_assembly Make Assembly
Create an App::Part container to hold linked parts. Returns {handle, name}.
| Parameter | Type | Description |
|---|---|---|
name | string | |
workspace | string | Run this call in this named workspace |
add_part Add Part
Add a part to an assembly via App::Link. source is one of: {"handle": "<handle>"} — link an in-doc body {"path": "/path/to/part.FCStd"} — link first body / subassembly {"path": "/path/to/part.FCStd", "object": "X"} — link named object placement: [x, y, z] or {position: [...], axis: [...], angle_deg: ...}. mate: place by aligning this part's published interface frame to an already-placed parent's, instead of (or after) a raw placement: {"child_iface": "<name>", "parent": "<link-name|handle>", "pare…
| Parameter | Type | Description |
|---|---|---|
assembly * | string | |
source * | object | |
mate | ||
name | string | |
placement | ||
workspace | string | Run this call in this named workspace |
list_assembly_parts List Assembly Parts
List parts of an assembly: name, type, linked-target name, position, volume.
| Parameter | Type | Description |
|---|---|---|
assembly * | string | |
workspace | string | Run this call in this named workspace |
interference_check Interference Check
Pairwise interference: compute volume of intersection between every pair of parts. Returns [{a, b, interference_mm3}, ...] descending by volume. Empty list = no interference.
| Parameter | Type | Description |
|---|---|---|
assembly * | string | |
workspace | string | Run this call in this named workspace |
bom_extract BOM Extract
Walk an assembly and return [{part, count, total_volume_mm3, total_mass_kg?}, ...] grouped by source (component file + object), NOT the bare object name, so two distinct components both named "Box" don't collapse into one row. density (kg/mm³) is optional. recursive (default True): descend into linked subassemblies (App::Part) so the BOM flattens to leaf parts. False counts each subassembly as one line. orderable (default False): opt in to the BUYABILITY view — is every purchased line on this BOM a part that actually exists off the shelf? The default return is…
| Parameter | Type | Description |
|---|---|---|
assembly * | string | |
check_stock | boolean | |
density | ||
orderable | boolean | |
recursive | boolean | |
workspace | string | Run this call in this named workspace |
standard_part_designate Standard Part Designate
The canonical, orderable designation of a purchased standard part — the string a buyer can actually quote against: "ISO 4762 M4×12 A2", "608-2RS", "AS568-214 NBR70". A BOM row that reads "SocketHeadCapScrew" is not a buyable line; this is what turns it into one. Three ways in: handle read the designation add_fastener / add_bearing / add_thread stamped on the part when it was built. An object with no stamp reports designation=None plus whether its NAME reads like a purchased part. Nothing is ever inferred f…
| Parameter | Type | Description |
|---|---|---|
designation | ||
family | ||
handle | ||
spec | ||
workspace | string | Run this call in this named workspace |
designation_check Designation Check
Gate: every purchased part on this assembly must be orderable. Flags BOM rows a buyer cannot act on — a purchased standard part with no canonical designation, or one whose designation is missing a fact needed to order it (no material grade). Run it before quoting or releasing a package: a BOM whose purchased lines are geometry names silently pushes the sourcing work onto a human, once per revision. Purchased-ness is EXACT for AnkusDrive-generated parts (the object carries a stamp) and a documented name heuristic for everything else — so a hand-modelled "Br…
| Parameter | Type | Description |
|---|---|---|
assembly | ||
recursive | boolean | |
rows | ||
workspace | string | Run this call in this named workspace |
catalog_search Catalog Search
Browse the off-the-shelf catalog: which standard components actually EXIST, in which sizes, in which stocked lengths. Call it while designing, before you commit geometry to a number — it is the difference between a design somebody can build and one that needs a special. The dimensional corpora (threads/bearings/stock) tell you what a part measures. This one tells you whether it is a thing you can buy. Nothing else in AnkusDrive knows that an ISO 4762 M4×12 is a stocked item and an M4×13 is not. Every argument is an optional filter: family screw | se…
| Parameter | Type | Description |
|---|---|---|
drive | ||
family | ||
grade | ||
kind | ||
length | ||
limit | integer | |
max_length | ||
min_length | ||
size | ||
standard | ||
workspace | string | Run this call in this named workspace |
catalog_nearest Catalog Nearest
Snap a desired standard part to the nearest one that actually exists. This is the call that changes how you design. Ask for an ISO 4762 M4×13 and it tells you that 12 and 16 are stocked and 13 is not — which turns "I need a 13 mm screw" into "I need to adjust my stack-up to 12 or 16". Use it the moment a fastener length falls out of a dimension chain, before the geometry hardens around a size nobody sells. standard: a product standard or alias ("ISO 4762", "DIN 912", "ISO 7380-1"). size: thread designation, nominal mm, or shaft/bore mm. length: the wanted l…
| Parameter | Type | Description |
|---|---|---|
size * | string | |
standard * | string | |
grade | ||
length | ||
workspace | string | Run this call in this named workspace |
catalog_check Catalog Check
Is this exact part something you can buy off the shelf? Pass a canonical `designation` ("ISO 4762 M4×12 A2", "608-2RS") or the `handle` of a part whose designation was stamped when it was generated. Offline and deterministic. Returns {ok, code, standard, size, length, stocked, grade_ok, reason, nearest, lengths, grades, fidelity, captured, market}, where code is: stocked the size/length exists and the material is listed (for a cut-to-length product like threaded rod, any length up to the longest stock bar co…
| Parameter | Type | Description |
|---|---|---|
designation | ||
handle | ||
workspace | string | Run this call in this named workspace |
envelope_check Envelope Check
Keep-out gate: assert each named part's world bounding box stays inside its declared envelope. envelopes maps a part's link name (or label) to {"min": [x,y,z], "max": [x,y,z]} in the assembly frame. Returns violations [{part, axis, got, allowed}, ...]; empty means everything is within its box.
| Parameter | Type | Description |
|---|---|---|
assembly * | string | |
envelopes * | object | |
workspace | string | Run this call in this named workspace |
publish_interface Publish Interface
Record a named interface frame on a component so other parts can mate to it — the published "here is where you bolt to me, and how it's oriented". handle: the component's shaped object. name: interface name (e.g. "lid_seat", "bolt_circle", "bore_axis"). frame: {origin:[x,y,z], z_axis:[...]?, x_axis:[...]?}. z_axis defaults +Z, x_axis +X. Extra keys (e.g. bolt-circle metadata) are stored verbatim. Persists in the component's .FCStd as a JSON property bag, so merge_assembly can mate against it later. Returns {handle, name, frame, interfaces}.
| Parameter | Type | Description |
|---|---|---|
frame * | object | |
handle * | string | |
name * | string | |
workspace | string | Run this call in this named workspace |
annotate_face Annotate Face
Declare the semantic ROLE of a face — what it is FOR — so later edits can be checked against intent instead of re-derived from raw geometry. The role binds to the face's stable f_* tag and persists in the .FCStd as a JSON property bag (same mechanism as publish_interface); it survives save/reopen. Once declared, check_airtight_path accepts the role/name directly (e.g. inlet="inlet"). handle: the part. face: an f_* tag, 'FaceN', or int index of the face to annotate. role: one of 'inlet' | 'outlet' | 'sealing' | 'wetted' | 'ambient' | 'mating'. name: optional…
| Parameter | Type | Description |
|---|---|---|
face * | ||
handle * | string | |
role * | string | |
meta | ||
name | ||
workspace | string | Run this call in this named workspace |
list_face_roles List Face Roles
Read back the semantic face roles declared on a part (see annotate_face). Each entry re-resolves its stored tag against the CURRENT geometry, so a drifted or deleted face is reported rather than silently resolving wrong. Returns a list (sorted by name) of dicts: name (str) the annotation key role (str) inlet | outlet | sealing | wetted | ambient | mating tag (str) the f_* face tag the role is bound to present (bool) whether that tag still resolves on the current shape index (str) 'FaceN' on the current shape (only when present)…
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
workspace | string | Run this call in this named workspace |
declare_intent Declare Intent
Record the functional invariants a part must keep satisfying, so they can be re-checked after every edit (see verify_intent). Persists in the .FCStd as a JSON property bag (AD_Intent); one contract per part — re-declaring replaces. handle: the part. contract: a dict with any of these (declare at least one): watertight (bool) require check_shape's watertight_solid verdict. airtight_path (dict) {inlet, outlet, min_aperture_mm2?}; each port is a face tag / 'FaceN' / int / declared role-or-name. required_faces (list) face ta…
| Parameter | Type | Description |
|---|---|---|
contract * | object | |
handle * | string | |
workspace | string | Run this call in this named workspace |
verify_intent Verify Intent
Re-run every invariant declared with declare_intent — the regression gate to run after each edit. Composes check_shape / check_airtight_path / face-role resolution; never raises on a failing invariant (a failure is a passed=False row), so it is safe to call in a loop. Inspection only; mutates nothing. handle: the part (must have a declared intent contract). Returns a dict: handle (str) ok (bool) True iff every declared invariant passed results (list) one {invariant, passed, detail} per declared invariant — invariant…
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
workspace | string | Run this call in this named workspace |
verify_contract Verify Contract
Build-time self-check of a component against its manifest slice (RFC §11.3): a builder calls this on its OWN part before save, so a contract violation is caught locally and cheaply instead of after a fan-in merge (build → merge → gate-fail → rebuild becomes build → self-check → fix). Never raises on a failing check (a failure is a passed=False row), so it is safe to call in a loop. Inspection only; mutates nothing. handle: the component's shaped object. contract: the component's slice — all keys optional, give at least one: envelope {min:[x,y,z…
| Parameter | Type | Description |
|---|---|---|
contract * | object | |
handle * | string | |
workspace | string | Run this call in this named workspace |
component_contract_check Component Contract Check
Builder-side contract gate for one component (issue #169) — the local half of the gate merge_assembly re-runs at fan-in. Any MCP host builds a component with the full AnkusDrive tool surface, then calls this on its part BEFORE saving, against its `builder brief` (a ankusdrive.builder_brief/1 slice), and repairs any failing check. Catching a violation here turns the expensive loop (build → merge → gate-fail → rebuild) into a cheap local one. Never raises on a failing check. handle: the component's shaped object. brief: a builder brief. Only three of its key…
| Parameter | Type | Description |
|---|---|---|
brief * | object | |
handle * | string | |
workspace | string | Run this call in this named workspace |
interface_align_check Interface Align Check
Gate: verify declared interface pairs coincide in world space — the "do the OTHER interfaces line up?" check for multi-interface mates. After the primary mate seats a part, this confirms its secondary interfaces (a second bolt pattern, a bore axis) actually meet the parent's. pairs: [{child, child_iface, parent, parent_iface}, ...] (child/parent are link names in the assembly). Returns misaligned pairs [{..., gap_mm}], empty if every pair coincides within tol_mm.
| Parameter | Type | Description |
|---|---|---|
assembly * | string | |
pairs * | array | |
tol_mm | number | |
workspace | string | Run this call in this named workspace |
validate_manifest Validate Manifest
Validate a manifest WITHOUT building it (the cheap front door, RFC §11.7). Structural + cross-reference checks a JSON shape can't enforce: every component has exactly one of file/manifest/library; a library carries a tool; every instance references a known component; every mate/check references a known instance; a present `schema` is the known version ("ankusdrive.manifest/1"). manifest: path to the manifest JSON. Returns {ok, problems, schema, manifest_hash} — ok is True iff problems is empty; manifest_hash fingerprints the contract content (what the lockfile…
| Parameter | Type | Description |
|---|---|---|
manifest * | string | |
workspace | string | Run this call in this named workspace |
merge_assembly Merge Assembly
Construct-up an assembly from a manifest JSON (the coordinator's one call): create the doc, link each component by file path, place it, recompute, and run the gates. Component files resolve relative to the manifest's directory; links auto-reload, so re-running picks up updated components (deterministic, idempotent). manifest shape: { "name": "gearbox", "root": "gearbox.FCStd", "components": {"<id>": {"file": "rel/part.FCStd", "object": "<name>"?, "envelope": {"min":[...],"max":[...]}?}}, "instances": [{"component":"<id>…
| Parameter | Type | Description |
|---|---|---|
manifest * | string | |
workspace | string | Run this call in this named workspace |
assembly_lock Assembly Lock
Write a lockfile recording each component's content hash, published- interface hash, and mate dependencies — the provenance baseline a coordinator uses to detect drift across a team. Call after a clean merge. lockfile defaults to <manifest>.lock.json. Returns {lockfile, components}.
| Parameter | Type | Description |
|---|---|---|
manifest * | string | |
lockfile | ||
workspace | string | Run this call in this named workspace |
assembly_lock_check Assembly Lock Check
Compare current component files to a lockfile and classify drift (change propagation, RFC §9): modified — file changed since lock interface_changed — published interface frames moved (subset of modified) stale — mates to an interface_changed component and was NOT itself rebuilt: a neighbor that needs re-dispatch new / removed — components added to / dropped from the manifest ok = nothing stale and no new/removed (safe to re-merge without re-dispatch). Returns {modified, interface_changed, stale, new…
| Parameter | Type | Description |
|---|---|---|
manifest * | string | |
lockfile | ||
workspace | string | Run this call in this named workspace |
make_drawing_page Make Drawing Page
Create a TechDraw page using a built-in A4 landscape template by default. template: optional absolute path to a .svg template.
| Parameter | Type | Description |
|---|---|---|
name | string | |
template | ||
workspace | string | Run this call in this named workspace |
add_projection_group Add Projection Group
Add a multi-view projection group of `body` to a drawing page. views: list of FreeCAD view codes ('Front', 'Top', 'Right', 'Left', 'Bottom', 'Rear', 'FrontTopLeft', etc.). Default: ['Front', 'Top', 'Right'].
| Parameter | Type | Description |
|---|---|---|
body * | string | |
page * | string | |
name | string | |
views | ||
workspace | string | Run this call in this named workspace |
export_drawing Export Drawing
Export a drawing page to PDF, SVG, or DXF (format inferred from the path extension), headless. PDF/SVG are composed from the template, the per-view geometry, and any dimensions/annotations on the page; DXF uses FreeCAD's native page writer. Returns {path, size, format, views, dimensions}.
| Parameter | Type | Description |
|---|---|---|
page * | string | |
path * | string | |
workspace | string | Run this call in this named workspace |
add_dimension Add Dimension
Add dimension(s) to a drawing page. Modes (pick one): * auto=True: overall horizontal + vertical extents for every part-view (or only `views`, by name or projection code). * view + edge=<edge tag>: true length of a model edge (the real length, not the foreshortened projection). * view + kind='diameter'|'radius' + edge=<circular edge tag>: ⌀/R of a hole or arc. * view + kind='angle' + face=<conical face tag>: included angle (2×) of a cone/countersink/taper; half_angle=True for the half-angle. * view + from_point/to_point ([x,y,z]…
| Parameter | Type | Description |
|---|---|---|
page * | string | |
auto | boolean | |
edge | ||
face | ||
from_point | ||
half_angle | boolean | |
kind | string | |
to_point | ||
tolerance | ||
view | ||
views | ||
workspace | string | Run this call in this named workspace |
add_annotation Add Annotation
Add a free text annotation to a drawing page at page position (x, y) in mm (origin bottom-left, +Y up, matching TechDraw view placement). Returns {handle, name, text}.
| Parameter | Type | Description |
|---|---|---|
page * | string | |
text * | string | |
name | string | |
workspace | string | Run this call in this named workspace |
x | number | |
y | number |
add_feature_note Add Feature Note
Attach an explicit manufacturing NOTE that satisfies a curved/periodic feature the drawing_gate enumerates (issue #108) — the 'per CAD model / profile table' coverage for geometry a single number can't capture (a freeform/BSpline wall's profile, a tooth pattern's full parameter set) or a documented cone angle. `feature` is the enumerated feature id (e.g. 'FREEFORM1', 'PAT1', 'CONE1', from drawing_gate's `enumerated_features`); `text` defaults to a sensible callout. The gate reads the note back as coverage. Returns {handle, name, feature, text}.
| Parameter | Type | Description |
|---|---|---|
feature * | string | |
page * | string | |
kind | string | |
name | string | |
text | ||
workspace | string | Run this call in this named workspace |
x | number | |
y | number |
set_title_block Set Title Block
Populate the drawing's title block (composed bottom-right on SVG/PDF export; calling this opts the page into rendering it). Scale, sheet size, units and part name are auto-derived; these fields override or add to them. Returns {handle, name, fields}.
| Parameter | Type | Description |
|---|---|---|
page * | string | |
date | ||
drawn_by | ||
material | ||
part | ||
project | ||
rev | ||
units | ||
workspace | string | Run this call in this named workspace |
drawing_gate Drawing Gate
Manufacturing-completeness gate for a drawing page: do the placed dimensions fully and non-redundantly reconstruct the part? Reads the real solid + placed dimensions and accounts degrees of freedom, process-aware: 'prismatic' needs each hole located X/Y from a datum and the block sized W×H×T; 'turned' needs only Ø + axial length per step. process='auto' infers it. Datum discipline (a location not measured from a datum face → no_datum) turns on when faces carry role='datum' (annotate_face), or with datums_declared=True. require_ballooned=True also fails unballo…
| Parameter | Type | Description |
|---|---|---|
page * | string | |
datums_declared | boolean | |
process | string | |
require_ballooned | boolean | |
workspace | string | Run this call in this named workspace |
fit_page Fit Drawing to Page
Auto-fit a drawing to its sheet: recentre the views so the part AND its placed dimensions sit inside the printable border (clear of the title block). The projection group's Automatic scale already sizes the part; its dimensions extend a fixed margin beyond it which can run off an edge — call this after placing dimensions to slide everything inside. `margin` mm is the border inset. Returns {scale, fits, envelope, border}; fits=False means the part + dims are too large even when centred (use a larger sheet).
| Parameter | Type | Description |
|---|---|---|
page * | string | |
margin | number | |
workspace | string | Run this call in this named workspace |
drawing_legibility Drawing Legibility
Legibility gate for a drawing page: on the ACTUAL placed graphics, flag the ways the layout becomes unreadable — overlapping dimension labels, a dimension line crossing a view it does not reference, or anything past the sheet border. min_gap (mm) is the breathing room required between two labels. Returns {ok, violations, labels, segments, views}; each violation has a `code` (overlap/crosses_view/out_of_border) and a human `reason`. ok=True means the placed dimensions read cleanly on the sheet. Inspection balloons count as placed graphics too — a numbered circle…
| Parameter | Type | Description |
|---|---|---|
page * | string | |
min_gap | number | |
workspace | string | Run this call in this named workspace |
add_gdt_callout Add GD&T Callout
Place a GD&T feature control frame on a drawing page, so the tolerance is declared on the print: it renders as a compartmented symbol and inspection_plan / fai_report read it back as a ballooned characteristic. control: ASME Y14.5 characteristic, as gdt_check accepts: flatness, straightness, circularity, cylindricity, profile_line, profile_surface, perpendicularity, parallelism, angularity, position, concentricity, runout, total_runout. zone: tolerance zone mm (Ø-prefixed for position, concentricity, circularity, cylindricity). datums: orde…
| Parameter | Type | Description |
|---|---|---|
control * | string | |
page * | string | |
zone * | number | |
datums | ||
feature | ||
mmc_bonus | number | |
modifier | string | |
name | string | |
view | string | |
workspace | string | Run this call in this named workspace |
x | number | |
y | number |
balloon_drawing Balloon Drawing
Number every characteristic on a drawing page (dimensions, feature control frames, feature notes) with an inspection balloon, rendered on SVG/PDF export; inspection_plan and fai_report key their rows on it. Numbers are a persistent IDENTITY: re-running reassigns nothing, a new dimension gets the next number, a deleted one RETIRES its number (never reused). renumber=True restarts from 1 and invalidates existing inspection records. Call after dimensions are placed and fit_page has run. Returns {count, balloons (source object name -> number), assigned, kept, reti…
| Parameter | Type | Description |
|---|---|---|
page * | string | |
renumber | boolean | |
workspace | string | Run this call in this named workspace |
inspection_plan Inspection Plan
The ballooned characteristic list for a drawing page as data (every dimension, feature control frame, feature note), with nominal, limits, and a suggested measurement method per row. The method follows the tolerance: the `ratio`:1 gauge rule (default 10:1) walked down a per-family instrument ladder (bores use pin/bore gauges; datum-referenced GD&T → CMM; datum-free form → surface plate). Resolution is exact; instrument mapping is shop convention, hence fidelity='correlation'. Returns {ok, characteristics, count, by_method, unmeasurable, retired, next_balloo…
| Parameter | Type | Description |
|---|---|---|
page * | string | |
ratio | number | |
workspace | string | Run this call in this named workspace |
fai_report FAI Report
First-article inspection report for a drawing page, shaped like AS9102 Rev B Form 3: one row per ballooned characteristic with the Form 3 fields, limits, suggested method, and computed status. results: balloon number -> measured value; rows are accepted/rejected against limits. For `position` pass {"x":.., "y":..} (deviation 2·√(x²+y²), as gdt_check). Omit for a BLANK form: every row 'not_evaluated', never a pass. path: optionally write .csv (data), .svg or .pdf (printable table). part / rev: identity stamped in; default page part name / title-block re…
| Parameter | Type | Description |
|---|---|---|
page * | string | |
part | ||
path | ||
ratio | number | |
reference | string | |
results | ||
rev | ||
workspace | string | Run this call in this named workspace |
add_thumbnail Add Thumbnail
Place a small isometric pictorial (vector TechDraw view) in the sheet's top-right corner IF it fits without crowding existing views/dimensions. It is pinned there, never dimensioned, and ignored by drawing_gate. Call it AFTER views, dimensions and fit_page. Returns {placed, box, scale?, view?, reason?}; placed=False with a reason when the corner is occupied.
| Parameter | Type | Description |
|---|---|---|
page * | string | |
name | string | |
workspace | string | Run this call in this named workspace |
add_section_view Add Section View
Add a cross-section view when the part has internal features the outline / hidden-line views convey ambiguously (counterbore, blind hole/bore, pocket). The need is judged from the real solid; the cut runs lengthwise through such a feature and the view is placed in clear space. auto (default True): add it ONLY if hidden internal geometry exists, else return {added: False, recommended: False}; auto=False forces a section. process: 'auto' | 'prismatic' | 'turned' — how features are enumerated. Returns {added, recommended, reasons, feature_ids, view?, normal?, o…
| Parameter | Type | Description |
|---|---|---|
page * | string | |
auto | boolean | |
name | string | |
process | string | |
symbol | string | |
workspace | string | Run this call in this named workspace |
render_view Render View
Render an isometric/orthographic view of a shaped object as a PNG. view: 'iso' | 'top' | 'bottom' | 'front' | 'back' | 'left' | 'right' | 'side'. deflection: tessellation accuracy in mm (smaller = finer mesh, slower). edges: draw triangle edges over filled faces. Returns {png_base64, width, height, view, vertices, triangles}.
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
deflection | number | |
edges | boolean | |
height | integer | |
view | string | |
width | integer | |
workspace | string | Run this call in this named workspace |
render_views Render Views
Render multiple views of a single object. Returns {views: {view_name: {png_base64,...}}}. Default views: ['iso', 'top', 'front'].
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
deflection | number | |
height | integer | |
views | ||
width | integer | |
workspace | string | Run this call in this named workspace |
render_fem_results Render FEM Results
Render a completed FEM result's surface, colored by a per-vertex field. Pulls the result surface (boundary triangulation + per-node field values + displacement vectors) from the worker, then colors it with a viridis colormap (barycentrically interpolated), overlays the deformed shape, and draws a colorbar with the field min/max — the "agent eyes" for a stress / displacement / thermal solve. field: 'vonmises' (default) | 'displacement' | 'temperature'. view: a preset ('iso'|'top'|'front'|…) or a custom '(azimuth,elevation)' camera passed as e.g. "45,35"…
| Parameter | Type | Description |
|---|---|---|
analysis * | string | |
deformation_scale | ||
edges | boolean | |
field | string | |
height | integer | |
view | string | |
width | integer | |
workspace | string | Run this call in this named workspace |
render_photoreal Render Photoreal
Photorealistic "hero image" of a part or a whole assembly — presentation quality, unlike render_view's fast software-rasterized preview. Call render_capabilities first when unsure what is installed. renderer='auto' (default) uses Blender (Cycles, full install, run headless) when it resolves, otherwise POV-Ray (or another FreeCAD Render add-on renderer). Name one to force it: 'Blender' | 'Povray' | 'Luxcore' | 'Appleseed' | 'Cycles' (the stripped standalone build, not Blender) | 'Ospray' | 'Pbrt'. Renders never modify the live model. What to render: `handle`…
| Parameter | Type | Description |
|---|---|---|
appearances | ||
device | ||
handle | ||
height | integer | |
material | ||
output_dir | ||
parts | ||
quality | ||
renderer | string | |
scene | ||
view | string | |
width | integer | |
workspace | string | Run this call in this named workspace |
render_photoreal_submit Render Photoreal Submit
Start a photorealistic render asynchronously; returns immediately with {job_id, status, renderer} instead of blocking for the whole render. Use this (rather than render_photoreal) for renders that may take a long time — quality='final', large images, big assemblies — so the worker stays responsive. Poll render_job(job_id) until status is 'done' (then it returns the PNG and, for Blender, blend_path) or 'failed'. Same arguments, renderer selection and not-installed miss dict as render_photoreal; see render_capabilities for what resolves on this machine.
| Parameter | Type | Description |
|---|---|---|
appearances | ||
device | ||
handle | ||
height | integer | |
material | ||
output_dir | ||
parts | ||
quality | ||
renderer | string | |
scene | ||
view | string | |
width | integer | |
workspace | string | Run this call in this named workspace |
render_job Render Job
Poll an async render started by render_photoreal_submit. Returns {job_id, status} where status is 'running', 'done', or 'failed'. When 'done', also returns {png_base64, png_path, renderer, view, material, width, height}; when 'failed', {error}. The result remains available for repeat polls. Pass discard=True once you have a terminal result to free the job immediately (drops the cached image and closes its temp document); ignored while running. Jobs are also auto-evicted oldest-first once finished jobs exceed an internal cap.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | |
discard | boolean | |
workspace | string | Run this call in this named workspace |
render_capabilities Render Capabilities
Report which photoreal renderers are usable right now — Blender (the studio backend) and the FreeCAD Render add-on renderers — so you can pick one for render_photoreal, or tell the user exactly what to install, instead of discovering availability by trial and error. Takes no arguments and renders nothing. Resolves Blender like a solver (ANKUSDRIVE_BLENDER_PATH -> PATH -> per-OS install dirs, incl. the versioned `Blender Foundation\Blender X.Y` and /opt|~/.local/opt/blender-*) and launches it once (cached) to read its version and GPU; resolves each add-on render…
| Parameter | Type | Description |
|---|---|---|
workspace | string | Run this call in this named workspace |
solve_capabilities Solve Capabilities
Report which P2 external solvers (CFD/MBD/topology/transient-thermal/optics) are usable right now — so you can pick a working solver for a *_submit family instead of discovering availability by trial and error. The solver twin of render_capabilities. Takes no arguments. Resolves each solver side-effect-free: a binary by ANKUSDRIVE_<SOLVER>_PATH env -> PATH -> per-OS install dirs; a pip-wheel solver by importability. It executes nothing and installs nothing. `families[*].any_available` is the gate to trust: it means AnkusDrive can actually DRIVE that family h…
| Parameter | Type | Description |
|---|---|---|
workspace | string | Run this call in this named workspace |
setup_status Setup Status
The machine-readable form of `ankusdrive doctor` — resolve FreeCAD and every solver family and report, per item, found/missing with the exact fix. Call this when the user asks to set up, diagnose, or finish installing AnkusDrive, then walk them through the per-item `fix`/`install_hint` commands for their `platform`. Read-only and side-effect-free: nothing is executed or installed and no environment is mutated (`verify_freecad_boot=True` additionally boots FreeCAD once, time-boxed, purely to read back its version — leave it False unless the user doubts the insta…
| Parameter | Type | Description |
|---|---|---|
verify_freecad_boot | boolean | |
verify_image | boolean | |
workspace | string | Run this call in this named workspace |
fem_new_analysis FEM New Analysis
Create a Fem::FemAnalysis container. Returns {handle, name}.
| Parameter | Type | Description |
|---|---|---|
name | string | |
workspace | string | Run this call in this named workspace |
fem_set_solver FEM Set Solver
Add a solver to an analysis. kind: 'ccx' (CalculiX) or 'elmer'. tunables: dict of solver-property values, e.g. {"GeometricalNonlinearity": "linear", "ThermoMechSteadyState": True, "MatrixSolverType": "default"}. Sensible CCX defaults are filled in if omitted.
| Parameter | Type | Description |
|---|---|---|
analysis * | string | |
kind | string | |
name | string | |
tunables | ||
workspace | string | Run this call in this named workspace |
fem_set_material FEM Set Material
Bind a material to a body in an analysis. material is a dict with at minimum: {"YoungsModulus": "210000 MPa", "PoissonRatio": "0.30", "Density": "7900 kg/m^3", "Name": "Steel-Generic"} Any extra keys are passed through to the FEM material card.
| Parameter | Type | Description |
|---|---|---|
analysis * | string | |
body * | string | |
material * | object | |
name | string | |
workspace | string | Run this call in this named workspace |
fem_add_constraint FEM Add Constraint
Add a constraint by face/edge tag (Slice 1). kind: structural: 'fixed' | 'force' | 'pressure' | 'displacement' thermal: 'temperature' | 'heatflux' | 'initial_temperature' refs: list of {handle, tag} dicts; 'tag' may be a face tag (f_...) or edge tag (e_...). Resolved against the live shape so refs survive unrelated geometry edits. For 'force': force (N), optional direction {handle, edge|tag}. For 'pressure': pressure (MPa). For 'displacement': x/y/z (mm) or x_free/y_free/z_free. For 'temperature' / 'initial_temperature': temperature…
| Parameter | Type | Description |
|---|---|---|
analysis * | string | |
kind * | string | |
refs * | array | |
ambient_temp | ||
direction | ||
emissivity | ||
film_coef | ||
flux | ||
flux_type | ||
force | ||
name | ||
pressure | ||
reversed | boolean | |
temperature | ||
workspace | string | Run this call in this named workspace |
x | ||
x_free | ||
y | ||
y_free | ||
z | ||
z_free |
fem_modal FEM Modal
Configure analysis for modal (frequency) extraction. Sets solver AnalysisType='frequency' and EigenmodesCount=n_modes. f_low / f_high (Hz) optionally bound the requested mode range. Caller still calls fem_run, then fem_modal_results to read frequencies.
| Parameter | Type | Description |
|---|---|---|
analysis * | string | |
f_high | ||
f_low | ||
n_modes | integer | |
workspace | string | Run this call in this named workspace |
fem_modal_results FEM Modal Results
Extract natural frequencies from a completed modal run. Pass `analysis`, or the `job_id` of a finished fem_run_submit solve. Returns {frequencies_hz: [...], modes: [{mode, frequency_hz, max_displacement_mm}, ...]}.
| Parameter | Type | Description |
|---|---|---|
analysis | ||
job_id | ||
workspace | string | Run this call in this named workspace |
contact_setup Contact Setup
Set up surface-to-surface contact between face pairs for a CalculiX solve and flip the solver to nonlinear — no new solver (promotes the CCX contact/nonlinear flags the FEM path already exposes). `face_pairs` is a list of {a:{handle, tag|face}, b:{handle, tag|face}} (master, slave) pairs; `friction` is the Coulomb coefficient (0 = frictionless); `slope` optionally sets the penalty contact stiffness; `nonlinear` (default True) sets the solver's GeometricalNonlinearity. Run fem_run + fem_results after. Gate RELATIVE to a bonded reference on the same mesh: a bon…
| Parameter | Type | Description |
|---|---|---|
analysis * | string | |
face_pairs * | array | |
friction | number | |
name | string | |
nonlinear | boolean | |
slope | ||
workspace | string | Run this call in this named workspace |
fem_set_nonlinear_material FEM Set Nonlinear Material
Attach an elastoplastic (`*PLASTIC`) hardening curve to a linear FEM material and switch the CalculiX solve to nonlinear — the material-nonlinearity half of the nonlinear FEM path (`contact_setup` is the geometric/contact half). No new solver: this promotes the CCX `MaterialNonlinearity` / `GeometricalNonlinearity` flags the FEM path already exposes. `base_material` is the handle from `fem_set_material` (its YoungsModulus/PoissonRatio stay the elastic branch). Give the post-yield curve either as `yield_points` ([[stress_MPa, plastic_strain], ...], first point at…
| Parameter | Type | Description |
|---|---|---|
analysis * | string | |
base_material * | string | |
geometric_nonlinearity | boolean | |
hardening | string | |
max_plastic_strain | number | |
name | string | |
ramp_increments | integer | |
tangent_modulus_mpa | ||
workspace | string | Run this call in this named workspace |
yield_mpa | ||
yield_points |
fem_buckling FEM Buckling
Configure analysis for linear buckling. Apply a unit-magnitude force constraint at the load location; the result factors are the multipliers at which buckling occurs.
| Parameter | Type | Description |
|---|---|---|
analysis * | string | |
n_factors | integer | |
workspace | string | Run this call in this named workspace |
fem_buckling_results FEM Buckling Results
Extract buckling load multipliers from a completed buckling run. Pass `analysis`, or the `job_id` of a finished fem_run_submit solve. Returns {buckling_factors: [...], modes: [{mode, factor}, ...]}.
| Parameter | Type | Description |
|---|---|---|
analysis | ||
job_id | ||
workspace | string | Run this call in this named workspace |
fem_thermal_results FEM Thermal Results
Extract temperature field summary from a completed thermal run. Pass `analysis`, or the `job_id` of a finished fem_run_submit solve. Returns {temperatures_c: {min, max, mean}, top_n_hot_nodes: [...]}.
| Parameter | Type | Description |
|---|---|---|
analysis | ||
job_id | ||
top_n | integer | |
workspace | string | Run this call in this named workspace |
fem_mesh_refinement FEM Mesh Refinement
Add a local mesh-refinement region to an existing FEM mesh. mesh: handle of the FEM mesh. refs: list of {handle, face|edge|tag} dicts identifying the elements (faces/edges) to refine on. char_length: characteristic element length (mm) on those elements; should be smaller than the global mesh setting to actually refine.
| Parameter | Type | Description |
|---|---|---|
char_length * | number | |
mesh * | string | |
refs * | array | |
name | string | |
workspace | string | Run this call in this named workspace |
fem_mesh FEM Mesh
Create a Gmsh mesh of `body`, attached to `analysis`. char_length: max characteristic element length in mm. 0 = let Gmsh pick. min_length: min element length in mm. Default char_length/10, which keeps sliver edges in imported CAD from exploding the mesh; 0 removes the floor. element_order: '1st' or '2nd' (quadratic). Use '2nd' for bending/modal accuracy — linear tets (C3D4) shear-lock and overstiffen thin sections (a cantilever's first natural frequency lands ~50% high with only 1-2 elements through the thickness; 2nd-order tets bring it within ~1% of beam theory…
| Parameter | Type | Description |
|---|---|---|
analysis * | string | |
body * | string | |
char_length | number | |
element_order | ||
min_length | ||
name | string | |
workspace | string | Run this call in this named workspace |
fem_run FEM Run
Run the CalculiX solver on an analysis. BLOCKS the MCP channel until the solve finishes (up to 600 s). Which to reach for: fem_run for small solves — a coarse mesh, linear static, a few thousand nodes — that finish in seconds, where a poll round-trip only adds latency. fem_run_submit for anything that may take a minute or more (fine or 2nd-order meshes, modal/buckling with many modes, nonlinear material or geometry), so the channel stays free while ccx runs. `workdir` defaults to `<TMPDIR>/ankusdrive_fem_<worker pid>`, which is removed when the worker exit…
| Parameter | Type | Description |
|---|---|---|
analysis * | string | |
workdir | ||
workspace | string | Run this call in this named workspace |
fem_run_submit FEM Run Submit
Run the CalculiX solver on an analysis OFF the MCP channel — the submit→poll form of fem_run, for solves long enough to stall the channel (see fem_run for which to use). The solver input is written before this returns, so a missing solver, material or mesh fails here, synchronously, exactly as fem_run would. ccx then runs in the background. Poll job_status: once ccx exits, the results are imported into the analysis on your NEXT poll (FreeCAD work runs on the worker's main thread, which a poll gives a turn) — so keep polling until status is 'done'; a job nobod…
| Parameter | Type | Description |
|---|---|---|
analysis * | string | |
workdir | ||
workspace | string | Run this call in this named workspace |
fem_results FEM Results
Extract summary results from an analysis. Pass `analysis`, or the `job_id` of a finished fem_run_submit solve (a running or failed job is an error that says so). Returns {max_vonmises_mpa, max_displacement_mm, max_displacement_vector, top_stress_nodes: [{node, vonmises_mpa, displacement_mm}, ...]}.
| Parameter | Type | Description |
|---|---|---|
analysis | ||
job_id | ||
top_n | integer | |
workspace | string | Run this call in this named workspace |
fem_result_probe FEM Result Probe
Probe FEM results at a specific location, instead of only the global max + top-N that `fem_results` returns. Answers "what is the stress at this point / on this face?" — the agent-friendly form for design iteration. Pick exactly one mode: * POINT: point=[x, y, z] (mm, model coordinates). Interpolates the field barycentrically inside the tet containing the point (method='interpolated'); if the point is outside the mesh it falls back to the nearest node and reports distance_mm (method='nearest_node'). * FACE: handle=<body handle> + face=<'f_*' t…
| Parameter | Type | Description |
|---|---|---|
analysis | ||
face | ||
field | string | |
handle | ||
job_id | ||
point | ||
workspace | string | Run this call in this named workspace |
fem_cantilever_demo FEM Cantilever Demo
Run the built-in cantilever FEM demo end-to-end (geometry → mesh → CalculiX). Dimensions in mm, force in N. Returns {nodes, tets, max_displacement_mm, max_vonmises_mpa, workdir}. A fresh document is created; existing state in the session is NOT overwritten but a new document becomes active.
| Parameter | Type | Description |
|---|---|---|
force | number | |
height | number | |
length | number | |
mesh_size | number | |
width | number | |
workdir | ||
workspace | string | Run this call in this named workspace |
material_get Material Get
Look up a material by name (e.g. 'AL6061-T6'). Returns the full property card as SI quantity strings (YoungsModulus, PoissonRatio, Density, yield_strength, fracture_toughness, thermal_conductivity, cte, rough_cost, refractive_index where applicable, source, basis). The structural keys are FEM-card-compatible, so the result feeds fem_set_material directly. On a miss returns {ok:false, reason} with a did_you_mean suggestion.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
workspace | string | Run this call in this named workspace |
material_select Material Select
Ashby-style selection: filter the corpus, then rank survivors. criteria keys are min_<accessor>/max_<accessor> (e.g. min_yield_mpa, max_density_g_cc, min_service_temp_c). rank_by: specific_strength | specific_stiffness | strength | stiffness | cost | density. Returns {rank_by, count, criteria, candidates:[{name, score, yield_mpa, density_g_cc, youngs_gpa, cost_usd_kg}, ...]} best-first; an empty filter returns no candidates rather than the closest miss.
| Parameter | Type | Description |
|---|---|---|
criteria | ||
rank_by | string | |
workspace | string | Run this call in this named workspace |
material_list Material List
List available materials, optionally filtered to one category ('aluminum' | 'steel' | 'titanium' | 'magnesium' | 'polymer' | 'glass'). Returns {count, category, materials:[{name, category}, ...]} sorted by name.
| Parameter | Type | Description |
|---|---|---|
category | ||
workspace | string | Run this call in this named workspace |
fluid_props Fluid Props
Thermophysical properties of a fluid at (T, P) from CoolProp's equation of state (issue #100). ``name`` is a fluid (e.g. 'water', 'air', 'R134a', 'CO2', 'nitrogen'), ``T_K`` absolute temperature [K], ``P_Pa`` pressure [Pa, default 1 atm). Returns {ok, density [kg/m³], viscosity [Pa·s], cp [J/kg·K], conductivity [W/m·K], prandtl, kinematic_viscosity [m²/s], fidelity, valid_range_ok, source, warnings, coolprop_available}. This is the DEFAULT fluid-property source behind the convection/CFD screens; explicit caller props still override. Degrades cleanly when the (o…
| Parameter | Type | Description |
|---|---|---|
T_K * | number | |
name * | string | |
P_Pa | number | |
workspace | string | Run this call in this named workspace |
bolted_joint_check Bolted Joint Check
Rate a bolted joint (VDI 2230-lite). Geometry from bolt_dia_mm (+pitch_mm) OR a standard thread named via bolt_size ("M8"/"M8x1.0") that pulls dia/pitch and the standards-table tensile stress area; proof strength from the ISO 898-1 property_class ("8.8") when given. Preload from torque via T=K*F*d (pass torque_nm OR preload_n). Returns {preload_n, tensile_stress_area_mm2, bolt_stress_mpa, preload_pct_proof, bolt_stress_with_load_mpa, separation_load_n, separation_margin, pass, governing}. `preload_target_pct` is the fraction of proof strength the preload is judged a…
| Parameter | Type | Description |
|---|---|---|
bolt_dia_mm | ||
bolt_size | ||
external_load_n | number | |
joint_stiffness_ratio | number | |
k_factor | number | |
material | string | |
pitch_mm | ||
preload_n | ||
preload_target_pct | number | |
proof_strength_mpa | ||
property_class | ||
torque_nm | ||
workspace | string | Run this call in this named workspace |
bearing_life Bearing Life
Basic rating life L10 (ISO 281): L10=(C/P)^p rev (p=3 ball, 10/3 roller), L10h=L10*1e6/(60n). Supply the dynamic rating C as dynamic_load_c_n, or pull it from the deep-groove ball catalog by designation (e.g. "6205" -> C=14.0 kN, also reporting bore/OD/width, C0 and static safety factor). Returns {l10_million_rev, l10_hours, load_ratio, dynamic_load_c_n, exponent, pass, ...} (pass vs target_hours when given).
| Parameter | Type | Description |
|---|---|---|
equivalent_load_p_n * | number | |
speed_rpm * | number | |
designation | ||
dynamic_load_c_n | ||
kind | string | |
target_hours | ||
workspace | string | Run this call in this named workspace |
spring_check Spring Check
Rate a helical compression spring (Wahl). rate k=G d^4/(8 D^3 Na); corrected shear tau=Kw 8FD/(pi d^3). Pass force_n OR deflection_mm. Returns {spring_index, wahl_factor, rate_n_mm, force_n, deflection_mm, shear_stress_mpa, slenderness, buckling_flag, allowable_shear_mpa, shear_sf, pass}. G and the allowable come from `material` unless overridden. `shear_modulus_mpa` sets G directly; `allowable_shear_mpa` replaces the 0.45·UTS estimate, which falls back to 700 MPa (spring steel) for a material carrying no UTS — pass it explicitly for anything else, since shear_s…
| Parameter | Type | Description |
|---|---|---|
active_coils * | number | |
coil_mean_dia_mm * | number | |
wire_dia_mm * | number | |
allowable_shear_mpa | ||
deflection_mm | ||
force_n | ||
free_length_mm | ||
material | string | |
shear_modulus_mpa | ||
workspace | string | Run this call in this named workspace |
gear_rating Gear Rating
Rate spur-gear tooth bending (Lewis): sigma=Ft/(b*m*Y). Pass tangential_force_n, or power_w + pinion_speed_rpm. Returns {tangential_force_n, pitch_dia_mm, pitch_line_velocity_m_s, lewis_form_factor, bending_stress_mpa, allowable_bending_mpa, bending_sf, pass}. First-order screen, not full AGMA. The allowable defaults to the material's fatigue endurance (else 0.3·UTS); `allowable_bending_mpa` overrides it with an AGMA/spec number.
| Parameter | Type | Description |
|---|---|---|
face_width_mm * | number | |
module_mm * | number | |
teeth * | integer | |
allowable_bending_mpa | ||
lewis_form_factor | ||
material | string | |
pinion_speed_rpm | ||
power_w | ||
tangential_force_n | ||
workspace | string | Run this call in this named workspace |
belt_drive Belt Drive
Rate a belt drive (Eytelwein/capstan). Wrap theta=pi-2asin((D-d)/2C), Fe=P/V, T1/T2=e^(mu*theta) (V-belt divides mu by sin(beta/2)). Returns {wrap_angle_deg, belt_speed_m_s, effective_force_n, tension_ratio, tight_side_n, slack_side_n, transmissible_power_w, pass}.
| Parameter | Type | Description |
|---|---|---|
center_distance_mm * | number | |
large_pulley_dia_mm * | number | |
power_w * | number | |
small_pulley_dia_mm * | number | |
small_pulley_rpm * | number | |
friction_coef | number | |
tight_side_limit_n | ||
vbelt_groove_deg | ||
workspace | string | Run this call in this named workspace |
press_fit_stress Press Fit Stress
Rate an interference (press/shrink) fit via Lamé. p=delta_r E (ro^2-rc^2)/ (2 rc ro^2); hub bore hoop=p(ro^2+rc^2)/(ro^2-rc^2); torque=2pi mu p rc^2 L. interference_mm is diametral. E comes from `material`'s Materials-DB card; `youngs_modulus_mpa` overrides it. Every output is LINEAR in E, so a material the corpus has no modulus for is an ERROR, not an assumption (#269) — the message names both exits. `pass` is THREE-state: the hub yield check needs the card's yield_mpa, and a card without one (Fused-Silica, Gold, Concrete, ...) leaves the check unperformed…
| Parameter | Type | Description |
|---|---|---|
engagement_length_mm * | number | |
hub_outer_dia_mm * | number | |
interference_mm * | number | |
shaft_dia_mm * | number | |
friction_coef | number | |
material | string | |
workspace | string | Run this call in this named workspace |
youngs_modulus_mpa |
seal_check Seal Check
Rate an O-ring gland (pairs with oring_groove): squeeze=W-depth, fill= (pi/4 W^2)/(width*depth). Squeeze must sit in the application band (static 15-30%, dynamic 10-20%), fill below max_gland_fill_pct. Returns {squeeze_mm, squeeze_pct, gland_fill_pct, squeeze_range_pct, within_squeeze, within_fill, pass}.
| Parameter | Type | Description |
|---|---|---|
cross_section_dia_mm * | number | |
groove_depth_mm * | number | |
groove_width_mm * | number | |
application | string | |
max_gland_fill_pct | number | |
workspace | string | Run this call in this named workspace |
chain_drive Chain Drive
Rate an ANSI roller-chain drive (ASME B29.1). Rated at the lower of the link-plate-fatigue (HP1=0.004*N1^1.08*n1^0.9*P^(3-0.07P), low speed) and roller-impact (HP2=1000*Kr*N1^1.5*P^0.8/n1^1.5, high speed) envelopes, P in inches. Give chain_pitch_mm (matching add_sprocket) OR a chain_number ("40","60",...) for pitch+Kr; strands scale by the B29.1 factor. Powers in W. Returns {rated_power_w, type1_power_w, type2_power_w, governing, strands, strand_factor, ..., power_sf?, pass}. `k_r` overrides the roller-impact constant the chain_number lookup supplies (29 for the 25-…
| Parameter | Type | Description |
|---|---|---|
speed_rpm * | number | |
teeth_small * | integer | |
chain_number | ||
chain_pitch_mm | ||
k_r | ||
power_w | ||
strands | integer | |
workspace | string | Run this call in this named workspace |
weld_group Weld Group
Rate a planar fillet-weld group by Blodgett's treat-weld-as-a-line method. segments=[((x1,y1),(x2,y2)),...] (mm); an in-plane force_n=[Fx,Fy] at load_point_mm=[px,py] gives direct shear f=F/L plus torsional f=T*r/J from the eccentric moment about the weld centroid, added vectorially at the worst end. required_leg = f_r/(0.707*allowable); given leg_mm, throat stress f_r/(0.707*leg) is checked vs allowable. Returns {weld_length_mm, centroid_mm, Ix_mm3, Iy_mm3, J_mm3, direct_shear_n_per_mm, max_shear_n_per_mm, worst_point_mm, required_leg_mm, throat_stress_mpa?, shear_…
| Parameter | Type | Description |
|---|---|---|
force_n * | array | |
load_point_mm * | array | |
segments * | array | |
allowable_shear_mpa | number | |
leg_mm | ||
weld_type | string | |
workspace | string | Run this call in this named workspace |
tolerance_stackup Tolerance Stackup
Stack a dimension chain. Each chain entry is {name, nominal, plus, minus} with plus/minus the signed upper/lower deviations (plus>=minus; symmetric shorthand {nominal, tol}); add direction:-1 for a subtractive/gap link. method: worstcase | rss | montecarlo (each adds a deeper block). Half-bands are read as 3-sigma; cpk/pct_in_spec use spec_min/spec_max if given, else the worst-case bounds. Returns {nominal, worstcase:{min,max,spread}, rss:{sigma,min_3s,max_3s}, montecarlo:{mean,std,cpk,pct_in_spec,spec}}. Instead of a hand-built chain, pass a live `handle` (+ `axis…
| Parameter | Type | Description |
|---|---|---|
axis | string | |
chain | ||
default_tol | ||
general | string | |
handle | ||
method | string | |
samples | integer | |
seed | ||
spec_max | ||
spec_min | ||
workspace | string | Run this call in this named workspace |
fit_check Fit Check
Classify a hole/shaft pair. hole and shaft are {nominal, plus, minus} (signed deviations) or {nominal, tol}. Returns {fit_class:'clearance'| 'transition'|'interference', min_clearance, max_clearance, nominal_clearance, prob_interference} (prob from a normal model with half-band = 3-sigma).
| Parameter | Type | Description |
|---|---|---|
hole * | object | |
shaft * | object | |
workspace | string | Run this call in this named workspace |
fit_class Fit Class
ISO 286 limits for a fit code (e.g. 'H7/g6'), in mm. v1 covers a hole-basis H with shaft clearance letters (h, g, f, e). Returns {basic_size, fit, hole:{upper_dev,lower_dev,min,max}, shaft:{...}, fit_class, min_clearance, max_clearance, prob_interference}. Errors on an out-of-table size (>500 mm) or an unsupported code (non-H hole or interference shaft letter).
| Parameter | Type | Description |
|---|---|---|
basic_size * | number | |
fit | string | |
workspace | string | Run this call in this named workspace |
gdt_check GD&T Check
Check a measured feature against a GD&T tolerance zone. control: position | flatness | straightness | circularity | cylindricity | perpendicularity | parallelism | angularity | concentricity | runout | total_runout | profile_line | profile_surface. actual is the measured deviation; for position pass offset={x,y} to use the diametral 2*hypot(x,y). mmc_bonus adds bonus tolerance. Returns {control, zone, effective_zone, actual, margin, pass, datum_refs}.
| Parameter | Type | Description |
|---|---|---|
control * | string | |
zone * | number | |
actual | ||
datum_refs | ||
mmc_bonus | number | |
offset | ||
workspace | string | Run this call in this named workspace |
fatigue_check Fatigue Check
Rate fatigue life (S-N Basquin + Goodman mean-stress correction). σ_a = stress_range/2; infinite-life SF = 1/(σ_a/σ_e + σ_m/σ_uts); finite life from an equivalent fully-reversed amplitude on a log-log S-N line. σ_e/σ_uts come from the material (or overrides). pass = survives `cycles` (σ_ar ≤ σ_e ⇒ infinite life); a tensile mean ≥ σ_uts fails outright. Returns {stress_amplitude_mpa, mean_stress_mpa, endurance_mpa, uts_mpa, equiv_reversed_mpa, safety_factor, life_cycles, required_cycles, pass, governing_mode, endurance_basis}. The S-N line runs fr…
| Parameter | Type | Description |
|---|---|---|
stress_range_mpa * | number | |
cycles | number | |
endurance_cycles | number | |
endurance_mpa | ||
material | string | |
mean_stress_mpa | number | |
s1000_fraction | number | |
uts_mpa | ||
workspace | string | Run this call in this named workspace |
fracture_check Fracture Check
Rate brittle fracture (LEFM): K = Y·σ·√(π·a) vs K_IC. a is crack length in mm; Y (geometry_factor) defaults 1.12 (edge crack), 1.0 for a centre crack. K_IC from the material (or override). Critical crack a_c = (K_IC/(Y·σ))²/π. Returns {k_applied_mpa_sqrt_m, k_ic_mpa_sqrt_m, geometry_factor, safety_factor, margin, critical_crack_mm, pass}; a crack past a_c gives SF<1 and margin<0.
| Parameter | Type | Description |
|---|---|---|
crack_len_mm * | number | |
stress_mpa * | number | |
fracture_toughness_mpa_sqrt_m | ||
geometry_factor | number | |
material | string | |
workspace | string | Run this call in this named workspace |
wear_estimate Wear Estimate
Estimate sliding wear (Archard): V = k·F·s/H. k (wear_coef) is empirical — pass it, or it's looked up by the material_pair's category pair (order-of- magnitude). H (hardness_mpa) defaults to Tabor 3·σ_y of the softer member. With apparent_area_mm2 a mean depth is reported and gated by max_depth_mm. Returns {wear_coef, hardness_mpa, volume_loss_mm3, depth_loss_mm, coef_basis, hardness_basis, pass}.
| Parameter | Type | Description |
|---|---|---|
load_n * | number | |
sliding_dist_m * | number | |
apparent_area_mm2 | ||
hardness_mpa | ||
material_pair | ||
max_depth_mm | ||
wear_coef | ||
workspace | string | Run this call in this named workspace |
creep_flag Creep Risk Flag
Screen for creep risk: compare operating temperature to the material's max service temperature (Materials DB, or an override). A screen, not a Larson-Miller life model. pass = below the service limit. Returns {operating_temp_c, service_temp_c, margin_c, stress_mpa, creep_risk, pass, reason}.
| Parameter | Type | Description |
|---|---|---|
stress_mpa * | number | |
temp_c * | number | |
material | string | |
max_service_temp_c | ||
workspace | string | Run this call in this named workspace |
h_estimate Heat Transfer Coefficient Estimate
Screening convection coefficient h (NO solver) — the honest h_conv to feed thermal_lumped / thermal_transient_1d / a convection BC, instead of a guess. `geometry` picks the correlation: natural (velocity_m_s = 0) 'vertical_plate' | 'horizontal_cylinder' (Churchill–Chu); forced (velocity_m_s > 0) 'flat_plate' (averaged laminar/mixed Nu) | 'cylinder_crossflow' (Hilpert). `characteristic_mm` is the plate height/length or cylinder diameter. Film-temp air properties built in; another `fluid` needs explicit k_w_mk + nu_m2_s + pr (+ beta_per_k for natural). emissivity…
| Parameter | Type | Description |
|---|---|---|
characteristic_mm * | number | |
geometry * | string | |
t_surface_c * | number | |
beta_per_k | ||
emissivity | number | |
fluid | string | |
k_w_mk | ||
nu_m2_s | ||
pr | ||
t_ambient_c | number | |
velocity_m_s | number | |
workspace | string | Run this call in this named workspace |
acoustic_screen Acoustic Screen
Closed-form acoustics screen (NO solver). `kind`: 'cavity_modes' (lx/ly/lz_mm -> the lowest n_modes rigid-cavity eigenfrequencies f=(c/2)·√(Σ(n/L)²) with [nx,ny,nz] indices — exact, and the future oracle for the planned Elmer HelmholtzSolve FEM) | 'helmholtz' (neck_area_mm2 + neck_length_mm + cavity_volume_mm3 -> resonance with flanged end correction — ±10 %) | 'mass_law' (frequency_hz + surface_density_kg_m2 -> limp-wall TL = 20·log₁₀(f·m″)−47 dB — ±3 dB) | 'duct_cutoff' (duct_width_mm or duct_diameter_mm -> first cross-mode; plane waves only…
| Parameter | Type | Description |
|---|---|---|
kind * | string | |
c_m_s | ||
cavity_volume_mm3 | ||
duct_diameter_mm | ||
duct_width_mm | ||
frequency_hz | ||
lx_mm | ||
ly_mm | ||
lz_mm | ||
n_modes | integer | |
neck_area_mm2 | ||
neck_length_mm | ||
surface_density_kg_m2 | ||
t_ambient_c | number | |
workspace | string | Run this call in this named workspace |
plate_check Plate Check
Handbook bending of a uniformly loaded flat plate (NO solver) — the "do I need FEM at all?" screen. `shape`: 'rectangular' (a_mm × b_mm, short side drives; Roark/Timoshenko ν=0.3 coefficients σ=β·q·b²/t², δ=α·q·b⁴/(E·t³), interpolated in a/b) | 'circular' (diameter_mm; exact closed forms). `support`: 'simply_supported' | 'clamped' (all edges). E from youngs_gpa or a Materials-DB `material` (which also supplies yield for yield_safety_factor). Exact within thin-plate theory, and the limits are returned as flags (thin_plate_ok: span/t ≥ 10; small_de…
| Parameter | Type | Description |
|---|---|---|
pressure_kpa * | number | |
shape * | string | |
thickness_mm * | number | |
a_mm | ||
b_mm | ||
diameter_mm | ||
material | ||
poisson | number | |
support | string | |
workspace | string | Run this call in this named workspace |
youngs_gpa |
beam_buckling Beam Buckling
Exact column-buckling screen (Euler + Johnson, NO solver) — the closed-form twin the CalculiX `fem_buckling` eigen-solve is gated against (as `beam_modal` is to `fem_modal`). Section: width_mm+height_mm (solid rectangle, weak axis automatic), diameter_mm (round), or explicit area_mm2+i_min_mm4. E/σ_y from youngs_gpa/yield_mpa or a Materials-DB `material`. `end_condition`: 'pinned_pinned' | 'fixed_free' | 'fixed_pinned' | 'fixed_fixed' (theoretical K). Euler σ_cr=π²E/λ² above the transition slenderness √(2π²E/σ_y), Johnson parabola below (both exactly σ…
| Parameter | Type | Description |
|---|---|---|
length_mm * | number | |
area_mm2 | ||
diameter_mm | ||
end_condition | string | |
height_mm | ||
i_min_mm4 | ||
load_n | ||
material | ||
width_mm | ||
workspace | string | Run this call in this named workspace |
yield_mpa | ||
youngs_gpa |
plastic_collapse Plastic Collapse
Exact plastic-hinge collapse of a solid rectangular beam (NO solver) — the closed-form twin the perfectly-plastic CalculiX solve (`fem_set_nonlinear_material`) is gated against. The beam bends about the `width_mm` axis (depth = `height_mm`). σ_y from `yield_mpa` or a Materials-DB `material`. Elastic modulus S = b·h²/6, plastic modulus Z = b·h²/4, shape factor Z/S = 1.5; yield moment M_y = σ_y·S, fully-plastic moment M_p = σ_y·Z. `support` maps the collapse moment to a point load: 'cantilever' (M = P·L) or 'simply_supported' (central, M = P·L/4). With `l…
| Parameter | Type | Description |
|---|---|---|
height_mm * | number | |
length_mm * | number | |
width_mm * | number | |
load_n | ||
material | ||
support | string | |
workspace | string | Run this call in this named workspace |
yield_mpa |
elastica_deflection Elastica Deflection
Exact large-deflection cantilever tip — Bisshopp–Drucker elastica (NO solver) — the closed-form twin the *NLGEOM CalculiX solve is gated against. Section: width_mm+height_mm (solid rectangle, I = b·h³/12, load transverse to height_mm) or explicit i_mm4. E from youngs_gpa or a Materials-DB `material`. Load parameter α = P·L²/(E·I); the tip slope solves the elliptic-integral elastica. Linear theory δ/L = α/3 over-predicts the transverse tip and ignores the axial draw-in — the elastica captures both, and `nonlinear_over_linear` is the divergence the sol…
| Parameter | Type | Description |
|---|---|---|
length_mm * | number | |
load_n * | number | |
height_mm | ||
i_mm4 | ||
material | ||
width_mm | ||
workspace | string | Run this call in this named workspace |
youngs_gpa |
hertz_contact Hertz Contact
Exact Hertzian point-contact peak pressure (NO solver) — the screening twin of a frictional *CONTACT PAIR solve. Sphere of `radius_mm` on a flat (default) or on a second sphere `radius2_mm` (negative for a conforming socket). Each body's elastics from youngs#_gpa+poisson# or a Materials-DB `material#`; body 2 defaults to body 1. Reduced modulus 1/E* = (1−ν₁²)/E₁ + (1−ν₂²)/E₂, effective radius 1/R = 1/R₁ + 1/R₂; contact radius a = (3FR/4E*)^(1/3), peak pressure p₀ = 3F/(2πa²) = 1.5× mean, approach δ = a²/R. Half-space theory: valid while…
| Parameter | Type | Description |
|---|---|---|
load_n * | number | |
radius_mm * | number | |
material1 | ||
material2 | ||
poisson1 | ||
poisson2 | ||
radius2_mm | ||
workspace | string | Run this call in this named workspace |
youngs1_gpa | ||
youngs2_gpa |
laminate_properties Laminate Properties
Effective stiffness, thermal warp, and first-ply failure of a bonded multi-layer composite stack (NO solver) — the closed-form screening twin a layered multi-material CalculiX `fem_run` static solve is gated against (e.g. 1 metal layer + 1 plastic layer, or any `[(material, thickness), …]`). `layers` is the stack bottom→top; each entry is a mapping with a `thickness` (mm) and either a corpus `material` name or explicit `E`/`youngs_mpa`/ `youngs_gpa` (+ optional `nu`/`poisson`, `yield_mpa`, `cte`/`cte_per_k`, `density_kg_m3`, `thermal_conductivity_w_mk`); expl…
| Parameter | Type | Description |
|---|---|---|
layers * | array | |
delta_T | ||
force_n | ||
moment_nmm | ||
width_mm | number | |
workspace | string | Run this call in this named workspace |
monopole_sphere Monopole Sphere
Exact pulsating (monopole) sphere radiated power + far-field pressure (NO solver) — the closed-form twin the Bempp exterior-acoustics BEM radiation solve (`acoustic_radiation_submit`) is gated against. A sphere of radius `a_m` vibrating with uniform surface normal velocity `u_amp` at `freq_hz` radiates W = (ρc/2)|U|²(4πa²)(ka)²/(1+(ka)²) and, at range `r_m`, |p(r)| = ρc|U|·ka/√(1+(ka)²)·(a/r) — both EXACT. The radiation efficiency σ=(ka)²/(1+(ka)²) → 0 (poor sub-wavelength radiator) as ka→0 and → 1 as ka→∞. `rho`/`c` default to air at 20…
| Parameter | Type | Description |
|---|---|---|
a_m * | number | |
freq_hz * | number | |
c | number | |
r_m | ||
rho | number | |
u_amp | number | |
workspace | string | Run this call in this named workspace |
rigid_sphere_scattering Rigid Sphere Scattering
Exact rigid-sphere plane-wave scattering far-field form function via the Mie series (NO solver) — the closed-form twin the Bempp exterior-acoustics BEM scattering solve (`acoustic_radiation_submit`, problem='scattering') is gated against. For compactness `ka` and scattering angle `theta_deg` (from the forward direction; 180° is backscatter), f∞(θ) = (2/ika)·Σₙ(2n+1)[−j'ₙ(ka)/h'ₙ(ka)]· Pₙ(cosθ) — a rigorous spherical-harmonic sum (Neumann ∂p/∂r=0 on the sphere) truncated past convergence (fidelity='exact'). The backscatter |f∞(π)| → 1 in…
| Parameter | Type | Description |
|---|---|---|
ka * | number | |
a_m | ||
theta_deg | number | |
workspace | string | Run this call in this named workspace |
acoustic_radiation_submit Acoustic Radiation Submit
Exterior-acoustics boundary-element solve on Bempp, asynchronous (OFF the MCP channel) — the real-field twin of the analytic `monopole_sphere` / `rigid_sphere_scattering` oracles. Bempp is MIT but needs meshio>=4 (clashing with solidspy's meshio==3 in the shared venv), so it is run ONLY out-of-process via ankusdrive/bempp_runner.py under a dedicated .venv-bempp; degrades to {ok:false, reason, install} when no bempp venv resolves. `problem`='radiation' (default): a pulsating (monopole) sphere of radius `a_m`, uniform surface velocity `u_amp` at `freq_hz`, into air…
| Parameter | Type | Description |
|---|---|---|
a_m | number | |
c | number | |
freq_hz | number | |
h | number | |
h_per_wl | number | |
ka_list | ||
linear_deflection | number | |
model | ||
problem | string | |
r_m | ||
rho | number | |
scale_to_m | number | |
theta_deg | ||
timeout | integer | |
u_amp | number | |
workspace | string | Run this call in this named workspace |
waveguide_cutoff Waveguide Cutoff
Exact rectangular-waveguide cutoff frequency (NO solver) — the closed-form twin the openEMS FDTD full-wave solve (`em_fullwave_submit`) is gated against. Broad wall `a_mm`, narrow wall `b_mm` (default a/2, WR convention). `mode` is 'TE<m><n>'/'TM<m><n>'. f_c(m,n) = (c/2√εᵣ)·√((m/a)²+(n/b)²); dominant TE10 reduces to the EXACT f_c = c/(2a√εᵣ). Below f_c the guide is evanescent (axial β imaginary, nothing transmits), above it propagates with guided wavelength λ_g = 2π/β. With a probe `freq_ghz` the regime (propagating / evanescent), k, β, λ_g an…
| Parameter | Type | Description |
|---|---|---|
a_mm * | number | |
b_mm | ||
eps_r | number | |
freq_ghz | ||
mode | string | |
workspace | string | Run this call in this named workspace |
dipole_resonance Dipole Resonance
Thin centre-fed half-wave dipole first resonance (NO solver, banded) — the closed-form twin the openEMS FDTD S11 antenna sweep (`em_fullwave_submit`) is gated against. Give EXACTLY ONE of `length_mm` (→ resonant frequency) or `freq_ghz` (→ resonant length). End-effect shortening k = `shortening` makes the resonant length a little under λ/2: L = k·λ, f_r = k·c/L (k≈0.48 textbook; ≈0.475 typical wire). Because k tracks the length/diameter ratio this is a ±band correlation (fidelity='banded', ~±3% over k∈[0.46,0.49]); an FDTD S11 sweep must put its fi…
| Parameter | Type | Description |
|---|---|---|
freq_ghz | ||
length_mm | ||
shortening | number | |
workspace | string | Run this call in this named workspace |
em_fullwave_submit EM Fullwave Submit
Full-wave FDTD EM solve on openEMS, asynchronous (OFF the MCP channel) — the real-field twin of the analytic `waveguide_cutoff` / `dipole_resonance` oracles. openEMS is GPL-3.0 and is run ONLY out-of-process via ankusdrive/em_fullwave_gpl_runner.py; degrades to {ok:false, reason, install} when no openEMS venv resolves. `problem`='waveguide_sweep' (default): hollow rectangular guide, broad wall `a_mm`/narrow wall `b_mm` (default a/2), length `length_mm` (default 120), TE10 port at each end. Sweep `f_start_ghz`..`f_stop_ghz` (default 4..10 GHz — straddling th…
| Parameter | Type | Description |
|---|---|---|
a_mm | number | |
b_mm | ||
cells_per_wl | ||
decay_f_ratio | ||
end_criteria | ||
eps_r | number | |
f_start_ghz | ||
f_stop_ghz | ||
gap_mm | ||
length_mm | ||
mesh_f_ghz | ||
mesh_res_mm | ||
n_freq | ||
nrts | ||
problem | string | |
radius_mm | ||
timeout | integer | |
workspace | string | Run this call in this named workspace |
fsi_plate_deflection FSI Plate Deflection
Exact small-deflection tip/centre deflection of a uniform-pressure-loaded thin plate strip (NO solver) — the closed-form twin the coupled OpenFOAM→CalculiX FSI solve (`fsi_pressure_plate_submit`) is gated against. The wetted strip is `width_mm`×`length_mm`; the fluid pressure `pressure_pa` (Pa) acts normal to it, giving the line load q = pressure·width. Section is the solid rectangle I = width·thickness³/12 unless an explicit `i_mm4` is given. E from `youngs_gpa` or a Materials-DB `material`. `support`='cantilever' (clamped one edge): δ_tip = q·L⁴/(8·EÂ…
| Parameter | Type | Description |
|---|---|---|
length_mm * | number | |
pressure_pa * | number | |
thickness_mm * | number | |
width_mm * | number | |
i_mm4 | ||
material | ||
support | string | |
workspace | string | Run this call in this named workspace |
youngs_gpa |
fsi_interface_balance FSI Interface Balance
Partitioned wet-interface force balance (NO solver) — the FSI analogue of the optics energy-balance gate. The fluid presses a uniform `pressure_pa` over the `length_mm`×`width_mm` strip, so the total traction is F = pressure·area; a converged partitioned solve must hand the solid exactly this load and the solid's support reactions must carry it (Newton's third law across the coupling surface). Pass the measured `fluid_force_n` (∮p·dA over the OpenFOAM wet patch) and/or `solid_reaction_n` (Σ ccx reaction at the clamp); the relative residual |F_fluid − R_sol…
| Parameter | Type | Description |
|---|---|---|
length_mm * | number | |
pressure_pa * | number | |
width_mm * | number | |
fluid_force_n | ||
solid_reaction_n | ||
workspace | string | Run this call in this named workspace |
fsi_channel_pressure FSI Channel Pressure
Fully-developed plane-channel pressure drop Δp = 12·μ·U·L/h² (NO solver) — the *fluid* load that physically sources the pressure-loaded-plate FSI anchor. For laminar flow between parallel plates a gap `gap_mm` apart with mean velocity `velocity_m_s` over length `length_mm`, the exact plane-Poiseuille wall pressure drop feeds `fsi_plate_deflection`/`fsi_interface_balance` as `pressure_pa`. The Reynolds number Re = ρ·U·h/μ flags when the laminar (exact) assumption holds (Re ≲ 1400). Default fluid is water at 20 °C (μ=1e-3 Pa·s, ρ=1000). Returns {pre…
| Parameter | Type | Description |
|---|---|---|
gap_mm * | number | |
length_mm * | number | |
velocity_m_s * | number | |
mu_pa_s | number | |
rho_kg_m3 | number | |
workspace | string | Run this call in this named workspace |
fsi_pressure_plate_submit FSI Pressure Plate Submit
Partitioned fluid-structure-interaction solve on the preCICE OpenFOAM↔ CalculiX stack, asynchronous (OFF the MCP channel) — the real coupled-field twin of the analytic `fsi_plate_deflection` / `fsi_interface_balance` oracles. A flexible flap clamped at a channel floor deflects under the flow: OpenFOAM (pimpleFoam) writes the wet-interface Force, ccx_preCICE returns the Displacement, and preCICE drives the implicit coupling to convergence each time window. preCICE is LGPL-3.0 and the two heavy solvers run ONLY as subprocesses; degrades to {ok:false, reason, insta…
| Parameter | Type | Description |
|---|---|---|
density_kg_m3 | number | |
end_time_s | number | |
inlet_velocity_m_s | number | |
max_iterations | integer | |
nu_m2_s | number | |
poisson | number | |
rho_kg_m3 | number | |
time_window_s | number | |
timeout | integer | |
workspace | string | Run this call in this named workspace |
youngs_pa | number |
molding_screen Molding Screen
Injection-molding screen (NO solver): one-term cooling time (exact given α, t_cool = s²/(π²α)·ln(8·(T_melt−T_mold)/(π²·(T_eject−T_mold))) — the t ∝ s² design lever) + the spiral-flow fill check (fill_ok when flow_length ≤ (L/t-limit)·wall — chart correlation, ±30 %). `material` picks per-polymer defaults (ABS | PP | PC | PA66 | POM | HDPE | PS), each individually overridable; with all temps + alpha_mm2_s explicit no material is needed. A cooling-only call returns fidelity='exact'; adding flow_length_mm makes the headline answer fidelity='cor…
| Parameter | Type | Description |
|---|---|---|
wall_thickness_mm * | number | |
alpha_mm2_s | ||
flow_length_mm | ||
flow_ratio_limit | ||
material | ||
t_eject_c | ||
t_melt_c | ||
t_mold_c | ||
workspace | string | Run this call in this named workspace |
moldability_screen Moldability Screen
Moldability DFx screen (NO solver, NO geometry) — fast analytic gate combining two checks molders reason about first: (1) WALL-THICKNESS QUALITY — is the nominal wall in the resin's recommended moldable band, and is the section uniform enough (uniformity_ratio = t_max/t_min; warn >2, fail >3) to avoid sink/warp; thick-lobe samples (> sink_factor·nominal, k≈1.5) flagged; cooling tied to the thickest wall (t ∝ s²). (2) SHRINKAGE — first-order from the resin CTE: S_linear = alpha·ΔT, S_vol ≈ 3·S_linear, cavity_scale_factor = 1/(1−S_linear); semicryst…
| Parameter | Type | Description |
|---|---|---|
alpha_per_k | ||
fail_ratio | number | |
material | ||
nominal_mm | ||
sink_factor | number | |
t_ambient_c | number | |
t_solidify_c | ||
wall_samples | ||
warn_ratio | number | |
workspace | string | Run this call in this named workspace |
drop_impact Drop Impact
Drop/impact screen by exact energy balance (NO solver). Give crush_distance_mm (available cushion/crumple stroke) -> deceleration, OR deceleration_limit_g (fragility spec) -> required stroke — exactly one. G_avg = h/d exactly (mass cancels); g_peak = pulse_factor·G_avg with `pulse` bounding the shape: 'constant' (ideal crush, 1×) | 'linear_spring' (elastic, 2×) | 'half_sine' (π/2×). v = √(2gh). mass_g only adds peak_force_n and energy_j. fidelity='exact'; where the part is stressed, or what an edge/corner strike changes, is escalate_to='impact_dynamics_subm…
| Parameter | Type | Description |
|---|---|---|
drop_height_mm * | number | |
crush_distance_mm | ||
deceleration_limit_g | ||
mass_g | ||
pulse | string | |
workspace | string | Run this call in this named workspace |
bar_impact Bar Impact
St-Venant bar impact, exact (NO solver): a uniform bar striking a rigid wall end-on. Face stress σ = ρ·c₀·v₀ with c₀ = √(E/ρ) — mass, area and length cancel, so only a slower strike or a softer/lighter material lowers it; contact lasts 2L/c₀ and the bar leaves stress-free at the strike speed (restitution 1). Past the yield velocity v_y = σ_y/(ρ·c₀) the face yields and a bilinear material (`tangent_mpa`) caps at σ_y + ρ·c_p·(v₀ − v_y), c_p = √(E_t/ρ). E and ρ from `youngs_gpa`/`density_kg_m3` or a Materials-DB `material` (which also supp…
| Parameter | Type | Description |
|---|---|---|
length_mm * | number | |
velocity_m_s * | number | |
area_mm2 | ||
density_kg_m3 | ||
material | ||
tangent_mpa | ||
workspace | string | Run this call in this named workspace |
yield_mpa | ||
youngs_gpa |
impact_dynamics_submit Impact Dynamics Submit
Transient DROP / IMPACT dynamics — the solve `drop_impact` escalates to. Meshes `body`, flies it at `velocity_m_s` (or the free-fall speed of `drop_height_mm` — exactly one) along `direction` into a fixed rigid floor through penalty contact, and integrates the motion with CalculiX `*DYNAMIC`. Async: returns a job — poll job_result. Degrades to {ok:false, reason, install} when ccx is absent. `direction` is the way the part TRAVELS: '-z' (default), '+x', … or any 3-vector — [-1,-1,-1] is a corner drop (the floor turns, the part is not re-meshed). Material f…
| Parameter | Type | Description |
|---|---|---|
body * | string | |
char_length_mm | ||
contact | string | |
contact_stiffness_mpa_mm | ||
deceleration_limit_g | ||
density_kg_m3 | ||
direction | ||
drop_height_mm | ||
duration_s | ||
gap_mm | ||
gravity | boolean | |
material | ||
max_time_step_s | ||
method | string | |
plastic | boolean | |
poisson | ||
samples | ||
tangent_mpa | ||
time_step_s | ||
velocity_m_s | ||
workspace | string | Run this call in this named workspace |
yield_mpa | ||
youngs_mpa |
thermal_lumped Thermal Lumped
Lumped first-order transient warm-up (no mesh). ΔT_ss = P/(h·A), τ = m·c_p/(h·A), T(t) = T_amb + ΔT_ss·(1−e^(−t/τ)). c_p is an explicit value/quantity-string ('900 J/kg/K') or read from `material`. Get h_conv from the `h_estimate` correlation screen rather than guessing. With duration_s the temperature + fraction-of-steady reached are returned. A radiation screen flags when the steady-state radiative HTC exceeds h_conv. Returns {t_ambient_c, delta_t_steady_k, t_steady_c, time_constant_s, t_final_c, reached_steady_pct, h_rad_w_m2k, radiation_significant}.
| Parameter | Type | Description |
|---|---|---|
area_mm2 * | number | |
h_conv * | number | |
mass_g * | number | |
power_w * | number | |
c_p | ||
duration_s | ||
emissivity | number | |
material | ||
t_ambient_c | number | |
workspace | string | Run this call in this named workspace |
thermal_transient_1d Thermal Transient 1D
Analytic 1-D plane-wall transient conduction (one-term Heisler series), valid for Fourier ≳ 0.2 — the closed-form transient the Elmer thermal_transient solve is gated against, and the *distributed* (spatial-gradient) answer the lumped screen only approximates. A wall of half-thickness L cools/heats toward ambient by surface convection: Bi = h·L/k, Fo = α·t/L², α = k/(ρ·cₚ). Pass `alpha_m2_s`, or k+rho+cp, or a `material` (Materials DB: thermal_conductivity/Density/specific_heat); get h_conv from the `h_estimate` correlation screen rather than guessing.…
| Parameter | Type | Description |
|---|---|---|
duration_s * | number | |
h_conv * | number | |
half_thickness_mm * | number | |
alpha_m2_s | ||
cp | ||
k | ||
material | ||
rho | ||
t_ambient_c | number | |
t_initial_c | number | |
workspace | string | Run this call in this named workspace |
thermal_transient_submit Thermal Transient Submit
Transient thermal FEM via Elmer, asynchronous. Requires ElmerSolver (apt `elmerfem-csc` / conda); when absent this returns {ok:false, reason, install} rather than raising. Three modes: - **Build the analytic-slab case** (no solver case prep needed): pass the plane-wall transient — `half_thickness_mm`, `h_conv` (W/m²K), `duration_s`, and either `k`+`rho`+`cp` (SI) or a `material` name, with optional `t_initial_c` / `t_ambient_c` and mesh/step counts `n_elements` / `n_steps`. The handler writes the 1-D conduction case (symmetry at the centre, convection at…
| Parameter | Type | Description |
|---|---|---|
body | ||
case_dir | ||
char_length_mm | ||
convection_faces | ||
cp | ||
duration_s | ||
element_order | ||
h_conv | ||
half_thickness_mm | ||
k | ||
material | ||
n_elements | integer | |
n_steps | integer | |
rho | ||
sif | string | |
t_ambient_c | number | |
t_initial_c | number | |
workspace | string | Run this call in this named workspace |
thermal_radiation_submit Thermal Radiation Submit
Diffuse-gray radiation FEM via Elmer, asynchronous — the radiation sibling of thermal_transient_submit. Requires ElmerSolver + the ViewFactors binary (apt `elmerfem-csc` / conda); when absent this returns {ok:false, reason, install} rather than raising. Two modes: - **Build the two-plate enclosure case** (no case prep): pass `t1_c`, `t2_c` (°C) and the two surface emissivities `emissivity_1`/`emissivity_2` (default 0.8). The handler writes a 2-D pair of parallel plates radiating across an unmeshed vacuum gap, runs ViewFactors then ElmerSolver, and extracts…
| Parameter | Type | Description |
|---|---|---|
case_dir | ||
emissivity_1 | number | |
emissivity_2 | number | |
gap_m | number | |
k_plate | number | |
n_x | integer | |
plate_thickness_m | number | |
sif | string | |
t1_c | ||
t2_c | ||
width_m | number | |
workspace | string | Run this call in this named workspace |
thermal_composite_wall Thermal Composite Wall
Exact series thermal-resistance network of a plane composite wall (NO solver) — the classic overall-U calculation and the conjugate-heat-transfer family's closed-form oracle. `layers` is the in→out list of solid layers, each {thickness_mm, k | material} (k in W/m·K, or a Materials-DB name); `h_in`/`h_out` are optional convection film coefficients (W/m²K). Per unit area R = 1/h_in + Σ tᵢ/kᵢ + 1/h_out, U = 1/R, q = U·(t_in − t_out), and every surface/interface temperature follows exactly. Returns {u_w_m2k, r_total_m2k_w, q_w_m2, q_w, layer_resistances_m…
| Parameter | Type | Description |
|---|---|---|
layers * | array | |
t_in_c * | number | |
t_out_c * | number | |
area_m2 | number | |
h_in | ||
h_out | ||
workspace | string | Run this call in this named workspace |
cht_channel_submit CHT Channel Submit
Conjugate heat transfer via Elmer (P3 M6 frontier), asynchronous — ONE solve spanning a plug-flow fluid channel AND a conducting solid wall coupled at their shared interface. Requires ElmerSolver; when absent this returns {ok:false, reason, install} rather than raising. Builds the two-body channel (constant outer `flux_w_m2`, inlet Dirichlet `t_in_c`, all else adiabatic) whose gates are exact WITHOUT a Nusselt correlation: the outlet bulk temperature follows the energy balance q″·L = ṁ·c_p·ΔT and the solid-layer drop is q″·t/k. Defaults are the liv…
| Parameter | Type | Description |
|---|---|---|
case_dir | ||
cp_fluid | number | |
fluid_height_m | number | |
flux_w_m2 | number | |
k_fluid | number | |
k_solid | number | |
length_m | number | |
nx | integer | |
ny_fluid | integer | |
ny_solid | integer | |
rho_fluid | number | |
sif | string | |
solid_thickness_m | number | |
t_in_c | number | |
velocity_m_s | number | |
workspace | string | Run this call in this named workspace |
cht_graetz_submit CHT Graetz Submit
Flow-coupled Graetz channel via Elmer (SIMULATION_NEXT B4), asynchronous — the TRUE Nusselt validation that upgrades cht_channel_submit's plug flow: FlowSolve computes the real laminar profile and HeatSolver rides on it (Convection = Computed) between two isothermal walls. Requires ElmerSolver; when absent this returns {ok:false, reason, install} rather than raising. Two gates: the solved parabola's u_max/u_mean ≡ 3/2 exactly, and the developed mixing-cup decay d ln(T_wall−T_bulk)/dx fitted over the second half of the channel yields Nu, gated against the Grae…
| Parameter | Type | Description |
|---|---|---|
case_dir | ||
cp_fluid | number | |
gap_m | number | |
k_fluid | number | |
length_m | number | |
mu_fluid | number | |
nx | integer | |
ny | integer | |
rho_fluid | number | |
sif | string | |
t_in_c | number | |
t_wall_c | number | |
velocity_m_s | number | |
workspace | string | Run this call in this named workspace |
acoustic_fem_submit Acoustic FEM Submit
Acoustic FEM via Elmer HelmholtzSolve (SIMULATION_NEXT Tier B1), asynchronous — the higher-order twin of `acoustic_screen`, gated against its exact closed forms. Requires ElmerSolver; when absent this returns {ok:false, reason, install} rather than raising. kind='duct': a closed duct driven p=1 at x=0, rigid at x=L, at f = kL·c/(2πL) (keep `kl` off the quarter-wave resonances) — the rigid-end pressure has the exact oracle 1/cos(kL), so `p_end_ratio` ≈ 1 machine-tight. kind='cavity': a rigid lx_m × ly_m cavity excited by a corner Wave Flux source, swept ±s…
| Parameter | Type | Description |
|---|---|---|
c_m_s | number | |
case_dir | ||
kind | string | |
kl | number | |
length_m | number | |
lx_m | number | |
ly_m | number | |
mode_nx | integer | |
mode_ny | integer | |
n_elements | integer | |
n_steps | integer | |
nx | integer | |
ny | integer | |
sif | string | |
span_pct | number | |
workspace | string | Run this call in this named workspace |
harmonic_response Harmonic Response
Exact SDOF harmonic frequency response (NO solver) — the FRF screen and the oracle the Elmer `harmonic_response_submit` sweep is gated against. Bridges `beam_modal` (f_n) and `random_vibration` (Q = 1/(2ζ)): with r = f/f_n, |H| = 1/√((1−r²)²+(2ζr)²), phase = atan2(2ζr, 1−r²), peak amplification Q = 1/(2ζ√(1−ζ²)) at f_peak = f_n·√(1−2ζ²), half-power bandwidth ≈ 2ζ·f_n. With `frequency_hz` the response at that drive is returned; `static_deflection_mm` scales it to an absolute amplitude_mm. fidelity='exact'; ζ ≥ 1/√2 has no peak (f…
| Parameter | Type | Description |
|---|---|---|
damping_ratio * | number | |
natural_frequency_hz * | number | |
frequency_hz | ||
static_deflection_mm | ||
workspace | string | Run this call in this named workspace |
harmonic_response_submit Harmonic Response Submit
Harmonic forced response (FRF) via Elmer StressSolve Harmonic Analysis (SIMULATION_NEXT Tier B2), asynchronous — a plane-stress cantilever driven by a harmonic tip traction, swept one quasi-static point + n_sweep points across ±span_pct% of its first resonance, with Rayleigh β tuned to `damping_ratio` at f₁. Requires ElmerSolver; when absent this returns {ok:false, reason, install} rather than raising. Three gates from the in-phase (real) response: `f1_ratio` — Re(H) = 0 exactly AT resonance, so the swept tip response's sign-flip locates f₁ vs the Eul…
| Parameter | Type | Description |
|---|---|---|
case_dir | ||
damping_ratio | number | |
density_kg_m3 | number | |
height_m | number | |
length_m | number | |
n_sweep | integer | |
nx | integer | |
ny | integer | |
poisson | number | |
sif | string | |
span_pct | number | |
traction_pa | number | |
workspace | string | Run this call in this named workspace |
youngs_pa | number |
em_skin_depth EM Skin Depth
Exact AC skin depth (NO solver) — δ = √(2/(ω·μ₀·μ_r·σ)) plus the per-square surface resistance R_s = 1/(σ·δ); fields/current decay e^(−x/δ) into the conductor (~95% of induction heating deposits within 1.5·δ). σ from an explicit `conductivity_s_m` or a `conductor` name (copper, aluminum, silver, gold, brass, steel-mild, stainless-304). Returns {skin_depth_m, skin_depth_mm, surface_resistance_ohm, angular_frequency_rad_s, conductivity_s_m, mu_r}.
| Parameter | Type | Description |
|---|---|---|
frequency_hz * | number | |
conductivity_s_m | ||
conductor | ||
mu_r | number | |
workspace | string | Run this call in this named workspace |
em_dc_resistance EM DC Resistance
Exact DC resistance of a uniform conductor (NO solver) — R = L/(σ·A), the closed-form anchor the Elmer em_conduction_submit gate reproduces to machine precision. With `voltage_v` the Ohm/Joule pair is included (I = V/R, P = V·I). σ from `conductivity_s_m` or a `conductor` name. Returns {resistance_ohm, conductivity_s_m, length_m, area_m2, current_a?, joule_w?}.
| Parameter | Type | Description |
|---|---|---|
area_mm2 * | number | |
length_mm * | number | |
conductivity_s_m | ||
conductor | ||
voltage_v | ||
workspace | string | Run this call in this named workspace |
em_field EM Field
Exact magnetostatic field of the two canonical sources (NO solver): `kind='wire'` is the long straight wire B = μ₀·I/(2π·r) at `distance_mm` (Ampère's law); `kind='solenoid'` is the long-solenoid interior B = μ₀·μ_r·n·I with `turns_per_m`. Returns {b_t, b_mt, …} (the field in tesla and millitesla).
| Parameter | Type | Description |
|---|---|---|
current_a | number | |
distance_mm | ||
kind | string | |
mu_r | number | |
turns_per_m | ||
workspace | string | Run this call in this named workspace |
em_conduction_submit EM Conduction Submit
DC current conduction via Elmer's StatCurrentSolver (P3 M6 frontier), asynchronous. Requires ElmerSolver; when absent this returns {ok:false, reason, install} rather than raising. Builds a rectangular strip with `voltage_v` across its ends and reads the electrode current, total Joule heating and Elmer's effective resistance — all machine-exact against R = L/(σ·A) (`resistance_ratio` = 1.000000 live). Returns the degradation dict or {job_id, status, cache_hit}; poll job_result for {ok, current_a, joule_w, effective_resistance_ohm, resistance_exact_ohm, curre…
| Parameter | Type | Description |
|---|---|---|
conductivity_s_m | ||
conductor | string | |
length_m | number | |
nx | integer | |
ny | integer | |
voltage_v | number | |
width_m | number | |
workspace | string | Run this call in this named workspace |
em_induction_submit EM Induction Submit
AC skin effect / induction via Elmer's harmonic 2-D magnetodynamics (P3 M6 frontier), asynchronous. Requires ElmerSolver; when absent this returns {ok:false, reason, install} rather than raising. Builds a conductor slab `depths` skin depths deep driven by the surface vector potential at `frequency_hz`, solves the complex field, and fits the e-folding length of BOTH the magnitude and the phase of A(x) — each must equal the exact δ = √(2/(ω·μ₀·μ_r·σ)) (live: decay_ratio 0.999, phase_ratio 1.000). The Joule deposition profile |J|² ∝ e^(−2x/δ) is the…
| Parameter | Type | Description |
|---|---|---|
conductivity_s_m | ||
conductor | string | |
depths | number | |
frequency_hz | number | |
mu_r | number | |
nx | integer | |
ny | integer | |
workspace | string | Run this call in this named workspace |
em_induction_heating_submit EM Induction Heating Submit
Coupled induction heating via Elmer (SIMULATION_NEXT B5), asynchronous — completes `em_induction_submit` into a THERMAL answer: the harmonic MagnetoDynamics solve runs once, MagnetoDynamicsCalcFields turns it into the time-averaged Joule loss field, and a transient adiabatic HeatSolver integrates it for `heat_duration_s`. Requires ElmerSolver; when absent this returns {ok:false, reason, install} rather than raising. Two gates: joule_power_ratio — the solved eddy-current power vs the exact deep-slab dissipation P″ = R_s·|H₀|²/2 = ω²σA₀²δ/4 (from the…
| Parameter | Type | Description |
|---|---|---|
a_surface | number | |
case_dir | ||
conductivity_s_m | ||
conductor | string | |
cp_j_kgk | number | |
density_kg_m3 | number | |
depths | number | |
frequency_hz | number | |
heat_duration_s | number | |
k_thermal | number | |
mu_r | number | |
n_steps | integer | |
nx | integer | |
ny | integer | |
sif | string | |
workspace | string | Run this call in this named workspace |
cfd_pipe_flow CFD Pipe Flow
Analytic straight-pipe pressure drop (NO solver) — the fast internal-flow screen and the exact gate the OpenFOAM cfd_internal_flow solve is checked against. Laminar (Re<2300) is Hagen–Poiseuille Δp = 128·μ·L·Q/(π·D⁴) with its D⁴ scaling — exact; turbulent uses smooth-pipe Blasius, or Colebrook–White when `roughness_mm` is given (the Colebrook value is always reported for turbulent flow) — a ±10 % Moody-band correlation (fidelity labeled). Give flow as `flow_rate_lpm` or `velocity_m_s`; fluid μ,ρ from a name ('water-20c','air-20c','oil-sae30-20c',…
| Parameter | Type | Description |
|---|---|---|
diameter_mm * | number | |
length_mm * | number | |
flow_rate_lpm | ||
fluid | string | |
mu_pa_s | ||
rho_kg_m3 | ||
roughness_mm | number | |
velocity_m_s | ||
workspace | string | Run this call in this named workspace |
cfd_internal_flow_submit CFD Internal Flow Submit
Internal-flow CFD (pressure drop) via OpenFOAM or SU2, asynchronous. Requires an OpenFOAM (apt/conda) or SU2 binary; when none resolves this returns {ok:false, reason, install} rather than raising. The pipe and geometry-bridge modes need OpenFOAM specifically — they emit OpenFOAM dictionaries — but `channel_height_mm` builds a NATIVE SU2 case, which is why solve_capabilities counts SU2 toward the cfd family (issue #237). On Apple Silicon that is the difference between needing a Multipass VM and not. `turbulence='kOmegaSST'` upgrades the pipe validation case to R…
| Parameter | Type | Description |
|---|---|---|
application | ||
base_cell_mm | ||
body | ||
case_dir | ||
channel_height_mm | ||
channel_length_mm | ||
diameter_mm | ||
end_time | ||
flow_rate_lpm | ||
fluid | string | |
inlet_face | ||
length_mm | ||
location_in_mesh_mm | ||
max_iterations | ||
mu_pa_s | ||
n_axial | ||
n_radial | ||
outlet_face | ||
rho_kg_m3 | ||
stl_tolerance_mm | number | |
turbulence | string | |
velocity_m_s | ||
workspace | string | Run this call in this named workspace |
declare_performance Declare Performance
Record a quantitative PERFORMANCE spec on a part so it can be re-proved after every edit — the performance twin of declare_intent, which only covers geometry. Persists in the .FCStd as a JSON property bag; one contract per part, re-declaring replaces it. Each requirement is metric-agnostic — the contract layer only orchestrates, so the metric is whatever the named tool already returns, and "Cd ≤ 0.30", "Δp ≤ 50 Pa", "first mode ≥ 200 Hz" and "ΔT ≤ 40 K" are the same machinery: {"name": "drag_at_cruise", "metric": "cd",…
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
requirements * | array | |
workspace | string | Run this call in this named workspace |
verify_performance Verify Performance
Prove (or fail to prove) every requirement declared with declare_performance — the step that turns "a solver printed 0.29" into a claim with a band and a provenance. A verdict has THREE states. `pass` and `fail` each require the measurement's whole uncertainty band to sit on one side of the limit; a band that straddles it is `indeterminate`, meaning "escalate", not "probably fine". A correlation reading Cd = 0.28 ± 10 % against a limit of 0.30 spans 0.252–0.308 and has NOT shown the part passes — collapsing that to a pass is how a spec silently goes unmet.…
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
tier | string | |
workspace | string | Run this call in this named workspace |
study_submit Study Submit
Sweep parameters over a sampled design space and record the WHOLE search as a table — the DOE primitive between the parametric layer and the solver catalog. Without it, exploring a design space means hand-rolling `recipe(params)` -> solve -> mutate -> repeat and keeping only the last point, so nobody can tell afterwards whether the design is good or merely the one you stopped on. A study keeps every point, with the parameters that produced it. `variables` declares the space; each entry is either explicit levels or a range: - `{"name": "diameter_mm", "values": [8…
| Parameter | Type | Description |
|---|---|---|
responses * | array | |
variables * | array | |
fixed_inputs | ||
handle | ||
max_points | integer | |
objective | ||
recipe | ||
sampling | ||
workspace | string | Run this call in this named workspace |
optimize_submit Optimize Submit
Vary parameters until the spec is met, then say whether it was PROVEN — the step that closes the design-to-spec loop. Everything else in this family measures; this searches. Two things make it different from a generic minimizer, and both come from the performance-contract layer underneath it: **A constraint verdict has three states.** `indeterminate` — the measurement's uncertainty band straddles the limit — is NOT a failed step. An optimizer that reads it as a failure walks away from good designs; one that reads it as a pass converges on unproven ones.…
| Parameter | Type | Description |
|---|---|---|
objective * | object | |
variables * | array | |
budget | ||
constraints | ||
fixed_inputs | ||
handle | ||
recipe | ||
tier | string | |
workspace | string | Run this call in this named workspace |
grid_convergence Grid Convergence
Grid Convergence Index — how much of a solved number is the MESH (no solver, milliseconds). Give it the same quantity solved on 2-3 systematically refined meshes, FINEST FIRST, and it fits the observed order of convergence, Richardson-extrapolates to zero cell size, and returns the percentage band inside which the mesh-independent answer lies. Roache's GCI as codified in ASME V&V 20. This is the honest `band_pct` for a result with no analytic oracle — the verification counterpart to every validation ratio in the solver families — and it is deliberately family…
| Parameter | Type | Description |
|---|---|---|
values * | array | |
assumed_order | number | |
cell_counts | ||
cell_sizes | ||
dimensions | integer | |
workspace | string | Run this call in this named workspace |
cfd_mesh_independence_submit CFD Mesh Independence Submit
Solve the same CFD case at 2-3 refined meshes and report the Grid Convergence Index — asynchronous, one job for the whole ladder. Requires OpenFOAM; degrades to {ok:false, reason, install} when it does not resolve. Answers the question no single solve can: **is this number a property of the flow, or of the mesh?** On geometry with no analytic twin that band is the only error bar available, and it is what turns "a solver produced 0.31" into "0.31 ± 2 %". Two families, dispatched like their single-solve twins: - **the wind tunnel** — pass `model` (or `body`) +…
| Parameter | Type | Description |
|---|---|---|
base_cell_mm | ||
body | ||
diameter_mm | ||
end_time | ||
flow_direction | ||
flow_rate_lpm | ||
fluid | string | |
length_mm | ||
levels | integer | |
metric | ||
model | ||
mu_pa_s | ||
n_axial | ||
n_radial | ||
refinement_ratio | number | |
rho_kg_m3 | ||
surface_refine | ||
turbulence | string | |
velocity_m_s | ||
workspace | string | Run this call in this named workspace |
cfd_body_drag CFD Body Drag
Analytic EXTERNAL-flow drag screen (NO solver, milliseconds) — the external twin of cfd_pipe_flow, and the banded oracle the wind-tunnel solve cfd_external_flow_submit(model=…) is checked against. Use this FIRST to narrow a design space; escalate to the solve only for the shapes that survive. Three families: - `shape='sphere'` — Clift–Gauvin over the whole standard drag curve, Cd = 24/Re·(1+0.15·Re^0.687) + 0.42/(1+4.25e4·Re^-1.16). Collapses to the EXACT Stokes 24/Re as Re→0; valid to Re=2e5 (it does not model the drag crisis). Pass `diamete…
| Parameter | Type | Description |
|---|---|---|
cd | ||
diameter_mm | ||
flow_direction | ||
fluid | string | |
frontal_area_mm2 | ||
length_mm | ||
model | ||
mu_pa_s | ||
rho_kg_m3 | ||
shape | string | |
stl_tolerance_mm | number | |
velocity_m_s | ||
workspace | string | Run this call in this named workspace |
cfd_external_flow_submit CFD External Flow Submit
External-flow CFD (drag/lift) via OpenFOAM or SU2, asynchronous. Requires an OpenFOAM (apt/conda) or SU2 binary; when none resolves this returns {ok:false, reason, install} rather than raising. The two case-BUILDING modes below need OpenFOAM specifically — they emit OpenFOAM dictionaries; SU2 only ever runs a `case_dir` you prepared yourself, which is why solve_capabilities does not count it toward the cfd family's any_available (issue #237). Three modes: - **Put a real solid in the virtual wind tunnel** (issue #223): pass a `model` (or `body`) handle + `veloci…
| Parameter | Type | Description |
|---|---|---|
application | ||
base_cell_mm | ||
body | ||
case_dir | ||
downstream_factor | ||
end_time | ||
flow_direction | ||
fluid | string | |
frontal_area_mm2 | ||
lateral_factor | ||
model | ||
mu_pa_s | ||
n_y | ||
nx_plate | ||
plate_length_mm | ||
reference_length_mm | ||
rho_kg_m3 | ||
stl_tolerance_mm | number | |
surface_refine | ||
turbulence | string | |
upstream_factor | ||
velocity_m_s | ||
wake_refine | ||
workspace | string | Run this call in this named workspace |
molding_fill_submit Molding Fill Submit
Injection-molding FILL (+ optional PACK/COOL) solve, asynchronous — the higher- fidelity twin `molding_screen` escalates to. Answers *can this geometry actually be molded*: short-shot / fill ability (the strongest, most reliable gate), fill time, and a peak injection-pressure proxy — a real two-phase (melt + air) flow solve, not the spiral-flow correlation. Requires an OpenFOAM binary; when none resolves this returns {ok:false, reason, install} rather than raising. Backend: when the **openInjMoldSim** binary resolves (GPL-3.0, a modified compressibleInterFo…
| Parameter | Type | Description |
|---|---|---|
application | ||
carreau | ||
case_dir | ||
cool_window_s | ||
depth_mm | ||
eject_temp_c | ||
end_time_s | ||
fill_end | ||
fill_fraction_pass | ||
flow_rate_cm3_s | ||
gate_height_mm | ||
hold_pressure_pa | ||
inject_velocity_m_s | ||
length_mm | ||
machine_max_pressure_pa | ||
melt_nu_m2_s | ||
melt_rho_kg_m3 | ||
melt_temp_c | ||
mold_temp_c | ||
nx | ||
ny | ||
pack_phases | ||
pack_wall_h_high_w_m2k | ||
pack_wall_h_low_w_m2k | ||
pack_wall_h_w_m2k | ||
peak_pressure_mpa | ||
resin | ||
room_temp_c | ||
stages | ||
wall_h_w_m2k | ||
wall_thickness_mm | ||
workspace | string | Run this call in this named workspace |
molding_warpage_submit Molding Warpage Submit
Injection-molding **WARPAGE / residual distortion**, asynchronous — the FEM thermo-elastic post-step of the cooling solve (GitHub issue #113 Part B; the higher-fidelity twin of the #104 CTE shrinkage screen). Answers *will the part bow out of flat once it cools and is ejected*. Requires the `ccx` (CalculiX) binary; when none resolves this returns {ok:false, reason, install} rather than raising. The physics: a moulding shrinks as it cools (CTE); **uniform** shrinkage just makes it smaller, but **differential** shrinkage warps it. The dominant driver is the asymmet…
| Parameter | Type | Description |
|---|---|---|
body * | string | |
char_length_mm | ||
cooling_case_dir | ||
cooling_nx | ||
cooling_ny | ||
cooling_nz | ||
cooling_time | ||
cte_per_k | ||
dT_through_k | ||
flatness_tol_frac | ||
flatness_tol_mm | ||
material | ||
poisson | ||
ref_temp_c | ||
thickness_axis | ||
workspace | string | Run this call in this named workspace |
youngs_mpa |
random_vibration Random Vibration
Random-vibration response off a modal run (Miles' equation; closed-form, no external solver). Provide either `analysis` (a handle whose fem_modal + fem_run already produced natural frequencies) or an explicit `frequencies_hz` list, plus a base-acceleration PSD `psd_profile` ([{"hz":20,"g2_hz":0.01}, ...]; log-log interpolated, and zero outside its band so a mode stiffened above the band escapes drive). Each mode is an SDOF resonator with amplification `q` (default 10; rule of thumb Q≈√f_n), combined by SRSS: rms_g = sqrt(Σ (π/2)·f·W(f)·Q). With `modal_stres…
| Parameter | Type | Description |
|---|---|---|
psd_profile * | array | |
allowable_stress_mpa | ||
analysis | ||
frequencies_hz | ||
modal_stress_mpa_per_g | ||
q | number | |
workspace | string | Run this call in this named workspace |
beam_modal Beam Modal
Exact Euler-Bernoulli natural frequencies of a uniform rectangular beam — the closed-form modal oracle (no solver), and the band the CalculiX `fem_modal` eigen-solve is gated against. f_n = (βL)_n²/(2π)·sqrt(E·I/(ρ·A·L⁴)); the beam bends in `height_mm` (I = width·height³/12, so a slender beam's lowest mode is the thinnest-direction bend). `boundary`: 'cantilever' | 'simply_supported' | 'clamped_clamped' | 'free_free' | 'clamped_pinned' (up to 5 modes each). Material via `youngs_gpa`+`density_kg_m3`, or a Materials-DB `material` name. Slender-beam theor…
| Parameter | Type | Description |
|---|---|---|
height_mm * | number | |
length_mm * | number | |
width_mm * | number | |
boundary | string | |
density_kg_m3 | ||
material | ||
n_modes | integer | |
workspace | string | Run this call in this named workspace |
youngs_gpa |
dfm_check DFM Check
Screen a part for manufacturability against a pull/tool axis. Give a hand-built `faces` list of {name, draft_deg, wall_mm?} — draft_deg relative to pull_axis (0 = a vertical wall needing draft; <0 = a re-entrant undercut) — OR a live `handle`, whose per-face descriptors are read off the solid (draft vs the pull axis + a ray-cast undercut test + inward-chord wall sampling) and scored identically (v2 Shape wiring). draft_violations are 0≤draft<min_draft_deg, undercut_faces are draft<0, min_wall_violations are wall_mm<min_wall_mm (defaults by process: injection 1…
| Parameter | Type | Description |
|---|---|---|
faces | ||
handle | ||
min_draft_deg | number | |
min_wall_mm | ||
process | string | |
pull_axis | string | |
sheet | ||
workspace | string | Run this call in this named workspace |
optics_raytrace Optics Raytrace
Ray-trace a bundle through a dielectric optical model with rayoptics (asynchronous-free; needs no FreeCAD geometry). Requires the rayoptics wheel (the `optics` extra); when it does not resolve this returns {ok:false, reason, install} rather than raising. The geometric refraction comes from rayoptics; the Fresnel/TIR energy split + the exit histogram come from the exact analysis/optics core, so the trace is gated against that oracle (`oracle_max_dev_deg` = max rayoptics−Snell exit-angle deviation, ~0). `n_refractive` is the medium index n2 (default PMMA 1.49062).…
| Parameter | Type | Description |
|---|---|---|
model | ||
n_rays | integer | |
n_refractive | number | |
source_config | ||
workspace | string | Run this call in this named workspace |
optics_lens_design Optics Lens Design
First-order + spot analysis of a SEQUENTIAL optical system with optiland (MIT, in-process). Requires the `optics` extra; degrades to {ok:false, reason, install} otherwise. For a single lens optiland is gated against the analytic thick-lens oracle (`oracle_dev_pct`). `surfaces`: list (object->image) of {radius, thickness, material, stop?} — exactly one surface must set stop:true (the aperture stop). `epd` (entrance-pupil dia) OR `fno`. `wavelengths_um` (first is primary, default [0.5876]). `field_angles_deg` (default [0.0]). `image_solve` solves the last gap to pa…
| Parameter | Type | Description |
|---|---|---|
surfaces * | array | |
epd | ||
field_angles_deg | ||
fno | ||
image_solve | boolean | |
want_spot | boolean | |
wavelengths_um | ||
workspace | string | Run this call in this named workspace |
optics_lens_optimize Optics Lens Optimize
Optimize a SEQUENTIAL optical system with optiland's optimizer (MIT, in-process) — the capability rayoptics lacks. Requires the `optics` extra; degrades to {ok:false, reason, install} otherwise. `surfaces`: as in optics_lens_design. `variables`: [{type:'radius'|'thickness', surface:<1-based int>}] — the degrees of freedom. `targets`: [{operand:'f2'| 'rms_spot_size'|…, target, weight?, surface?}] — the merit function. `maxiter` caps iterations. Returns the degradation dict, or {ok, backend:'optiland', converged, n_fev, before:{efl_mm,rss}, after:{efl_mm…
| Parameter | Type | Description |
|---|---|---|
surfaces * | array | |
targets * | array | |
variables * | array | |
epd | ||
field_angles_deg | ||
maxiter | integer | |
wavelengths_um | ||
workspace | string | Run this call in this named workspace |
optics_solid_trace Optics Solid Trace
NON-SEQUENTIAL ray trace through a real solid (STL mesh) with a refractive index — the lane for molded optical parts (light-pipes, prisms, lenses). Backed by KrakenOS, which is GPL-3.0 and is run ONLY in a subprocess (the parent never imports it — same arm's-length isolation as the GPL Elmer/OpenFOAM binaries). Requires the `optics_gpl` extra; degrades to {ok:false, reason, install} otherwise. Geometry: pass a `model` handle (exported to STL here) OR a ready `stl_path`. Material: `glass` (KrakenOS catalog name, e.g. 'BK7') or `n_refractive` (constant index). `r…
| Parameter | Type | Description |
|---|---|---|
rays * | array | |
glass | ||
model | ||
n_refractive | ||
solid | ||
stl_path | ||
want_paths | boolean | |
wavelength_um | number | |
workspace | string | Run this call in this named workspace |
granular_screen Granular Screen
Closed-form granular/powder-mechanics oracles — banded correlations, NO external solver (the FreeCAD-free analytic twins the YADE DEM solve is gated against). These are correlations, not exact theory, so each returns fidelity='correlation' + an honest [low, high] band; the band IS the oracle. Dispatch on `problem`: 'packing' (regime='random_close'|'random_loose'|'fcc'[, coordination]) — monodisperse sphere solid-volume fraction φ. RCP ≈ 0.637 (band 0.60–0.66), the random pile a real settle must hit, well below the crystalline FCC/HC…
| Parameter | Type | Description |
|---|---|---|
bulk_density_kg_m3 | ||
coordination | ||
flow1_kg_s | ||
flow2_kg_s | ||
friction_coeff | ||
material | ||
mu_high | ||
mu_low | ||
outlet1_m | ||
outlet2_m | ||
outlet_m | ||
particle_d_m | ||
problem | string | |
regime | string | |
repose_high_deg | ||
repose_low_deg | ||
saturation | number | |
workspace | string | Run this call in this named workspace |
dem_pack_submit DEM Pack Submit
Pour N monodisperse spheres into a box and settle them under gravity with the REAL YADE discrete-element engine, then measure the random close-packing fraction φ of the settled bed — gated against granular_screen('packing') (RCP band 0.60–0.66, well below the crystalline 0.7405). YADE is GPL-3.0 and is run ONLY in a subprocess (the parent never imports it — same arm's-length isolation as the GPL Elmer/OpenFOAM binaries). Runs OFF the MCP channel via a background job, so a multi-second settle never blocks the worker. `box_m` is the [Lx, Ly] floor footprint (m…
| Parameter | Type | Description |
|---|---|---|
box_m | ||
density | number | |
friction_deg | number | |
n_spheres | integer | |
radius_m | number | |
steps | integer | |
workspace | string | Run this call in this named workspace |
young_pa | number |
dem_flow_submit DEM Flow Submit
Discharge spheres from a flat-bottomed hopper box through a central orifice with the REAL YADE discrete-element engine and measure the steady mass-flow rate — gated against granular_screen('beverloo') (flow ∝ outlet^2.5). Submit two `outlet_m` sizes and feed the (outlet, flow) pair to granular_screen('beverloo_exponent') to check the Beverloo 2.5 exponent (vs the Torricelli 2.0 of a draining fluid). YADE is GPL-3.0 and is run ONLY in a subprocess; runs OFF the MCP channel via a background job. `box_m` is the [Lx, Ly, Lz] hopper box (m; default [0.10, 0.10, 0.20…
| Parameter | Type | Description |
|---|---|---|
box_m | ||
density | number | |
flow_steps | integer | |
friction_deg | number | |
n_spheres | integer | |
outlet_m | number | |
radius_m | number | |
settle_steps | integer | |
workspace | string | Run this call in this named workspace |
young_pa | number |
optics_moldability_check Optics Moldability Check
Moldability screen for a part against a single pull axis — geometric, no solver. Resolves the `model` handle's solid, then per face computes the draft relative to `pull_axis` from the outward normal (draft_deg = 90 − angle(normal, pull); 0 = a wall parallel to the pull that needs draft) and ray-casts the face centroid along ±pull: a face the straight pull frees in neither direction is a re-entrant UNDERCUT (reported with negative draft). Inward chords give a wall- thickness distribution. Scored through the same DfM machinery as dfm_check. `pull_axis`: '+z'/'-x…
| Parameter | Type | Description |
|---|---|---|
model * | string | |
min_draft_deg | number | |
min_wall_mm | ||
process | string | |
pull_axis | string | |
workspace | string | Run this call in this named workspace |
moldability_check Moldability Check
Geometry-aware moldability DFx screen — resolves the `model` handle's solid, samples local wall thickness per face via inward chords (the same machinery as optics_moldability_check), then grades it through the pure-Python moldability screen: WALL-THICKNESS QUALITY (recommended-band range / uniformity / sink risk, cooling tied to the thickest wall) + the CTE SHRINKAGE estimate for the resin. Low-fidelity gate — escalate_to= 'molding_fill_submit'. `material` drives the recommended-wall band, the CTE shrinkage, and cooling (degrades gracefully when the corpus…
| Parameter | Type | Description |
|---|---|---|
model * | string | |
alpha_per_k | ||
fail_ratio | number | |
material | ||
nominal_mm | ||
sink_factor | number | |
t_ambient_c | number | |
t_solidify_c | ||
warn_ratio | number | |
workspace | string | Run this call in this named workspace |
dfa_check DFA Check
Grade an assembly (Boothroyd-Dewhurst-lite). assembly_efficiency = theoretical_min/(part_count+fastener_count) (theoretical_min = unique_part_count or 1); assembly_score scales that by a handling penalty from insertion_axes/ symmetry and decreases monotonically as part/fastener count rises. The grade is an ordinal index for comparing variants (fidelity='correlation', band_pct=None) — rank with it, don't gate on the absolute value. Returns {part_count, fastener_count, insertion_axes, handling_difficulty, assembly_efficiency, assembly_score, symmetry_score, fidelity…
| Parameter | Type | Description |
|---|---|---|
part_count * | integer | |
fastener_count | integer | |
insertion_axes | integer | |
symmetric_fraction | number | |
unique_part_count | ||
workspace | string | Run this call in this named workspace |
pack_check Molding Pack Check
Check a part against a shipping carton + compute billable weight. part_bbox_mm/carton_mm are [l,w,h] mm; `fits` allows reorientation (sorted-dim compare). void_fraction = 1−vol(part)/vol(carton); dim_weight_kg = vol(carton cm³)/dim_factor (default 5000 metric DIM); billable_weight_kg = max(actual, dimensional). Returns {fits, void_fraction, dim_weight_kg, actual_mass_kg, billable_weight_kg, pass}.
| Parameter | Type | Description |
|---|---|---|
carton_mm * | array | |
mass_g * | number | |
part_bbox_mm * | array | |
dim_factor | number | |
workspace | string | Run this call in this named workspace |
cost_estimate Cost Estimate
Per-unit cost rollup (Design for Cost). material_cost = volume·density·price ·(1+scrap) from the Materials DB (process: cnc | fdm | casting | injection). process_cost = amortized setup + per-process machine time; tooling amortized over quantity, so unit_cost falls as quantity rises. The machine-time table is order-of-magnitude (fidelity='correlation', band_pct=100) — trust the ratios between processes/quantities, not the absolute dollars; material_cost alone is exact given its inputs. `material` may be any Materials-DB card name (material_list / material_get),…
| Parameter | Type | Description |
|---|---|---|
material * | string | |
volume_mm3 * | number | |
density_kg_m3 | ||
machine_rate_usd_hr | number | |
machine_time_band_pct | ||
machine_time_hr | ||
price_usd_kg | ||
process | string | |
quantity | integer | |
scrap_fraction | number | |
setup_min | number | |
tolerance_class | ||
tooling_usd | number | |
workspace | string | Run this call in this named workspace |
tolerance_cost_check Tolerance Cost Check
Price a tolerance scheme against the process that has to hold it — the missing link between tolerance_stackup ("what tolerance works") and cost_estimate ("what does it cost"). Per toleranced dimension: its ISO 286 IT grade as a FLOAT (a band between IT6 and IT7 reports 6.4, not 7), the cheapest machining operation that holds that grade naturally (drilling ~IT11, milling ~IT10, turning ~IT9, reaming ~IT7, grinding ~IT6), a relative cost index normalised to 1.0 at `process`'s natural capability, and a verdict: 'ok', 'in_process_tightening' (tighter but reachable…
| Parameter | Type | Description |
|---|---|---|
axis | string | |
chain | ||
default_tol | ||
general | string | |
handle | ||
process | string | |
workspace | string | Run this call in this named workspace |
suggest_loosening Suggest Loosening
The loosest tolerance that works: which links can give up tolerance for the biggest cost saving while the stack still passes. Greedy, one IT grade at a time — every trial loosening is re-verified against tolerance_stackup's seeded Monte-Carlo cpk before it is committed, so nothing it suggests can fail the spec. Candidates are ranked by the tolerance_cost_check curve, so the tightest (most expensive) links get opened first. Loosening preserves each link's MEAN, so the stack's nominal does not move. Two honest refusals: a chain that does not already meet `target_c…
| Parameter | Type | Description |
|---|---|---|
axis | string | |
chain | ||
coarsest_it | number | |
default_tol | ||
general | string | |
handle | ||
max_steps | integer | |
process | string | |
samples | integer | |
seed | integer | |
spec_max | ||
spec_min | ||
step_grades | number | |
target_cpk | number | |
workspace | string | Run this call in this named workspace |
cnc_machinability_check CNC Machinability Check
3-axis CNC machinability screen off a live solid — pure geometry, NO CAM engine (no toolpath, no gouge check, no holder collision). Counts SETUPS from a tool-approach census: for every machined face, which of ±X/±Y/±Z can both address it (the normal does not point away — a wall parallel to the tool axis is milled by the cutter's periphery) and reach it (a ray from the face escapes the solid, the same caster the moldability undercut check uses), reduced to a minimum cover. Faces lying on the stock envelope are excluded: they are billet surfaces, and counting…
| Parameter | Type | Description |
|---|---|---|
model * | string | |
max_l_over_d | number | |
max_setups | integer | |
min_tool_radius_mm | number | |
min_wall_mm | number | |
workspace | string | Run this call in this named workspace |
cnc_time_estimate CNC Time Estimate
Machining time for a live solid from a material-removal-rate model — the honest `cnc` machine time cost_estimate's flat volume table cannot give. stock = bbox grown by stock_allowance_mm per side roughing_min = (stock − part volume) / MRR(material) finishing_min = machined face area / finish area-rate(material) total = (roughing + finishing)/utilisation · tolerance factor + setups · setup_min MRR is per material class (aluminium 60, steel 12, stainless 6, titanium 2.5 cm³/min …) — ratios that trac…
| Parameter | Type | Description |
|---|---|---|
material * | string | |
model * | string | |
finish_cm2_min | ||
mrr_cm3_min | ||
setup_min | number | |
setups | ||
stock_allowance_mm | number | |
tolerance_class | ||
utilisation | number | |
workspace | string | Run this call in this named workspace |
slice_estimate Slice Estimate
First-order FDM slice estimate (analytic, NO slicer needed; see slice_gcode_submit for the real PrusaSlicer CLI). mass_g = volume·density (Materials DB); deposited = volume·(wall_fraction + infill·(1−wall_fraction)) so at 100% infill filament_g == mass_g; layer_count = ceil(bbox height/layer_height); print_time from nozzle volumetric flow. `material` may be any Materials-DB card name (material_list / material_get), or anything at all if you supply `density_g_cc` yourself — it overrides the DB lookup. A generic word like 'polymer' is a CATEGORY, not a card, a…
| Parameter | Type | Description |
|---|---|---|
bbox_mm * | array | |
volume_mm3 * | number | |
density_g_cc | ||
filament_dia_mm | number | |
infill_fraction | number | |
layer_height_mm | number | |
material | string | |
nozzle_mm | number | |
print_speed_mm_s | number | |
wall_fraction | number | |
workspace | string | Run this call in this named workspace |
slice_gcode_submit Slice G-code Submit
Slice a real part with the PrusaSlicer CLI, asynchronous — the external-CLI upgrade of the analytic slice_estimate: real perimeters, infill patterns, `supports`, travel/acceleration, and the slicer's own print-time model. Requires a PrusaSlicer install ('apt install prusa-slicer' / the AppImage); when absent this returns {ok:false, reason, install} rather than raising. Pass a `body` handle (exported to STL in the modeller) or a prepared `stl_path`. `infill_fraction` is 0..1 (full infill auto-switches the fill pattern — PrusaSlicer's default refuses 100%); `mate…
| Parameter | Type | Description |
|---|---|---|
body | ||
density_g_cc | ||
extra_args | ||
infill_fraction | number | |
layer_height_mm | number | |
material | string | |
stl_path | ||
supports | boolean | |
workspace | string | Run this call in this named workspace |
mechanism_kinematics Mechanism Kinematics
Closed-form planar mechanism kinematics — exact, NO external solver (the static pre-check / gate for mechanism_simulate_submit). Pick `mechanism`: - 'fourbar': link lengths crank/coupler/rocker/ground -> {mobility_dof (=1), grashof: {condition, type, input_crank_fully_rotates, shortest}, reachable, n_reached, coupler_path [[x,y]...], reachable_bbox_mm}. `config` 'open'|'crossed'. - 'slider_crank': crank_mm/conrod_mm (+ wrist_offset_mm) -> {stroke_mm (exactly 2·R in-line, independent of conrod), x_tdc_mm, x_bdc_mm, inline_stroke_exact}. - 'gruebler': n_link…
| Parameter | Type | Description |
|---|---|---|
config | string | |
conrod_mm | ||
coupler | ||
crank | ||
crank_mm | ||
ground | ||
joints | ||
mechanism | string | |
n_links | ||
n_steps | ||
planar | boolean | |
rocker | ||
workspace | string | Run this call in this named workspace |
wrist_offset_mm | number |
mechanism_simulate_submit Mechanism Simulate Submit
Simulate a rigid-link mechanism's DYNAMICS with PyBullet, asynchronously (the MBD family; requires the `mbd` extra — `pip install 'ankusdrive[mbd]'`). Use mechanism_kinematics first for the exact closed-form gates (DOF, Grashof, stroke). `links` is a tree: [{name, box_mm:[lx,ly,lz], mass_g, parent (link index, −1 = fixed base), joint_type ('revolute'|'prismatic'|'fixed'), joint_axis:[x,y,z], joint_at_mm:[x,y,z] (in the parent frame), com_mm:[x,y,z]}]. `drivers`: [{link, rate_dps}] (revolute) or [{link, rate_mm_s}] (prismatic). Optional `obstacles` ([{box_mm, at…
| Parameter | Type | Description |
|---|---|---|
links * | array | |
base | ||
drivers | ||
dt_s | number | |
duration_s | number | |
gears | ||
gravity | ||
loop_closures | ||
obstacles | ||
workspace | string | Run this call in this named workspace |
topology_optimize_submit Topology Optimize Submit
Minimum-compliance topology optimization (in-house SIMP; NO external solver), asynchronous because each iteration solves an FE system. Optimizes a 2-D rectangular design domain (`nelx`×`nely` unit cells) — or, when `nelz` is set, a 3-D `nelx`×`nely`×`nelz` grid of trilinear hexahedra — to the stiffest layout that holds Σdensity = `keep_fraction` (the Optimality-Criteria update holds it exactly); `penal` is the SIMP penalty (≈3), `rmin` the cone filter radius. Default BCs (both): the whole left face clamped + a unit downward load at the right-face centre. 2…
| Parameter | Type | Description |
|---|---|---|
fixed_dofs | ||
fixed_nodes | ||
keep_fraction | number | |
keep_in | ||
keep_out | ||
load | ||
loads | ||
max_iter | integer | |
nelx | integer | |
nely | integer | |
nelz | ||
penal | number | |
rmin | number | |
tol | number | |
workspace | string | Run this call in this named workspace |
topology_to_solid Topology to Solid
Reconstruct a FreeCAD solid from a topology-optimization density field — the modeller-side close of the loop opened by `topology_optimize_submit`, whose `density` this consumes. 2-D (nely×nelx grid): thresholds (a cell is solid when density ≥ `threshold`), run-length-merges each row into solid spans, tiles each span as a `cell_mm` box extruded `thickness_mm` in Z (row 0 at the top). 3-D (a nelz×nely×nelx voxel field from the `nelz` mode): greedy-merges solid voxels into maximal boxes at (i·cx, j·cy, k·cz) — j=0 at the bottom, `thickness_mm` ignored. Fuse…
| Parameter | Type | Description |
|---|---|---|
density * | array | |
cell_mm | number | |
name | ||
placement | ||
thickness_mm | ||
threshold | number | |
workspace | string | Run this call in this named workspace |
async_demo_submit Async Demo Job
Reference async long-solve: launch a job that runs OFF the MCP channel and return immediately, so a multi-minute solve never blocks the worker. (This demo just computes for duration_s then returns a deterministic result; a real FEM/CFD solve plugs into the same facility — see ankusdrive/jobs.py.) Returns {job_id, status, cache_hit}; poll with job_status / job_result. A re-submit with identical (duration_s, value) is a content-hash cache hit (no recompute).
| Parameter | Type | Description |
|---|---|---|
duration_s | number | |
value | number | |
workspace | string | Run this call in this named workspace |
job_status Job Status
Lightweight poll of any async job (from an *_submit tool). Returns {job_id, kind, status: 'running'|'done'|'failed', elapsed_s, meta} (+ error when failed) WITHOUT the result payload — cheap to call in a loop.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | |
workspace | string | Run this call in this named workspace |
job_result Job Result
Fetch an async job's outcome. Returns {job_id, kind, status, elapsed_s, result (when done) | error (when failed)}; while running neither is set. discard=True frees a terminal job (and its cache entry) once you have it.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | |
discard | boolean | |
workspace | string | Run this call in this named workspace |
job_list Job List
List every async job this worker session. Returns {count, jobs:[{job_id, kind, status, elapsed_s}]} in submit order, plus main_thread_queue:{queued, ran, failed, drains, pending} — the diagnostic for a shape optimization that looks stuck. Those builds run on the worker's main thread, and that queue is drained once per request: `pending` high with `drains` climbing means the work is slow; `drains` flat means nothing is polling, so nothing is advancing.
| Parameter | Type | Description |
|---|---|---|
workspace | string | Run this call in this named workspace |
recipe_list Recipe List
List every registered part recipe — named, parameterized, declared-input build templates (issue #136). Returns {schema, count, recipes} where each recipe maps to {doc, required, optional, emits}; the cheap directory to browse before picking and parameterizing a recipe with recipe_schema / recipe.
| Parameter | Type | Description |
|---|---|---|
workspace | string | Run this call in this named workspace |
recipe_schema Recipe Schema
Return one recipe's declared INPUT SCHEMA — its driving parameters with type/unit/default/range. Returns {schema, recipe, doc, inputs:[{name, type, unit?, default?, min?, max?, required, choices?, doc?}], emits}. `recipe` names a registered recipe; an unknown name fails loudly. This is the contract a parametric regeneration is authored against.
| Parameter | Type | Description |
|---|---|---|
recipe * | string | |
workspace | string | Run this call in this named workspace |
recipe_validate Recipe Validate
Validate a recipe reference {recipe, inputs} WITHOUT building it — the cheap front door (mirrors validate_manifest). Catches an unknown recipe, a missing required input, and a wrong-typed / out-of-range / bad-unit / unknown input. Returns {ok, problems} — ok is True iff problems is empty. Run before building or merging to reject a malformed parameterization before geometry is spent.
| Parameter | Type | Description |
|---|---|---|
recipe * | string | |
inputs | ||
workspace | string | Run this call in this named workspace |
recipe Build Recipe
Build a registered part recipe into the active document (issue #136): "regenerate with new parameters" = "re-run the recipe." Validates {recipe, inputs} against the declared schema (typed units + ranges) at the door, then runs the deterministic build — geometry + publish_interface + declare_intent. Returns {recipe, schema, inputs, handle, name, interfaces, intent, part}.
| Parameter | Type | Description |
|---|---|---|
recipe * | string | |
inputs | ||
workspace | string | Run this call in this named workspace |
items_validate Items Validate
Validate an items.json registry (the PLM item/document/file split, #140 C1). Checks the schema stamp ("ankusdrive.items/1"), each item record's shape, that part numbers are unique, and the held reserved rev/lifecycle fields. An item is the logical part (part_number + rev + lifecycle + metadata), distinct from its file artifact(s); part numbers are non-significant + sequential, with meaning in queryable metadata. registry: path to the items.json sidecar. Returns {ok, problems, schema, count} — ok is True iff problems is empty.
| Parameter | Type | Description |
|---|---|---|
registry * | string | |
workspace | string | Run this call in this named workspace |
items_resolve Items Resolve
Resolve an item-reference (an item id) to its artifact file(s) against an items.json registry — identity, not a bare path, so renaming/moving a file updates the item's files[] without breaking references. Returns {ok, files}, or {ok:false, problems} on a dangling reference (an unknown item id).
| Parameter | Type | Description |
|---|---|---|
item * | string | |
registry * | string | |
workspace | string | Run this call in this named workspace |
items_new New Item
Allocate a non-significant sequential part number and register a new item in an items.json sidecar (created if absent), writing it back. The reserved rev / lifecycle fields are seeded with held defaults (the #141 state machine, not C1). registry: path to the items.json sidecar (created if it does not exist). item: the new item's stable logical id (what manifests reference). files: optional list of artifact paths the item maps to. metadata: optional free-form, queryable attributes (where "meaning" lives). Returns {part_number, item, registry}.
| Parameter | Type | Description |
|---|---|---|
item * | string | |
registry * | string | |
files | ||
metadata | ||
workspace | string | Run this call in this named workspace |
items_check_manifest Items Check Manifest
Reference-integrity guard (#140 C1): check every item-reference in a manifest ({"item":"<id>"} on a component/instance) resolves against an items.json registry. Returns {ok, problems} — a dangling item-ref is caught before a merge, removing the "a part is its filename" fragility.
| Parameter | Type | Description |
|---|---|---|
manifest * | string | |
registry * | string | |
workspace | string | Run this call in this named workspace |
get_interface Get Interface
Read back a single published interface FRAME by name from a component (issue #139). The reference-by-name primitive feature templates ride on: an unpublished name fails loudly. Returns {handle, name, frame}.
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
name * | string | |
workspace | string | Run this call in this named workspace |
feature_list Feature List
List every registered FEATURE TEMPLATE — the PowerCopy/UDF analog of a part recipe: a reusable feature with declared reference-geometry inputs (a frame, an f_/e_ tag, an axis) plus scalar parameters, stamped onto a host by name (issue #139). Returns {schema, count, templates} where each maps to {doc, refs, required, optional, emits}; the directory to browse before picking one with feature_schema / feature_instantiate.
| Parameter | Type | Description |
|---|---|---|
workspace | string | Run this call in this named workspace |
feature_schema Feature Schema
Return one feature template's declared REF+INPUT SCHEMA — its reference geometry (name/kind) and its scalar parameters (type/unit/default/range). Returns {schema, template, doc, refs:[{name, kind, required, doc?}], inputs:[{name, type, unit?, default?, min?, max?, required, choices?, doc?}], emits}. An unknown name fails loudly.
| Parameter | Type | Description |
|---|---|---|
template * | string | |
workspace | string | Run this call in this named workspace |
feature_validate Feature Validate
Validate a feature instantiation {template, refs, inputs} WITHOUT building it — the cheap structural front door (mirrors recipe_validate). Catches an unknown template, an unknown/missing required reference, a malformed reference value, and every scalar-input failure (missing required, out of range, wrong type, bad unit, unknown key). A tag that doesn't resolve against real geometry is caught at feature_instantiate time. Returns {ok, problems}.
| Parameter | Type | Description |
|---|---|---|
template * | string | |
inputs | ||
refs | ||
workspace | string | Run this call in this named workspace |
feature_instantiate Feature Instantiate
Stamp a registered FEATURE TEMPLATE onto a host body at reference geometry supplied BY NAME (PowerCopy/UDF, issue #139) — e.g. a mounting_boss onto a published seat frame, or a bolt_pattern onto an f_ face tag. Validates {refs, inputs} at the door, resolves each reference against the host's CURRENT geometry (an f_ tag / interface name that doesn't resolve fails loudly), then runs the deterministic build — geometry + publish_interface + declare_intent. template: registered template name (feature_list to browse). host: the handle of the body to stamp onto. re…
| Parameter | Type | Description |
|---|---|---|
host * | string | |
template * | string | |
inputs | ||
refs | ||
workspace | string | Run this call in this named workspace |
family_validate Family Validate
Validate a variant-family design table (issue #138, B1) — a row x column table where row = a variant (keyed by a size designator) and column = a recipe parameter / feature-flag / material. Loads CSV or JSON and checks the recipe, mode, key column, duplicate/missing size keys, and every per-row recipe-door value; each problem names the row+column. Returns {ok, problems}. table: path to the family table (.csv or .json).
| Parameter | Type | Description |
|---|---|---|
table * | string | |
workspace | string | Run this call in this named workspace |
family_materialize Family Materialize
Materialize a whole variant family from ONE design table (issue #138, B1) — "make all the gears" becomes a table, not a loop. For each row, in table order, builds the part with its recipe (A1, #136) and allocates one item + one sequential part number (C1, #140). Subsumes standard-part catalogs: a bearing catalog is a family table keyed by designation, sourced from the ISO corpus. Two modes (both supported): "instances" (each variant its own released file + part number) and "configurations" (variants share one artifact). Builds into the active document. Returns {s…
| Parameter | Type | Description |
|---|---|---|
table * | string | |
mode | ||
registry | ||
workspace | string | Run this call in this named workspace |
substitutability_check Substitutability Check
Liskov-substitutability gate — Form/Fit/Function as code (§7.1, #147). Take an assembly that gates green with variant A in a slot, swap in variant B (a different family row, or any part claiming the same interface), and re-run merge_assembly + all the gates. Still green ⇒ B is interchangeable with A — by construction a compatible (MINOR/PATCH) change ⇒ revise the existing part number; a gate now fails ⇒ the swap broke Form/Fit/Function ⇒ a new part number. Purely deterministic (no API, no judgment); the substitutability test #138 (B1 families) and #146…
| Parameter | Type | Description |
|---|---|---|
manifest * | string | |
slot * | string | |
variant * | object | |
verify_baseline | boolean | |
workspace | string | Run this call in this named workspace |
lifecycle_editable Lifecycle Editable
The cheap "is this editable?" check a builder runs before writing (#141 C2). An item is editable only in lifecycle state in_work; in_review, released and obsolete are frozen (released = immutable, the API-stability guarantee). registry: path to the items.json sidecar. item: the item id to check. Returns {ok, editable, state}.
| Parameter | Type | Description |
|---|---|---|
item * | string | |
registry * | string | |
workspace | string | Run this call in this named workspace |
lifecycle_transition Lifecycle Transition
Move an item through the lifecycle state machine in_work -> in_review -> released -> obsolete, guarded by a transition table (#141 C2). An illegal edge (e.g. skipping review, or re-opening a released item in place) is rejected loudly; releasing stamps the item's first revision and freezes it. registry: path to the items.json sidecar (written back on success). item: the item id to transition. to: the target lifecycle state. actor / note: optional provenance recorded in the item's transition log. Returns {ok, state, rev}, or {ok:false, problems} on an illega…
| Parameter | Type | Description |
|---|---|---|
item * | string | |
registry * | string | |
to * | string | |
actor | ||
note | ||
workspace | string | Run this call in this named workspace |
lifecycle_classify_change Lifecycle Classify Change
The deterministic Form/Fit/Function predicate (#141 C2): compare an item's before/after attributes and decide rename-vs-revise. A change touching a Form/Fit/Function (public, interface-defining) attribute breaks interchangeability => "new_part_number" (allocate a new number); a change to only internal/hidden attributes is interchangeable => "revise" (bump the revision, same part number). before / after: attribute objects (the item's interface-defining + internal attributes, before and after the proposed change). extra_f3: optional map of extra attribute nam…
| Parameter | Type | Description |
|---|---|---|
after * | object | |
before * | object | |
extra_f3 | ||
workspace | string | Run this call in this named workspace |
lifecycle_apply_change Lifecycle Apply Change
Apply a change to a RELEASED item, dispatching on the F3 predicate (#141 C2) — the sanctioned way to change a frozen part. An F3-preserving change opens a new revision on the SAME part number (rev A->B, back to in_work); an F3-breaking change allocates a NEW part number as a new item (new_item required) carrying a `supersedes` back-link, leaving the released item untouched. registry: path to the items.json sidecar (written back on success). item: the released item id being changed. after: the proposed new metadata (attribute object). new_item: id for the…
| Parameter | Type | Description |
|---|---|---|
after * | object | |
item * | string | |
registry * | string | |
actor | ||
extra_f3 | ||
new_item | ||
note | ||
workspace | string | Run this call in this named workspace |
scaffold_project Scaffold Project
Lay out a well-formed project in one call (issue #143 / D1) — promote the MULTI_AGENT.md §3/§7 directory convention to a primitive. Creates the convention directories (components/, .dp_lib/), an item registry (items.json, #140), a seed assembly manifest from the supplied components/instances, and the project.json container that ties them together. The result loads clean and merge_assembly consumes it unchanged once its components resolve. base_dir: the project root directory (created if absent). name: the project id (naming-convention checked). components/i…
| Parameter | Type | Description |
|---|---|---|
base_dir * | string | |
name * | string | |
components | ||
instances | ||
items | ||
master | ||
shared_parameters | ||
workspace | string | Run this call in this named workspace |
project_validate Project Validate
Validate a project.json container (issue #143 / D1): the schema stamp ("ankusdrive.project/1"), the naming convention on the project name, the conventional path fields, and — relative to the project directory — that the referenced manifest + item registry exist, the components directory is present, and a named master/skeleton is a real component of the assembly manifest. project: path to the project.json container. Returns {ok, problems, schema, name} — ok is True iff problems is empty.
| Parameter | Type | Description |
|---|---|---|
project * | string | |
workspace | string | Run this call in this named workspace |
project_check_references Project Check References
Reference-integrity guard (issue #143 / D1) — catch a broken cross-file reference *before* a merge (the chronic PDM failure mode). Loads a project's assembly manifest + item registry and checks every reference resolves: a moved / renamed / missing component file, a dangling item-ref (an unknown id, or a resolved file missing on disk), an instance naming an unknown component, and naming-convention violations. project: path to the project.json container. Returns {ok, problems} — ok is True iff every reference is live, so a broken reference is reported here i…
| Parameter | Type | Description |
|---|---|---|
project * | string | |
workspace | string | Run this call in this named workspace |
project_resolve_manifest Project Resolve Manifest
Resolve a project's item-ref components to file components and write a merge- ready manifest (issue #143 / D1, the deferred #140 seam). Each component naming an `item` (items.json identity, not a bare path) is lowered to a `{file}` component with the CAD artifact resolved from the registry, so merge_assembly consumes the result unchanged — renaming/moving a file updates the item's files[] in one place without breaking any reference. project: path to the project.json container. out: output manifest path (defaults to <manifest>.resolved.json next to it). Retur…
| Parameter | Type | Description |
|---|---|---|
project * | string | |
out | ||
workspace | string | Run this call in this named workspace |
where_used Where Used
Where-used / impact analysis (issue #142, C3; MULTI_AGENT.md §9): traverse the lockfile `depends_on` graph and report every parent that CONSUMES an item — the blast radius, so exactly those parents re-dispatch when the item changes. The lockfile records edges consumer -> consumed (lid depends_on housing); where-used is the reverse reachability of the item (everything that reaches it). lockfile: path to the lockfile (the JSON assembly_lock wrote). item: the item / component id to query. direct: if true, also surface only the immediate mates separately. Retur…
| Parameter | Type | Description |
|---|---|---|
item * | string | |
lockfile * | string | |
direct | boolean | |
workspace | string | Run this call in this named workspace |
change_impact Change Impact
The where-used impact report for a set of changed items over a lockfile graph (issue #142, C3) — surfaces the §9 `stale` set as an item-level impact report BEFORE a change is committed. lockfile: path to the lockfile (the §9 dependency graph). changed: the list of changed item / component ids (an ECO's affected set). Returns {changed, stale (the §9 immediate re-dispatch consumers), where_used (the full transitive blast radius), ok (true iff nothing is impacted)}.
| Parameter | Type | Description |
|---|---|---|
changed * | array | |
lockfile * | string | |
workspace | string | Run this call in this named workspace |
eco_validate ECO Validate
Validate an ECO (engineering change order) record (issue #142, C3) — the cheap front door. Checks the schema stamp, a non-empty id + affected item set, a present disposition, and an effectivity carrying exactly one of date|serial|revision. eco: the ECO object. Returns {ok, problems} — ok is True iff problems is empty.
| Parameter | Type | Description |
|---|---|---|
eco * | object | |
workspace | string | Run this call in this named workspace |
eco_create ECO Create
Build an ECO change-order record (issue #142, C3) — turn a change into a *record*, not a silent mutation (the diff IS the change order, mapping onto a git commit/PR). Optionally compute its where-used impact over a lockfile in the same call, so the blast radius travels with the record. id: the ECO id (e.g. "ECO-0001"). affected: the list of changed item / component ids. disposition: the change disposition (use_as_is | rework | scrap | revise | ...). effectivity: a dict with exactly one of date|serial|revision (when it takes effect). title / note: opti…
| Parameter | Type | Description |
|---|---|---|
affected * | array | |
disposition * | string | |
effectivity * | object | |
id * | string | |
interface_change | boolean | |
lockfile | ||
note | ||
out | ||
title | ||
workspace | string | Run this call in this named workspace |
baseline_create Baseline Create
Pin a labeled, immutable BASELINE (issue #142, C3) — a {item: revision + content fingerprint} snapshot over an items.json registry (a git-tag / lockfile over the item graph) for reproducible rebuilds. The fingerprint pins the artifact BYTES, so a rebuild is verifiable byte-for-byte. label: the baseline label (e.g. "v1.0"). registry: path to the items.json sidecar. items: optional subset of item ids to pin (default: every item). base_dir: artifact root for fingerprinting (defaults to the registry's directory). note: optional description. out: optional path…
| Parameter | Type | Description |
|---|---|---|
label * | string | |
registry * | string | |
base_dir | ||
items | ||
note | ||
out | ||
workspace | string | Run this call in this named workspace |
baseline_verify Baseline Verify
Verify a rebuild against a pinned baseline (issue #142, C3) — the reproducible- rebuild gate. Re-resolves every pinned item from the current registry + artifacts and checks it still matches the pinned rev AND content fingerprint; a drifted input (changed bytes, a bumped rev, a vanished item) is caught, never silently accepted. baseline: path to the baseline sidecar. registry: path to the current items.json sidecar. base_dir: artifact root for fingerprinting (defaults to the registry's directory). Returns {ok, label, drifted (item/field/expected/actual), missing}…
| Parameter | Type | Description |
|---|---|---|
baseline * | string | |
registry * | string | |
base_dir | ||
workspace | string | Run this call in this named workspace |
release_package Release Package
Produce the vendor/RFQ deliverable bundle for one item at one revision — STEP + drawings + BOM + inspection package + a checksummed manifest — gated by the item's lifecycle state and stamped with its ECO. Every piece of this exists as its own tool. What this adds is the guarantee that ties them together: the STEP, the PDF, the BOM and the title block all describe the SAME revision of the SAME item. That is the whole point of a release, and it is enforced BEFORE a single file is written: * the item must be in a releasable lifecycle state (`released`), or `dra…
| Parameter | Type | Description |
|---|---|---|
item * | string | |
out_dir * | string | |
registry * | string | |
cost_process | string | |
density | ||
draft | boolean | |
eco | ||
handle | ||
kinds | ||
material | ||
object | ||
pages | ||
process | string | |
quantity_breaks | ||
recursive | boolean | |
rfq | boolean | |
workspace | string | Run this call in this named workspace |
sheet_base Sheet Base
Start a sheet-metal part: the base flange, a closed straight-sided profile extruded to `thickness_mm`. Everything else (flanges, tabs, hems, the flat pattern, the DXF) hangs off the handle this returns. profile: [[x, y], ...] in the XY plane, implicitly closed. sketch: alternatively a handle to a closed, planar, straight-sided sketch — on any plane. Arcs are REJECTED rather than silently faceted, because a faceted flat pattern is a wrong flat pattern. material: any Materials-DB name (e.g. "Steel-A36", "AL6061-T6", "SS304"); it selects the K-factor…
| Parameter | Type | Description |
|---|---|---|
thickness_mm * | number | |
material | ||
name | string | |
profile | ||
sketch | ||
workspace | string | Run this call in this named workspace |
sheet_flange Sheet Flange
Bend a flange off a free edge of a sheet part. edge: a stable e_* tag from list_edges (or 'EdgeN'/int) on a STRAIGHT free edge of a flat region — a bend line is the intersection of two planes, so an arc cannot carry one and is rejected. angle_deg: the bend angle, i.e. the deviation from flat, so 90 is a right-angle flange. Must be in (0, 180]. inner_radius_mm: inside bend radius; defaults to the material thickness. direction: 'up' (toward the region's outward normal) or 'down'. length_from: what `length_mm` measures — the number most often misre…
| Parameter | Type | Description |
|---|---|---|
edge * | string | |
handle * | string | |
length_mm * | number | |
angle_deg | number | |
direction | string | |
feature_name | ||
inner_radius_mm | ||
k_factor | ||
length_from | string | |
name | string | |
offset_mm | number | |
width_mm | ||
workspace | string | Run this call in this named workspace |
sheet_tab Sheet Tab
Extend a sheet part with a coplanar tab — a flat ear off a free edge with no bend at all (a mounting lug, a weld tab, a snap-off). Mechanically it is a zero-angle flange and shares that code path exactly: `length_mm` is how far the tab reaches past the edge, `width_mm`/`offset_mm` place it along the edge (default: the whole edge). It adds no bend to the bend report and no bend line to the DXF, but it does grow the flat pattern. Returns the same dict sheet_flange does (angle_deg 0, inner_radius_mm 0).
| Parameter | Type | Description |
|---|---|---|
edge * | string | |
handle * | string | |
length_mm * | number | |
feature_name | ||
name | string | |
offset_mm | number | |
width_mm | ||
workspace | string | Run this call in this named workspace |
sheet_hem Sheet Hem
Fold a hem back on itself — the 180-degree return that stiffens a free edge and buries the sharp cut line so the part is safe to handle. kind: 'closed' (inside radius t/2, gap t) or 'open' (radius t, gap 2t). radius_mm / gap_mm: override the style directly; the gap between the returned leg and the parent is exactly 2R, so gap wins as radius = gap/2. length_mm is ALWAYS the return leg measured from the end of the bend: a 180-degree bend has no virtual apex to dimension to — the outside surfaces are parallel and never meet — so an 'outer' dimension would b…
| Parameter | Type | Description |
|---|---|---|
edge * | string | |
handle * | string | |
length_mm * | number | |
direction | string | |
feature_name | ||
gap_mm | ||
kind | string | |
name | string | |
offset_mm | number | |
radius_mm | ||
width_mm | ||
workspace | string | Run this call in this named workspace |
sheet_unfold Sheet Unfold
Develop a sheet part into its flat pattern — the blank the part is cut from — and report every bend. The flat pattern is derived from the bend tree, not reverse-engineered out of the fused solid, so it is exact rather than fitted: each bend contributes its bend allowance BA = angle·(R + K·t), the arc length of the neutral fibre. k_factor: pins K for every bend. bend_table: a shop's own measured rows [{thickness_mm, inner_radius_mm, angle_deg, allowance_mm | deduction_mm}] — a matching row OUTRANKS the chart, because the shop's press is the grou…
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
bend_table | ||
build | boolean | |
k_factor | ||
name | string | |
origin | ||
workspace | string | Run this call in this named workspace |
sheet_refold Sheet Refold
Fold a flat pattern back up and check it reproduces the part — the other half of the unfold gate. This does NOT replay the feature model. It reads the flat pattern back: each leg length is measured off the flat outline, walking outward from the bend's attachment past its reported bend allowance to the far edge of that region. So a wrong allowance, angle or bend direction lands the refolded solid somewhere the original is not, and this reports the disagreement instead of hiding it. handle: a sheet part to unfold and then refold. flat: alternatively a sheet_un…
| Parameter | Type | Description |
|---|---|---|
bbox_tol_mm | number | |
bend_table | ||
compare | ||
flat | ||
handle | ||
k_factor | ||
name | string | |
volume_tol_pct | number | |
workspace | string | Run this call in this named workspace |
sheet_flat_export Sheet Flat Export
Write the flat pattern as a LAYERED DXF — the file a laser, punch or press-brake shop actually quotes and cuts from. This is the deliverable the whole sheet-metal family exists to produce. Three layers, because a flat pattern without them is not a shop deliverable: CUT carries the closed outer profile and every hole; BEND_UP and BEND_DOWN carry one centreline per bend, so the operator reads the fold direction off the print rather than inferring it. DXF R12 ASCII in millimetres, written directly rather than through TechDraw — a flat pattern is not a drawing view…
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
path * | string | |
bend_table | ||
k_factor | ||
workspace | string | Run this call in this named workspace |
sheet_check Sheet Check
Press-brake manufacturability screen for a sheet part — four rules, each with the number it came from: min_bend_radius — an inside radius below the material's minimum (a corpus value per material: 3t for 6061-T6, 1t for A36, 0.5t for annealed 1100) cracks the outer fibre. min_flange_length — an outer leg under 4t + R has no die shoulder to sit on and dives into the vee. hole_to_bend — a hole whose EDGE is nearer the bend tangent than 2t + R draws into an…
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
bend_table | ||
hole_to_bend_t | ||
k_factor | ||
min_flange_t | ||
workspace | string | Run this call in this named workspace |