openscad
Original:🇺🇸 English
Translated
1 scripts
Create versioned OpenSCAD (.scad) files for 3D printing, render previews, and compare iterations. Use this when designing or iterating on 3D models.
3installs
Added on
NPX Install
npx skill4agent add iancanderson/openscad-agent openscadTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →OpenSCAD Design Skill
Create versioned OpenSCAD files, render previews, and compare iterations for 3D printing designs.
Workflow
1. Determine the Next Version Number
Before creating a new .scad file, find existing versions:
bash
.claude/skills/openscad/scripts/version-scad.sh <name>This returns the next version number and filename. For example, if exists, it returns .
piano_001.scadpiano_0022. Create the Versioned .scad File
Write the OpenSCAD code to the versioned filename (e.g., ).
piano_002.scad3. Render the Preview
bash
.claude/skills/preview-scad/scripts/render-scad.sh <name>_<version>.scad --output <name>_<version>.pngThis creates a PNG with the matching version number (e.g., ).
piano_002.png4. Compare with Previous Version
Read both the current and previous PNG images to visually compare:
- Current:
piano_002.png - Previous: (if exists)
piano_001.png
Evaluate what changed and whether the new version better matches requirements.
5. Iterate
If the design needs improvement:
- Analyze what's wrong
- Create the next version (e.g., )
piano_003.scad - Render and compare again
File Naming Convention
<model-name>_<version>.scad -> <model-name>_<version>.pngExamples:
- ->
phone_stand_001.scadphone_stand_001.png - ->
phone_stand_002.scadphone_stand_002.png - ->
gear_001.scadgear_001.png
Use underscores in model names, and always use 3-digit zero-padded version numbers.
Example Session
User asks for a piano model:
-
Check for existing versions:bash
.claude/skills/openscad/scripts/version-scad.sh pianoOutput:(no existing files)piano_001 -
Writewith initial design
piano_001.scad -
Render preview:bash
.claude/skills/preview-scad/scripts/render-scad.sh piano_001.scad --output piano_001.png -
Readto inspect the result
piano_001.png -
If improvements needed, create, render to
piano_002.scadpiano_002.png -
Read bothand
piano_001.pngto compare iterationspiano_002.png
Render Options
See for full rendering options:
/preview-scad- - Image dimensions (default:
--size <WxH>)800x600 - - Camera position
--camera <x,y,z,tx,ty,tz,d> - - Color scheme (default:
--colorscheme <name>)Cornfield - - Full render mode (slower, more accurate)
--render - - Preview mode (faster, default)
--preview
Next Steps
Once the design looks correct in PNG previews:
- Export to STL: Use to convert the final version to STL format
/export-stl - The export includes geometry validation to catch printability issues
Full Pipeline
/openscad → /preview-scad → /export-stl (with validation)Tips
- Start simple and add complexity in iterations
- Use meaningful model names that describe the object
- Keep each version's changes focused on specific improvements
- Document what changed between versions in your response to the user
- Only export to STL once the preview looks correct
- Always run slice-check before considering a model print-ready