一键导入
3d-print
Search-first 3D printing workflow — finds real specs before modeling, generates manifold-safe models for Bambu Studio / PrusaSlicer / Cura / Fusion 360
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Search-first 3D printing workflow — finds real specs before modeling, generates manifold-safe models for Bambu Studio / PrusaSlicer / Cura / Fusion 360
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | 3d-print |
| version | 0.2.0 |
| description | Search-first 3D printing workflow — finds real specs before modeling, generates manifold-safe models for Bambu Studio / PrusaSlicer / Cura / Fusion 360 |
| triggers | ["3D print","create STL","generate model for printing","design for 3D printing","make a 3D printable","print this part","3d printable","slicer","FDM","print bracket","print mount","print enclosure"] |
Generate physically accurate, print-ready 3D models without fabricating dimensions. Always search for real specs first. Never guess measurements.
First, try the local search script:
python3 scripts/search_specs.py "Canon EF 40mm f2.8 lens outer diameter"
If the script returns no concrete millimeter values (status: no_instant_answer or vague text),
do NOT stop. Use your own search_web tool to query the product's official datasheet,
spec page, or Wikipedia. Extract the three key numbers: outer dimension, inner dimension, height.
Only proceed to Step 2 once you have real numbers with a source you can cite.
All results are cached to specs_cache.json. On a cache hit, read the cached result and
extract dimensions directly — no re-search needed.
Check if the request matches a preset:
python3 scripts/generate_model.py --preset cube # 20mm calibration cube
python3 scripts/generate_model.py --preset tube # hollow cylinder
python3 scripts/generate_model.py --preset bracket # box with through-hole
If the request does NOT match a preset (e.g. "lens cap with snap-fit tabs", "hook with chamfer", "enclosure with lip", "multi-part assembly"), write a custom Python script on the fly. Use the pattern:
import sys
sys.path.insert(0, "scripts")
import manifold3d as m3d
from generate_model import export_3mf, export_stl
from pathlib import Path
# --- build geometry using manifold3d primitives ---
# See references/manifold-examples.md for API reference:
# extrusion, revolve, hull, chamfer, loft, snap-fit tabs, threads
body = m3d.Manifold.cylinder(height=8.0, radius_low=34.0, circular_segments=64)
inner = m3d.Manifold.cylinder(height=8.2, radius_low=33.0, circular_segments=64)
result = body - inner.translate([0, 0, -0.1])
# --- export ---
out = Path("output")
export_3mf(result, out / "lens_cap.3mf", name="lens_cap")
export_stl(result, out / "lens_cap.stl")
Save the script as output/<name>_build.py, run it, then proceed to Step 3.
The export_3mf and export_stl functions from generate_model.py handle all
file-format details — just call them with the final Manifold object.
python3 scripts/validate_mesh.py output/lens_cap.stl
If validation fails, do NOT just run --fix and move on.
Read the specific failing checks, trace them back to the geometry construction,
and fix the root cause in the build script. Common fixes:
watertight: FAIL → a boolean operation left an open edge; add a small Z-offset
(e.g. translate([0, 0, -0.1])) on the subtracted body so it protrudes past the facepositive_volume: FAIL → normals are inverted; the outer shell may be smaller than
the inner — check radiino_degenerate_faces: FAIL → a zero-thickness wall from a tight boolean;
add at least 0.4mm clearance between facesAfter fixing, re-run the build script and re-validate. Repeat until all critical checks pass.
Import .3mf into Bambu Studio / PrusaSlicer / Cura.
Expected: 0 non-manifold errors, 0 open edges.
When specs_cache.json already contains an entry for the target part, load and extract
dimensions directly instead of re-running search:
import json
cache = json.load(open("specs_cache.json"))
# find the entry whose query matches your part
# read result["answer"] or result["abstract"]
# parse out numeric values (mm) using your own reasoning
# map to: outer_diameter, inner_diameter, height, wall_thickness, etc.
Use your reasoning to map prose descriptions ("67.5mm filter thread") to the correct variable in the build script. Do not ask the user to do this mapping manually.
| File | Contents |
|---|---|
references/formats.md | STL vs 3MF vs STEP — when to use each |
references/tolerances.md | FDM accuracy, shrinkage, fit clearances |
references/design-rules.md | Manifold rules, wall thickness, overhang limits |
references/manifold-examples.md | manifold3d API: extrusion, revolve, hull, chamfer, snap-fit, threads |
generate_model.py is a reference, not a limit--fix alone| Error | Cause | Fix |
|---|---|---|
| "244 non-manifold edges" in Bambu | numpy-stl or bad boolean | Regenerate with manifold3d |
| Hole too tight | FDM shrinks holes | Add +0.1–0.2mm radius compensation (tolerances.md) |
| Part snaps during press fit | No interference margin | 0.1–0.3mm interference (tolerances.md) |
| Overhangs fail | >45° without supports | Redesign or add supports in slicer |
watertight: FAIL | Subtracted body flush with face | Add Z-offset of 0.1mm on subtracted body |
search_specs.py returns empty | DuckDuckGo Instant Answer has no entry | Use search_web tool on manufacturer datasheet |
ln -sf /path/to/3d-print-skill ~/.claude/skills/3d-print
pip install manifold3d trimesh numpy requests