Reference¶
Generated from the code each time the site is built, so it always matches the version the site was built from. For explanations, follow the links on the other pages.
b123d-print¶
The CLI; see CLI and Python.
usage: b123d-print [-h] [--root ROOT] [--version]
{init,new,build,check,metrics,faces,template,styles,printer,compare,to-step,setup-ssh,ssh-serve,pull,push,config,list,examples,mcp}
...
build123d part workflow: scaffold, build, check
positional arguments:
{init,new,build,check,metrics,faces,template,styles,printer,compare,to-step,setup-ssh,ssh-serve,pull,push,config,list,examples,mcp}
init create a workspace (b123d-print.toml, AGENTS.md, parts/)
new scaffold parts/<name>/<name>.py from the template
build export STEP/STL/3MF/PNG + section views
check run checks; exit 1 on failure
metrics design metrics and the style's suggestions (filament, time, edges, ...)
faces list a part's flat faces with their ids (for a face template)
template a fit-test template: a thin print cut from the part to check size, holes
and fits
styles list the design styles (yours and the built-in ones), or show one
printer optional printer/material profile (default: generic)
compare compare a part with a reference (STL/3MF/STEP); exit 1 if it fails the
thresholds
to-step convert an STL/3MF mesh to a STEP solid (coplanar triangles merged into
faces; curves stay faceted) and report what changed
setup-ssh on the server: the authorized_keys line that gives one client key the MCP
server in one workspace, and the client config to match
ssh-serve the forced command in authorized_keys (written by setup-ssh): runs the MCP
server, `pull` or `version` for $SSH_ORIGINAL_COMMAND, refuses anything
else
pull on the client: copy a part (script, out/, ref/) from an SSH server into
parts/<part>/ of the project folder
push on the client: copy a model to remix (STL/3MF/STEP) to an SSH server, into
parts/<part>/ref/
config show the settings in effect
list list parts in the workspace
examples list the bundled example parts
mcp run the MCP server: the same as b123d-print-mcp, with all its options
(b123d-print mcp --help); lets `uvx b123d-print mcp` start it
options:
-h, --help show this help message and exit
--root ROOT workspace root (default: nearest b123d-print.toml, else the cwd)
--version show program's version number and exit
b123d-print init¶
usage: b123d-print init [-h] [--update-agents] [dir]
positional arguments:
dir
options:
-h, --help show this help message and exit
--update-agents replace AGENTS.md with this version's text
b123d-print new¶
usage: b123d-print new [-h] [-d DESCRIPTION] [--from EXAMPLE] name
positional arguments:
name
options:
-h, --help show this help message and exit
-d DESCRIPTION, --description DESCRIPTION
--from EXAMPLE start from a bundled example (see `b123d-print examples`)
b123d-print build¶
usage: b123d-print build [-h] [--variant VARIANT] [--formats FORMATS] [parts ...]
positional arguments:
parts part names or script paths (default: all)
options:
-h, --help show this help message and exit
--variant VARIANT
--formats FORMATS comma-separated, from step,stl,3mf,png or all (default: the formats setting)
b123d-print check¶
usage: b123d-print check [-h] [--variant VARIANT] [--json] [-v] [parts ...]
positional arguments:
parts part names or script paths (default: all)
options:
-h, --help show this help message and exit
--variant VARIANT
--json
-v, --verbose also list passing checks
b123d-print metrics¶
usage: b123d-print metrics [-h] [--variant VARIANT] [--style STYLE] [--up UP] [--json] [parts ...]
positional arguments:
parts part names or script paths (default: all)
options:
-h, --help show this help message and exit
--variant VARIANT
--style STYLE override the part's STYLE: functional, modern, least_cost, rugged, soft
--up UP the side that points up in use, for water traps: +X, -Y, ... (default: UP,
else +Z)
--json
b123d-print faces¶
usage: b123d-print faces [-h] [--variant VARIANT] [--part NAME] [--highlight ID] [--json] part
positional arguments:
part part name or script path
options:
-h, --help show this help message and exit
--variant VARIANT
--part NAME which printable part (default: the only one)
--highlight ID also draw the part with this face (id or side) in red
--json
b123d-print template¶
usage: b123d-print template [-h] (--slice PLANE:AT | --face ID | --crop X,Y,Z:SX,SY,SZ)
[--thickness THICKNESS] [--no-label] [--no-base] [--name NAME]
[--variant VARIANT] [--part NAME] [--formats FORMATS]
part
positional arguments:
part part name or script path
options:
-h, --help show this help message and exit
--slice PLANE:AT the part between two planes around AT: XY:3 (Z=3), XZ:0 (Y), YZ:-5 (X)
--face ID one flat face as a plate: an id from `faces`, a side (bottom, top, ...) or
a point x,y,z on it
--crop X,Y,Z:SX,SY,SZ
the part inside a box: center and size in mm
--thickness THICKNESS
mm (default 1.2)
--no-label no engraved label
--no-base never add the thin base plate (slice, crop)
--name NAME the template id in file names (default: from the arguments, e.g. xy3)
--variant VARIANT default: the first variant
--part NAME which printable part (default: the only one)
--formats FORMATS comma-separated, from step,stl,3mf,png or all (default: the formats
setting)
b123d-print styles¶
usage: b123d-print styles [-h] [name]
positional arguments:
name a style to show, with based_on applied
options:
-h, --help show this help message and exit
b123d-print printer¶
usage: b123d-print printer [-h] {list,show,use,hole-comp,calibrate} ...
positional arguments:
{list,show,use,hole-comp,calibrate}
list search the printer profiles (from OrcaSlicer's library + yours)
show show a printer (default: the active one)
use set the active printer in your user config; 'generic' clears it
hole-comp store a measured hole compensation for the active printer + material
calibrate store a value measured with a calibration coupon for the active printer +
material
options:
-h, --help show this help message and exit
b123d-print printer list¶
usage: b123d-print printer list [-h] [query ...]
positional arguments:
query
options:
-h, --help show this help message and exit
b123d-print printer show¶
usage: b123d-print printer show [-h] [name]
positional arguments:
name
options:
-h, --help show this help message and exit
b123d-print printer use¶
usage: b123d-print printer use [-h] [--material MATERIAL] name
positional arguments:
name
options:
-h, --help show this help message and exit
--material MATERIAL pla, petg, asa, abs, tpu or your own
b123d-print printer hole-comp¶
usage: b123d-print printer hole-comp [-h] value
positional arguments:
value
options:
-h, --help show this help message and exit
b123d-print printer calibrate¶
usage: b123d-print printer calibrate [-h]
{hole_comp,hole_comp_h,clearance,press_fit,free_fit,pip_clearance,max_overhang,max_bridge}
value
positional arguments:
{hole_comp,hole_comp_h,clearance,press_fit,free_fit,pip_clearance,max_overhang,max_bridge}
value
options:
-h, --help show this help message and exit
b123d-print compare¶
usage: b123d-print compare [-h] [--json] [--threshold NAME=VALUE] [--samples SAMPLES] [--no-icp]
[--seed SEED] [--image IMAGE]
reference candidate
positional arguments:
reference
candidate
options:
-h, --help show this help message and exit
--json
--threshold NAME=VALUE
override a pass/fail threshold, e.g. hausdorff_mm=2 (repeatable; see
b123d_print.compare.Criteria)
--samples SAMPLES surface points per part (default 20000)
--no-icp skip the ICP refinement after the axis search
--seed SEED
--image IMAGE also write a deviation view (PNG) here
b123d-print to-step¶
usage: b123d-print to-step [-h] [-o OUTPUT] [--scale SCALE] [--max-triangles MAX_TRIANGLES]
[--no-merge]
input
positional arguments:
input the .stl or .3mf (or .step, to check it)
options:
-h, --help show this help message and exit
-o OUTPUT, --output OUTPUT
the .step to write (default: next to the input)
--scale SCALE a factor or the unit the file is in: inch, cm, m, ... (default 1: mm)
--max-triangles MAX_TRIANGLES
refuse bigger meshes (default: the max_triangles setting)
--no-merge keep one face per triangle
b123d-print setup-ssh¶
usage: b123d-print setup-ssh [-h] --key KEY --workspace WORKSPACE [--host HOST] [--add]
[--authorized-keys AUTHORIZED_KEYS]
options:
-h, --help show this help message and exit
--key KEY the client's public key file (.pub), or - for stdin
--workspace WORKSPACE
a name (-> ~/parts/<name>) or a folder path
--host HOST the name clients reach this machine by (default: its FQDN)
--add also put the line into authorized_keys (replaces this key's earlier
b123d-print line)
--authorized-keys AUTHORIZED_KEYS
file to add it to (default: ~/.ssh/authorized_keys)
b123d-print ssh-serve¶
usage: b123d-print ssh-serve [-h] --workspace WORKSPACE [--dest DEST] [--timeout TIMEOUT]
[--check-timeout CHECK_TIMEOUT]
options:
-h, --help show this help message and exit
--workspace WORKSPACE
the workspace this key is pinned to
--dest DEST user@host as clients see it, for the pull command export suggests
--timeout TIMEOUT seconds per build (default 120)
--check-timeout CHECK_TIMEOUT
seconds per check run (default 300, or --timeout if longer)
b123d-print pull¶
usage: b123d-print pull [-h] --from USER@HOST [--formats FORMATS] [--variant VARIANT] [-o OUT]
[--ssh SSH]
part
positional arguments:
part
options:
-h, --help show this help message and exit
--from USER@HOST the server, as in your MCP config
--formats FORMATS only these out/ files, comma-separated, from step,stl,3mf,png (default: every
file in out/)
--variant VARIANT only this variant's out/ files ('standard' for the default one)
-o OUT, --out OUT the project folder; the part goes to <it>/parts/<part>/ (default: the current
folder)
--ssh SSH ssh command and options, e.g. 'ssh -i ~/.ssh/b123d_print -p 2222' (default:
ssh)
b123d-print push¶
usage: b123d-print push [-h] --part PART --to USER@HOST [--name NAME] [--overwrite] [--ssh SSH]
file
positional arguments:
file
options:
-h, --help show this help message and exit
--part PART the part it is for (the folder is created if needed)
--to USER@HOST the server, as in your MCP config
--name NAME file name on the server (default: the file's own name)
--overwrite replace a reference file of the same name
--ssh SSH ssh command and options (default: ssh)
b123d-print config¶
usage: b123d-print config [-h]
options:
-h, --help show this help message and exit
b123d-print list¶
usage: b123d-print list [-h]
options:
-h, --help show this help message and exit
b123d-print examples¶
usage: b123d-print examples [-h]
options:
-h, --help show this help message and exit
b123d-print mcp¶
usage: b123d-print mcp ...
positional arguments:
args
b123d-print-mcp¶
The MCP server; see Connect your MCP client.
usage: b123d-print-mcp [-h] [--workspace WORKSPACE] [--timeout TIMEOUT]
[--check-timeout CHECK_TIMEOUT] [--max-builds MAX_BUILDS]
[--transport {stdio,http}] [--host HOST] [--port PORT]
[--allowed-hosts ALLOWED_HOSTS] [--shutdown-grace SHUTDOWN_GRACE]
[--public-url PUBLIC_URL] [--link-ttl LINK_TTL]
[--retention-days RETENTION_DAYS] [--tokens-file TOKENS_FILE]
[--job-queue JOB_QUEUE] [--insecure-no-auth] [--healthcheck]
{token,worker} ...
b123d-print MCP server: design, check and export 3D-printable build123d parts from any MCP client.
Part scripts are model-written code: every build runs in a sandboxed subprocess.
positional arguments:
{token,worker}
token manage the named tokens in --tokens-file
worker run builds handed over through --queue (pairs with the server's --job-
queue)
options:
-h, --help show this help message and exit
--workspace WORKSPACE
folder with b123d-print.toml / parts/ (default: $B123D_PRINT_WORKSPACE,
else the cwd)
--timeout TIMEOUT seconds per build, render, section or export (default 120;
$B123D_PRINT_TIMEOUT)
--check-timeout CHECK_TIMEOUT
seconds per check run, which builds the part and runs every check (on a
remix, on the original too); near the limit it stops and returns the
findings it has (default: 300, or --timeout if longer;
$B123D_PRINT_CHECK_TIMEOUT)
--max-builds MAX_BUILDS
build processes at once, across all clients and all server processes of
this user (one per SSH session); more calls wait (default: half the CPUs;
$B123D_PRINT_MAX_BUILDS)
--transport {stdio,http}
stdio (default) or http: Streamable HTTP at /mcp ($B123D_PRINT_TRANSPORT)
--host HOST http: address to bind (default 127.0.0.1; $B123D_PRINT_HOST)
--port PORT http: port (default 8000; $B123D_PRINT_PORT)
--allowed-hosts ALLOWED_HOSTS
http: comma-separated Host header values to accept (DNS-rebinding check;
$B123D_PRINT_ALLOWED_HOSTS)
--shutdown-grace SHUTDOWN_GRACE
http: on SIGTERM/Ctrl-C, seconds to let running calls finish before their
builds are killed (default 30)
--public-url PUBLIC_URL
http: base URL clients reach the server at, for download links, e.g.
https://cad.example.com (default: from the request;
$B123D_PRINT_PUBLIC_URL)
--link-ttl LINK_TTL http: seconds a download link stays valid (default 3600;
$B123D_PRINT_LINK_TTL)
--retention-days RETENTION_DAYS
http: remove a named workspace (workspaces/<name>) nobody has used for
this many days; checked at startup and hourly, never while it is in use; 0
= never (default 30; $B123D_PRINT_RETENTION_DAYS)
--tokens-file TOKENS_FILE
http: named tokens, each limited to workspaces (see `token add`); re-read
when it changes ($B123D_PRINT_TOKENS_FILE)
--job-queue JOB_QUEUE
http: hand builds to a separate `worker` process through this folder
instead of running them here (the Docker setup's network-less worker
container; $B123D_PRINT_JOB_QUEUE)
--insecure-no-auth http: run without any token (otherwise $B123D_PRINT_TOKENS_FILE,
$B123D_PRINT_TOKEN or $B123D_PRINT_TOKEN_FILE is required)
--healthcheck check the running HTTP server's /health and exit (for Docker)
MCP server¶
What the server registers, with the descriptions the model sees; see MCP tools and prompts.
Tools¶
list_parts¶
list_parts()
List the part scripts in the workspace, with the settings in effect.
use_printer¶
use_printer(name: str = "", material: str = "", search: str = "")
Optional printer profile (default is generic mode). search: find printer names ("bambu a1", "prusa mk4"). name: make it active (saved in the user's config, or over HTTP and SSH in this workspace's b123d-print.toml; "generic" clears it). material: pla, petg, asa, abs, tpu or the user's own. Only change the printer when the user asks for it.
new_part¶
new_part(name, description: str = "", example: str = None, show_code: bool = false)
Create parts/<name>/<name>.py from the template (Dims dataclass, build(d), VARIANTS, views, checks). name: lower_snake_case. example: copy a bundled example instead (see list_parts), e.g. 'hole_coupon' to calibrate hole compensation. Returns a short confirmation; the template is the b123d-print://template resource (or read_part), show_code=True returns the new file's code here. Usually the next step is write_part with the whole script.
read_part¶
read_part(name)
Return the current code of a part script.
write_part¶
write_part(name, code)
Replace the whole part script with code (create the part with new_part first).
The script must define build(d) (+ Dims, VARIANTS); see b123d-print://guide. Then call build_part.
build_part¶
build_part(name, variant: str = None)
Run the part script (sandboxed, with a timeout) and report, per variant and part: bounding box size and min/max (mm), volume (mm^3), solid count, is_valid, the Dims values, and any error with its traceback. Writes no files. variant: key from VARIANTS ('standard' = '').
render_preview¶
render_preview(name, variant: str = None, parts: str = None, size: str = "normal", inline: bool = true)
Render six views (iso, top, front, right, iso from below, bottom) as a PNG image. parts: comma-separated part names from build() (several are laid out side by side), 'assembly' (assembled position with stand-ins), or omit: the assembly if the script has one, else every printable part side by side. One variant (default: the first). size: 'normal' or 'small' (~800 px wide, cheaper). inline=False returns only the file (over HTTP: its download link), not the image itself. Remote server (HTTP/SSH): the files stay on the server, as a temporary working copy deleted when unused; bring the part home with download_part (one zip in the parts/<name>/ layout). Never use ssh, scp or a shell on the server: there is none.
section¶
section(name, plane, at, variant: str = None, parts: str = None, size: str = "normal", inline: bool = true)
Cross-section as a PNG image, each part in its own color. plane: 'XY' (at = Z height), 'XZ' (at = Y) or 'YZ' (at = X), in mm. parts: default the assembly if the script has one (shows fit and clearances), else all printable parts; or comma-separated names. size: 'normal' or 'small' (~800 px wide). inline=False returns only the file (over HTTP: its download link), not the image itself. Remote server (HTTP/SSH): the files stay on the server, as a temporary working copy deleted when unused; bring the part home with download_part (one zip in the parts/<name>/ layout). Never use ssh, scp or a shell on the server: there is none.
check¶
check(name, variant: str = None)
Run the print checks: validity, overlap between assembly parts (incl. stand-ins), overhangs > 45 deg from vertical in print orientation (bed face ignored) and bridge spans, thin features (walls under one line width fail), round-topped horizontal holes, fillets on bed edges, gaps between parts printed in place, the script's Wall checks (thinnest material around deep cuts) and Probes. Fix every FAIL; report every WARN. On a remote server (HTTP/SSH) the part is not on the user's machine until download_part brings it home.
design_metrics¶
design_metrics(name, variant: str = None, style: str = "", up: str = "", as_json: bool = false)
Design numbers for the design review, per printable part: size and proportions, filament (simple estimate, roughly +-20 %) and cost, print time (rough estimate), supports, shallow slopes that show layer steps, edge treatment (sharp / filleted / chamfered shares, distinct radii and chamfer sizes), mirror symmetry, screw sizes, seam corners and water traps; then the suggestions the part's style triggers, each citing its DS-* rule. Run it after check passes. style: override the part's STYLE (functional, modern, least_cost, rugged, soft, or a style file of the user's: list_parts shows them). up: the direction that points up in use for the water-trap check (+X, -Y, ...; default the script's UP, else +Z). as_json: the full numbers as JSON instead of the text report. Changes nothing.
export¶
export(name, variant: str = None, formats: str = None, parts: str = None, embed: bool = false)
Export printable parts to parts/<name>/out/. Default: every part, all variants.
parts: comma-separated part names from build() to export only those; variant: one variant.
formats: comma-separated from step (other CAD: Onshape, Fusion, FreeCAD), stl and 3mf
(slicers; 3MF keeps units), png (6-view preview + section views), or 'all'. Omit to use the
user's formats setting (default: all four). Ask the user which they want if unclear.
Over HTTP (a remote server) each file comes with a download link (no token needed, expires)
and a b123d-print://files/ resource link; download_part gets the whole part (script, out/,
ref/) in one zip. embed=True also puts files up to 2 MB into the result itself, for clients
that can neither fetch URLs nor read resources.
Remote server (HTTP/SSH): the files stay on the server, as a temporary working copy deleted
when unused; bring the part home with download_part (one zip in the parts/<name>/ layout).
Never use ssh, scp or a shell on the server: there is none.
list_faces¶
list_faces(name, variant: str = None, part: str = None, highlight: int | str = None, size: str = "normal", inline: bool = true)
The flat faces of a printable part, for picking one for a face fit-test template (make_template kind='face'): stable ids (1 = the largest; the same geometry always gets the same ids, changed geometry may renumber), outward normal and side (bottom, top, front, back, left, right), area, center, bounding box, round holes (diameter, center) and other openings; curved faces are only counted. part: which printable part (default: the only one). highlight: a face id or side; also returns a picture of the part with that face in red, to confirm the choice with the user before making the template. size: 'normal' or 'small'. Remote server (HTTP/SSH): the files stay on the server, as a temporary working copy deleted when unused; bring the part home with download_part (one zip in the parts/<name>/ layout). Never use ssh, scp or a shell on the server: there is none.
make_template¶
make_template(name, kind, plane: str = None, at: float = None, face: int | str = None, center: array | str = None, size: array | str = None, thickness: float = None, label: bool | str = true, base: bool = true, variant: str = None, part: str = None, formats: str = None, inline: bool = true)
A fit-test template: a quick thin print cut from the real part (same hole compensation and
clearances) to check size, hole pattern and mating fits before printing the whole part. kind:
'slice' (plane XY/XZ/YZ at = Z/Y/X: the part between two planes thickness apart, centered
on at), 'face' (face: an id from list_faces, a side such as 'bottom', or 'x,y,z' on it: that
flat face with its holes as a plate; a side means the largest face facing that way) or 'crop' (center, size: x,y,z in mm: the part inside
that box, with a thin base plate where it needs one; base=False: never). thickness: mm
(default 1.2). label: engrave '<part> <id>' (default), your own text, or false; skipped when
there is no room. The template is laid flat (template face down, Z=0) and checked like a
part. Writes parts/<name>/out/<name>template<id>.* in formats (default: the formats
setting); with png also <...>_where.png, the part with the template's source in red (returned
as the image; inline=False: only the file). Confirm the face or region with the user first
(list_faces with highlight).
Remote server (HTTP/SSH): the files stay on the server, as a temporary working copy deleted
when unused; bring the part home with download_part (one zip in the parts/<name>/ layout).
Never use ssh, scp or a shell on the server: there is none.
download_part¶
download_part(name, variant: str = None, formats: str = None, embed: bool = false)
Bring a whole part home from a remote server, in the same layout a local install writes:
parts/<name>/<name>.py, parts/<name>/out/ (exports, renders, sections) and parts/<name>/ref/
(reference models). Over HTTP: ONE signed link (no token needed, expires) to a zip of all of
it; run curl -fLo <name>.zip '<link>' and unzip it in the project folder, then check the
files are there. Over SSH: the b123d-print pull command that writes the same files. Locally
(stdio): says where the files already are. variant: only that variant's out/ files ('standard'
= ''); formats: only those out/ files (step, stl, 3mf, png); the script and ref/ always come.
embed=True also puts the zip (up to 8 MB) into the result, for clients that can neither fetch
URLs nor read resources. Call it as the last step of remote work, before reporting.
Remote server (HTTP/SSH): the files stay on the server, as a temporary working copy deleted
when unused; bring the part home with download_part (one zip in the parts/<name>/ layout).
Never use ssh, scp or a shell on the server: there is none.
compare¶
compare(reference, candidate, thresholds: str = "", image: bool = false, size: str = "normal", inline: bool = true)
Compare a part with a reference model: bounding box, volume and surface area differences, surface distances (mean, Hausdorff) after aligning orientation, an F-score, a 0-100 score and pass/fail. reference, candidate: STL, 3MF or STEP files inside the workspace, as paths relative to it (e.g. 'refs/bracket.stl', 'parts/bracket/out/bracket.3mf'). thresholds: optional overrides, comma-separated name=value (e.g. 'hausdorff_mm=2,volume_rel=0.05'). image: also return a view of the reference colored by deviation (green = matches, red = off); size: 'normal' or 'small' (~800 px wide); inline=False returns only its file (over HTTP: a link). Remote server (HTTP/SSH): the files stay on the server, as a temporary working copy deleted when unused; bring the part home with download_part (one zip in the parts/<name>/ layout). Never use ssh, scp or a shell on the server: there is none.
upload_reference¶
upload_reference(part, filename, data_base64: str = "", overwrite: bool = false)
Get an original model (STL, 3MF or STEP) onto the server, into parts/<part>/ref/<filename>,
to remix it (the part folder may not exist yet). With data_base64 (the whole file, base64) it
is stored now, up to 50 MB; that is only practical for small files, since the model has to
write out every byte. Without it, the result says how the USER copies the file: over HTTP a
signed upload link for curl -fT <file> '<link>' (no token needed, expires), over SSH the
b123d-print push command, locally the folder to copy it into. Then describe_model.
describe_model¶
describe_model(part, file, scale: str = "", image: bool = true, size: str = "normal", inline: bool = true)
Inspect an original model before remixing it: format, units (and whether they look wrong), size, volume, triangles and faces before/after merging coplanar triangles, how much is curved (faceted), round holes (diameter, axis, center), repairs needed, the designer/license metadata the file carries, and a suggestion: MODIFY it or REDRAW it. part: the part it is for. file: a name in parts/<part>/ref/ (or a workspace path such as 'refs/x.stl'). scale: '' (as the file says), a factor, or the unit the file was drawn in ('inch', 'cm'). image: also a 6-view render (saved as parts/<part>/out/<file>_original.png).
before_after¶
before_after(name, variant: str = None, size: str = "normal", inline: bool = true)
For a remix: the original and the remix side by side, and the original colored by how far the remix is from it (compare's deviation view: green = unchanged, red = changed), with compare's score and metrics. The original is what build() loads with import_model, or what the script's original(d) returns. export writes the same two images when it writes PNGs.
Prompts¶
design_part_from_photos¶
Arguments: description (optional).
Design a new part from photos and measurements: confirm dimensions first, then model, verify and report.
modify_part¶
Arguments: name, change.
Change an existing part, keeping its conventions, and re-verify.
remix_part¶
Arguments: name, source (optional), change (optional).
Remix someone else's model (STL, 3MF or STEP): inspect it, choose MODIFY or REDRAW, confirm the changes, then build, check (inherited vs new findings) and export.
verify_part¶
Arguments: name.
Review an existing part against the rules and report findings.
design_review¶
Arguments: name, style (optional).
Review a part that passes the print checks for its purpose and design style: metrics, renders, 3-7 concrete suggestions with rule IDs. Changes nothing without the user's OK.
fit_test¶
Arguments: name, what (optional).
Make a fit-test template of a part: a quick thin print of a face, slice or region, to check size, hole pattern and mating fits before the full print.
calibrate_hole_comp¶
Arguments: none.
Walk through measuring HOLE_COMP with the calibration coupon.
Resources¶
| URI | Type | What |
|---|---|---|
b123d-print://guide |
text/markdown |
The workflow and print rules (same text as AGENTS.md). |
b123d-print://template |
text/x-python |
The part-script template new_part starts from. |
b123d-print://files/{workspace}/{+path} |
application/octet-stream |
A file the server wrote (parts/<part>/out/...), in this session's own workspace ('_' = the root workspace). Tool results link to these; over HTTP the same files have download links. |
b123d-print://download/{workspace}/{part} |
application/zip |
A whole part as a zip in the local layout (parts/<part>/<part>.py, out/, ref/), in this session's own workspace; download_part links to it. |
Settings¶
The config.Settings fields; see Settings.
| Key | Default | Meaning |
|---|---|---|
hole_comp |
0.0 |
mm added to hole diameters when cutting (printed holes come out small) |
hole_comp_h |
null |
the same for horizontal holes (axis in XY); default: hole_comp |
clearance |
0.2 |
mm per side between mating parts that slide (the default fit) |
press_fit |
0.05 |
mm per side for parts pressed together |
free_fit |
0.3 |
mm per side for parts that turn or move freely |
pip_clearance |
0.3 |
mm between parts printed in place; the gap check fails below it |
min_wall |
0.8 |
mm; wall checks fail below this unless a check sets its own minimum |
max_overhang |
45.0 |
deg from vertical; steeper downward faces are flagged |
max_bridge |
10.0 |
mm; longer bridges (flat ceilings between two walls) warn |
max_triangles |
50000 |
import_model refuses meshes with more triangles (simplify them first) |
printer |
"" |
optional printer profile (b123d-print printer list); "" = generic |
material |
"" |
optional material profile: pla, petg, asa, abs, tpu or your own |
formats |
["step", "stl", "3mf", "png"] |
what export writes: step (other CAD), stl / 3mf (slicer), png (previews) |
style |
"" |
design style for parts without STYLE: functional (default), modern, least_cost, rugged, soft or your own |
filament_price |
null |
price per kg; design_metrics shows a cost when set |
print_flow |
10.0 |
mm^3/s for the rough print-time estimate (standard hotend 8-12, high-flow 20+) |
parts_dir |
"parts" |
workspace-relative folder holding <name>/<name>.py |