Skip to content
FunCoding

print3d

Model a part in Blender from an idea, a photo of an object, or the shop listing of something you would otherwise buy, slice it for the user's Bambu Lab X2D, P2S, X1 Carbon or A1, or an Elegoo Centauri Carbon or Carbon 2, and iterate until it prints clean and matches the photo.

Star
577
Category
Science
License
MIT
Last commit
Nov 28, 2026

skills/print3d/SKILL.md

View on GitHub

/print3d — idea to a printable part

print3d below is the print3d command line. When you have the print3d MCP tools, use those of the same names instead: they return the plate preview and overlays as images, and the host can ask the user before each one that writes. A job's files live in the report's job_dir, written below as jobs/<slug>.

idea / photo / text  →  model.py (Blender)  →  mesh  →  DFM + printability
        │                    ↑                         + likeness to the photo
    spec.json                └────────  advice: what to fix ───┘
                                              │
                                        slice → .3mf → user prints from Studio

Nothing here reaches the printer. The last step is a sentence handing the user a .3mf. Printing is theirs to do in Studio, with the plate in front of them.

1. Read the brief

Before writing a model for a new job, call the MCP doctor tool or run print3d doctor. Resolve any missing or unavailable Blender or Bambu Studio dependency first. Studio is ready when its executable is found; a failed version check is informational and does not block modelling. Windows and macOS read Studio metadata without launching it; Linux uses a best-effort help probe. Blender must pass its version probe. A null version means the probe could not identify a version; it does not mean the application is missing. Run the check again after changing the application paths or installing a dependency.

Size, text, colour, what the part has to do. Ask at most one question, and only when a missing number makes the part unprintable.

From a photo of an object: scaffold (step 2) for the slug, then work through references/from-photo.md before writing the model. It turns the photo into a spec.json of measured, given and assumed dimensions, and adds the likeness check that compares the model with the photo.

To replace something sold in a shop (a listing URL or a product name): also work through references/from-listing.md. The listing's stated dimensions scale its product photos, and the hand-off weighs the print against the price.

More than one part, more than one colour, or parts that fit together (a box and lid, a case in halves, a name in a second colour, a pin in a hole): read references/parts-and-fits.md before writing the model.

2. Scaffold

print3d make "<prompt>"

With no model yet this writes jobs/<slug>/model.py and stops, naming the path. Take the slug from that path.

3. Write the model

Replace the scaffold's body with the real part. The contract:

  • Plain bpy. 1 Blender unit == 1 mm.
  • params is in scope: prompt, slug, text, intent, size_mm, color, material, dims (name -> mm from spec.json) and fit (this printer's clearance per side for press, snug, slide, free). Size every mating feature from params["fit"], never from a guessed number.
  • Several parts: model each where it sits when assembled and name it with part(objects, name, color=, group=, rotate=, plate=, settings=); declare how two parts mate with fit(a, b, kind). Without part() every mesh is joined into one part.
  • Leave the geometry as mesh objects. The harness joins them, removes doubles, fills holes, recalculates normals, triangulates, centres the part, drops it on the bed and exports.
  • Orientation is yours. Studio's auto-orient is off, so what you model is what prints.

examples/nameplate.py is the worked reference. references/modelling.md has the bpy recipes, the gotchas that cost an iteration, and the move each check asks for.

4. Run the loop until it goes green

print3d make "<prompt>"

Models, DFM-checks, slices with the pinned presets of the chosen printer, and reports. The run is red when severity is error — exit code 1, status: needs_work.

While red: read advice, apply the fix each note carries to model.py, run again. Each note is phrased as a change to the model, because that is where the fix lives. jobs/<slug>/history.jsonl accumulates what each iteration changed.

Hand over only once it is green.

5. Look at the plate

Read the PNG at plate_png (each plates[].png for several plates), and each likeness[].overlay when there is one. The numbers go green on parts that are printable and still wrong — mirrored text, a hole in the wrong face, letters too shallow to read. Look before you hand it over.

viewer is jobs/<slug>/view.html: the model in 3D, to rotate, zoom, hide parts and pull them apart. When you have a preview pane (Hermes desktop's desktop_preview, action open, with that path as the url), open it there so the user can turn the part around beside the chat. Otherwise give the path to open in a browser. print3d view <slug> rebuilds it for an older job.

6. Hand off

print3d handoff <slug>

writes jobs/<slug>/handoff/: a print sheet the user can send on, renders of the part assembled (and exploded, for several parts), the .3mf and an STL per part. Look at the renders: a colour that does not show, or a part in the wrong place, is plain there.

Report time, grams and layers, and for several parts the colours and how each declared fit measured. From a photo, also list which dimensions were measured, given, listed or assumed, and the unknowns. From a listing, put the grams and time beside the listing's price. Then give the path:

jobs/<slug>/slice/<slug>.3mf

That is the project file. The .gcode.3mf beside it is a sliced job and Studio's Prepare tab rejects it as having no geometry. Tell the user to open the .3mf, check the preview, and print from Studio — and offer another iteration if the preview is not what they wanted.

Done when

print3d make exits 0, no note is at error, you have looked at the plate PNGs, any likeness overlays and the hand-off renders, and the user has the .3mf path and the print sheet.

The machine

print3d slices for one printer at a time. Before the first run, check which one with printer (print3d printer on the command line), and switch when the user owns another: printer(choose="p2s-0.4"). The choice is saved. Every make report names the printer in printer; tell the user which printer the .3mf is set up for.

X2D (x2d-0.4, the default)P2S (p2s-0.4)X1C (x1c-0.4)A1 (a1-0.4)
Nozzlestwo, 0.4 mmone, 0.4 mmone, 0.4 mmone, 0.4 mm
Build volume256 × 256 × 261 mm256 × 256 × 256 mm256 × 256 × 250 mm256 × 256 × 256 mm
Colourstwo print without a filament changeevery colour after the first is an AMS filament change, with a purge and a prime towerlike the P2Slike the P2S

The Elegoo Centauri Carbon (elegoo-cc-0.4) and Centauri Carbon 2 (elegoo-cc2-0.4) are one-nozzle printers like the P2S, X1C and A1, sliced in ElegooSlicer with Elegoo PLA; each colour after the first is a filament change.

All: 0.20 mm layers, textured PEI plate, PLA (Bambu PLA Basic on the Bambu Lab printers). The pinned processes have supports off — that is why an overhang note is a real defect and not a setting to flip.

Similar Skills

graphify

GRGraphify-Labs/graphify155k2,124 new stars in the last 7 days

wiki-query

PApaperclipai/paperclip119k1,727 new stars in the last 7 days

Official

clinical-case-report

NEnexu-io/open-design110k1,079 new stars in the last 7 days

style-sampling

HEheygen-com/hyperframes93k3,834 new stars in the last 7 days

academic-paper-review

BYbytedance/deer-flow86k245 new stars in the last 7 days

systematic-literature-review

BYbytedance/deer-flow86k245 new stars in the last 7 days