agentscad-fdm-dfam
Skill16 starsChanged 16 days agoMITView on GitHub
Automates design-for-additive-manufacturing on an existing STEP part for FDM printing with the AgentsCAD method — B-Rep → LLM-readable face/adjacency JSON, rule-based 45° overhang detection, tool-grounded reorientation, programmatic teardrops/chamfers/fillets, and kernel + visual verification with a modified STEP and report. Use when the user has a CAD part to 3D print and asks about overhangs, supports, print orientation, teardrop holes, or making a part printable.
- Installs packages
In this repository34 other files it gives its agents.
- skills/cadsmith-text-to-cad/references/agents.mdAGENTS.md
- am-alloy-screeningSkill
- am-literature-ragSkill
- cadsmith-text-to-cadSkill
- cfd-simulation-setupSkill
- design-review-packageSkill
- dfm-reviewSkill
- drawing-gdt-reviewSkill
- engineering-calc-reportSkill
- equation-discoverySkill
- image2gcodeSkill
- lattice-inverse-designSkill
- linkage-synthesisSkill
- llm-3d-print-monitorSkill
- llm-mechanical-designerSkill
- lpbf-defect-predictionSkill
- lpbf-superresSkill
- machine-element-sizingSkill
- material-selectionSkill
- mechanical-teardownSkill
- mechanics-visualsSkill
- meltpool-geometrySkill
- parametric-part-cadSkill
- query2cad-freecadSkill
- quick-feaSkill
- rocketsmithSkill
- sketch-to-cadSkill
- sls-process-optimizationSkill
- stress-field-surrogateSkill
- thermal-fluids-calcSkill
- thermal-porositySkill
- tolerance-stackupSkill
- worked-problem-generatorSkill
- my-new-skillSkill
The file
Files
AgentsCAD: DFAM for FDM parts
Paper: E. George, C. Keefe, P. Pak, A. Barati Farimani, AgentsCAD: Automated Design for Manufacturing of FDM Parts via Multi-Agent LLM Reasoning and Geometric Feature Recognition, arXiv:2607.02448.
This is a blackboard pipeline. Deterministic phases (parse, overhang detection, adjacency, modification, re-check) are code. You are the Design Reasoner, and you must ground every rotation in tool output. The paper's ablation found that without the orientation tools the agent hallucinated rotation angles every time, and with them those errors disappeared.
Setup: pip install cadquery pyvista numpy. D = scripts/dfam.py.
Workflow
- Parse to the blackboard.
python $D analyze part.step --out bb.jsonbb.jsonholds per-face type, area, centroid, normal or axis, tilt angles, radius of gyration, elongation index, thelinksadjacency list, rule-basedfeature_hints(a light stand-in for the paper's GraphSAGE labels),overhangs, and a summary. Overhangs are flagged by rule (more than 45° from vertical facing down, not on the bed; horizontal bores by the downward-facing fraction of their sampled normals). If the summary shows 0 actionable overhangs, say so and stop. The paper skips the modifier and verifier in that case. - Recall similar parts (RAG memory, optional):
python $D memory query --bb bb.json --store dfam_memory.jsonl. - Reason in the mandatory order in
references/reasoner_rules.md: reorient → local modifications → supports → split.python $D candidates part.step # scripted orientation sub-phase, ≤4 candidates, ranked python $D lay part.step --face 3 # exact rx/ry to put face 3 on the bed + overhangs after python $D orient part.step --rx 90 # check any rotation you consider - Write
mods.json(typed operations by original face ID, reorient last) and apply it:python $D modify part.step --plan mods.json --out part_dfam.step - Verify.
This checks kernel validity, a single solid, volume Δ%, and re-checks overhangs.python $D verify part.step part_dfam.step --plan mods.json --out verifypass_deterministicmust be true. Then answer the generated yes/novlm_questionsfromverify_4view.png, one per modification plus the integrity questions. Use an independent subagent for this when possible; the paper used a separate VLM. Treat "unclear" honestly: low render resolution isn't a defect, but say so. - Report: a human-readable table of each overhang (face, kind, angle), the action taken and why, the before/after summary, volume Δ, the final orientation (bed face, rx/ry), the render, and any function caveats (for example, a teardropped bore that locates a shaft). Store the outcome with
python $D memory add --bb bb.json --decision mods.json --note "<lesson>".
Worked reference (the paper's birdhouse)
A nine-face birdhouse with two horizontal bores (−90°). Laying end face 3 on the bed makes the entrance bore vertical; the Ø8 perch hole stays horizontal → teardrop. Result: actionable overhangs 2 → 0, a valid single solid, volume −0.17%, faces 9 → 11. See docs/tutorials/agentscad-fdm-dfam.md in the repo.
Limits
Single parts, no assemblies. The GraphSAGE feature classifier isn't bundled (the weights weren't released), so rule hints stand in for it. Very large parts strain the context window: summarize faces by type, keeping only flagged faces and their neighbours.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

