From openscad
Design parametric 3D models with OpenSCAD. Workflows for creating enclosures, mechanical parts, and assemblies. Use when the user asks to design, create, or model a physical object, enclosure, bracket, mount, or mechanical part.
How this skill is triggered — by the user, by Claude, or both
Slash command
/openscad:parametric-designThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A structured approach to creating parametric 3D models with OpenSCAD and the model viewer.
A structured approach to creating parametric 3D models with OpenSCAD and the model viewer.
Before writing any code, clarify:
// [Part Name] - [brief description]
// Units: mm
// === Parameters ===
width = 50;
depth = 30;
height = 20;
wall = 2;
corner_r = 2;
// === Derived ===
inner_w = width - 2 * wall;
inner_d = depth - 2 * wall;
inner_h = height - wall;
// === Quality ===
$fn = 32;
// === Assembly ===
main_body();
openscad-viewer:open { "file": "part.scad" }view from front and topAfter each significant change:
open result for dimension sanitymodule enclosure(size, wall, lip_h) {
difference() {
cube(size, center = true);
translate([0, 0, wall])
cube([size.x - 2*wall, size.y - 2*wall, size.z], center = true);
}
}
module lid(size, wall, lip_h) {
// Outer lid
cube([size.x, size.y, wall], center = true);
// Inner lip
translate([0, 0, -lip_h/2])
difference() {
cube([size.x - 2*wall + 0.2, size.y - 2*wall + 0.2, lip_h], center = true);
cube([size.x - 4*wall, size.y - 4*wall, lip_h + 0.1], center = true);
}
}
module l_bracket(w, h, d, t, hole_d) {
difference() {
union() {
cube([w, t, h]); // vertical
cube([w, d, t]); // horizontal
}
// mounting holes
for (x = [w*0.25, w*0.75]) {
translate([x, d/2, -1])
cylinder(h = t+2, d = hole_d);
translate([x, -1, h/2])
rotate([-90, 0, 0])
cylinder(h = t+2, d = hole_d);
}
}
}
module insert_boss(outer_d, inner_d, height) {
difference() {
cylinder(h = height, d = outer_d);
cylinder(h = height + 0.1, d = inner_d);
}
}
| Constraint | Guideline |
|---|---|
| Min wall thickness | 1.2mm (2-3 perimeters at 0.4mm nozzle) |
| Hole tolerances | Add 0.2-0.4mm to nominal diameter for FDM |
| Overhangs | Keep under 45 degrees or add supports |
| Bridge length | Under 10mm unsupported |
| Layer orientation | Strongest perpendicular to layer lines |
| Mating clearance | 0.3-0.5mm gap for FDM |
| Min feature size | 0.8mm for FDM |
When designing parts that fit together:
config.scad fileinclude <config.scad> in each part fileopenscad-viewer:open to switch between parts during design$fn = 16 for fast iteration, increase to 64+ for final# prefix to highlight a shape in debug: #cylinder(h=5, r=2);% prefix for transparent preview: %cube(20);! prefix to show only one shape: !cylinder(h=5, r=2);echo() to print computed dimensions to the console for debuggingdifference() cutters to avoid coincident facesnpx claudepluginhub fingerskier/claude-plugins --plugin openscadCAD modeling with build123d Python library. Use when creating 3D models, exporting to GLB/STEP/STL, or doing boolean operations (union, difference, intersection). Triggers on: CAD, 3D modeling, sphere, box, cylinder, mesh export, GLB, STEP, STL, solid modeling, parametric design, threads, fasteners, bolts, nuts, screws, gears, pipes, flanges, bearings, bd_warehouse, spur gear, helical gear, bevel gear, planetary gear, ring gear, cycloid gear, rack and pinion, gggears, herringbone, gear mesh, gear train.
Provides parametric OpenSCAD models for BCI hardware including electrode holders, paste adapters, headset hooks, pogo combs, fNIRS housings, and eurorack frames. Use for designing, modifying, or 3D-printing neuromodulation components.