/resin-print-prep:prep-minifrom resin-print-prep
Full workflow to take a problematic 3D mesh (STL/OBJ/blend) and make it resin-printable in Blender via the Blender MCP - inspect, orient, union shells, repair geometry, scale to tabletop size, error-bounded decimate, and export STL. Use this whenever the user wants to "prep", "fix", "clean up", or "make printable" a mini/model, mentions non-manifold errors, slicer problems, wrong orientation/scale, multi-shell kitbashes, or asks to get a mesh ready for Chitubox/Lychee - even if they only mention one symptom, the full sweep catches the rest.
Ships in resin-print-prep. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Take a mesh with issues and walk it through repair -> staging -> density reduction -> export. Requires a running Blender with the Blender MCP addon connected (interactive mode; the decimation phase can also run headless).
Read the repair playbook before phases 2-4 (orientation, shells,
sweep decision rules and hard-won warnings live there). The reference
files sit beside this file in skills/prep-mini/references/:
repair-playbook.md, sizing.md, and hollowing.md (there is no
top-level references/ directory).
Shared scripts live in ${CLAUDE_PLUGIN_ROOT}/scripts/.
references/sizing.md) or explicit
height/footprint in mm.bak = me.copy(); bak.use_fake_user = True.Objects, dimensions, world bounds, shells (connected components), non-manifold/boundary edge counts, zero-face/edge counts, volume sign. Independent counts via bmesh - toolbox panel numbers are stale until Check All is re-run.
Axis fixes are ROTATIONS, never raw axis swaps (swaps mirror the mesh). Y-up import fix: rotate +90 about X. Screenshot to verify - see the myconid incident in the playbook.
Shells: 1 is the goal. Hollowed = 2 (outer + cavity) is fine. Overlapping kitbash solids trigger Chitubox's even-odd carve bug -> union needed. Voxel remesh, never exact boolean - full rules and voxel-size math in the playbook. Re-check shells after: remesh seals air pockets as tiny internal bubble shells; delete all but the largest component.
exec(open("${CLAUDE_PLUGIN_ROOT}/scripts/geometry_sweep.py").read())
then sweep("ObjectName") until all counts are 0 (2-6 passes typical;
transient count bumps are normal). Sweep thresholds operate in LOCAL mesh
units -- check obj.scale first: an object scaled to 0.01 makes the
absolute thresholds 100x too aggressive in world terms (bake the scale or
adjust zero_thresh). Collapse-based - NEVER dissolve-based
cleanup or the Toolbox "Make Manifold" button on dense meshes (they create
defects; verified repeatedly). Details and stubborn-case fixes (micro-fans)
in the playbook.
scale_center_bake(name, s) from the same script: world-space transform,
scale to target mm, XY bbox centered on origin, base resting at z=0,
matrix_world = Identity. Real mm baked into vertices - slicers read STL
units as mm.
Now that units = printed mm, run the decimation pipeline
(${CLAUDE_PLUGIN_ROOT}/scripts/decimate_pipeline.py). In an
interactive session pass obj= to run() -- called with only a path it
re-reads an empty homefile and wipes the open scene (path-only mode is for
headless batch). This replaces any
"remove tiny faces" cleanup: it removes ALL detail below printer
resolution (not just degenerate slivers) while measuring and protecting
real thin features. See the sibling skill decimate-for-print for
operation details, batch mode, and timeout handling.
python ${CLAUDE_PLUGIN_ROOT}/scripts/hollow_drill.py in.stl out.stl
(pure Python, no Blender; deps in its docstring). Decides hollow-vs-solid
from measured bulk thickness and resin savings, hollows only the main
cavity (small pockets stay solid -- they'd be sealed resin traps), drills
one drain per low lobe plus a vent, audits trapped resin, and refuses to
export unless verification passes. It also picks the print orientation
(so do NOT auto-rotate in the slicer afterward). Read
references/hollowing.md first -- it explains the thresholds, the
slicer false-positive decode, and why detector noise must not be
"cleaned up".
Per-object STL export (bpy.ops.wm.stl_export, selected objects only).
The pipeline verifies before export (error percentiles vs budget,
watertightness no worse than input). Render or screenshot a before/after
of the riskiest regions when the user cares about specific detail.
| Symptom | Likely cause | Response |
|---|---|---|
| "500k zero faces" on a small model | scale-relative threshold noise | not defects; scale up or ignore |
| paper-thin wall readings (um) | back-to-back overlapping surfaces | union/repair, not thickening |
| exact boolean implodes mesh | self-intersecting operands | voxel remesh instead |
| decimation destroys tendrils/spikes | QEM sacrifices thin features | pipeline's protection handles it |
| protected decimation turns to mush | protection starved the budget | cap protected fraction (pipeline does) |
| model "invisible" after import | parked far off-origin | center it; it is off-camera not invisible |
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
4 skills in this plugin
/chitubox-support-injectionWrite native, EDITABLE supports (and raft bridges) directly into CHITUBOX project files (.chitubox) by injecting reverse-engineered support records - so externally generated supports behave exactly like Chitubox's own (selectable, movable, deletable, overlap rules respected). Use whenever the user wants to add/import supports into Chitubox from outside, edit .chitubox files programmatically, understand the .chitubox format, or wire a support generator into a Chitubox workflow. Also use when a new Chitubox version needs the format re-verified./decimate-for-printReduce a dense mesh (or a whole folder of STLs) to exactly the detail a resin printer can express, using error-bounded selective decimation in Blender via the Blender MCP - protects thin features, verifies against the original surface, then exports. Use whenever a slicer (Chitubox/Lychee) is slow or choking on a huge STL, a mesh has "too many polygons/faces", files are tens of MB, or the user wants meshes "reduced", "simplified", "optimized", or "decimated" for printing - and for batch-processing minis folders. Assumes mesh is otherwise sound; for broken meshes run prep-mini first./support-placementDRAFT (design phase): compute resin-print supports algorithmically - engineered sizing from cured-resin mechanics instead of fixed palettes, scar-cost-aware placement, articulated/braced routing - emitting natively editable Chitubox supports via the chitubox-support-injection skill. Use when generating supports outside a slicer, when designing/iterating this generator, or when reasoning about support mechanics (peel loads, green-state resin, slenderness/bracing).npx claudepluginhub hughescr/claude-code-config --plugin resin-print-prep