Skip to content

archibate/dotfiles-opencode / skills/openscad

openscad

Verified

Create and render OpenSCAD 3D models. Generate preview images from multiple angles, extract customizable parameters, validate syntax, and export STL files for 3D printing.

FileKindSize
SKILL.mdskill md6.1 KB
examples/parametric_box.scadother2.6 KB
examples/phone_stand.scadother3.1 KB
tools/common.shexecutablescript1.1 KB
tools/export-stl.shexecutablescript1.1 KB
tools/extract-params.shexecutablescript4.3 KB
tools/multi-preview.shexecutablescript1.4 KB
tools/preview.shexecutablescript1.6 KB
tools/render-with-params.shexecutablescript2.1 KB
tools/validate.shexecutablescript954 B

examples/parametric_box.scad

View on GitHub
// Parametric Box with Lid
// A customizable storage box for 3D printing

// === Box Parameters ===
width = 60;              // [20:200] Width in mm
depth = 40;              // [20:200] Depth in mm
height = 30;             // [10:150] Height in mm
wall_thickness = 2;      // [1:0.5:5] Wall thickness in mm

// === Lid Parameters ===
include_lid = true;      // Include a separate lid
lid_height = 8;          // [5:30] Lid height in mm
lid_tolerance = 0.3;     // [0.1:0.1:0.8] Gap for lid fit

// === Style Options ===
corner_radius = 3;       // [0:10] Corner rounding radius
add_grip = true;         // Add grip indents to lid

// === Internal ===
$fn = 32;                // Smoothness

// Rounded box module
module rounded_box(w, d, h, r) {
    if (r > 0) {
        hull() {
            for (x = [r, w-r]) {
                for (y = [r, d-r]) {
                    translate([x, y, 0])
                        cylinder(h = h, r = r);
                }
            }
        }
    } else {
        cube([w, d, h]);
    }
}

// Main box body
module box_body() {
    difference() {
        rounded_box(width, depth, height, corner_radius);
        
        // Hollow inside
        translate([wall_thickness, wall_thickness, wall_thickness])
            rounded_box(
                width - 2*wall_thickness,
                depth - 2*wall_thickness,
                height,  // Open top
                max(0, corner_radius - wall_thickness)
            );
    }
}

// Lid
module lid() {
    inner_w = width - 2*wall_thickness - 2*lid_tolerance;
    inner_d = depth - 2*wall_thickness - 2*lid_tolerance;
    lip_height = lid_height * 0.6;
    
    difference() {
        union() {
            // Top cap
            rounded_box(width, depth, wall_thickness, corner_radius);
            
            // Inner lip
            translate([wall_thickness + lid_tolerance, wall_thickness + lid_tolerance, -lip_height + wall_thickness])
                rounded_box(inner_w, inner_d, lip_height, max(0, corner_radius - wall_thickness));
        }
        
        // Grip indents
        if (add_grip) {
            for (x = [width * 0.3, width * 0.7]) {
                translate([x, -1, wall_thickness/2])
                    rotate([-90, 0, 0])
                    cylinder(h = 5, r = 3, $fn = 16);
                translate([x, depth - 4, wall_thickness/2])
                    rotate([-90, 0, 0])
                    cylinder(h = 5, r = 3, $fn = 16);
            }
        }
    }
}

// Render
box_body();

if (include_lid) {
    // Position lid next to box for printing
    translate([width + 10, 0, lid_height - wall_thickness])
        rotate([180, 0, 0])
        lid();
}
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 193kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 193kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 193kUpdated Claude CodeCodexVerifiedInstall