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

tools/multi-preview.sh

View on GitHub
#!/bin/bash
# Generate preview images from multiple angles
# Usage: multi-preview.sh input.scad output_dir/ [-D 'var=value']

set -e

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
source "$SCRIPT_DIR/common.sh"

check_openscad

if [ $# -lt 2 ]; then
    echo "Usage: $0 input.scad output_dir/ [-D 'var=value' ...]"
    exit 1
fi

INPUT="$1"
OUTPUT_DIR="$2"
shift 2

# Collect -D parameters
DEFINES=()
while [ $# -gt 0 ]; do
    case "$1" in
        -D)
            shift
            DEFINES+=("-D" "$1")
            ;;
    esac
    shift
done

mkdir -p "$OUTPUT_DIR"

# Get base name without extension
BASENAME=$(basename "$INPUT" .scad)

echo "Generating multi-angle previews for: $INPUT"
echo "Output directory: $OUTPUT_DIR"
echo ""

# Define angles as name:camera pairs
# Camera format: translate_x,translate_y,translate_z,rot_x,rot_y,rot_z,distance
ANGLES="iso:0,0,0,55,0,25,0
front:0,0,0,90,0,0,0
back:0,0,0,90,0,180,0
left:0,0,0,90,0,90,0
right:0,0,0,90,0,-90,0
top:0,0,0,0,0,0,0"

echo "$ANGLES" | while IFS=: read -r angle camera; do
    output="$OUTPUT_DIR/${BASENAME}_${angle}.png"
    
    echo "  Rendering $angle view..."
    $OPENSCAD \
        --camera="$camera" \
        --imgsize="800,600" \
        --colorscheme="Tomorrow Night" \
        --autocenter \
        --viewall \
        "${DEFINES[@]}" \
        -o "$output" \
        "$INPUT" 2>/dev/null
done

echo ""
echo "Generated previews:"
ls -la "$OUTPUT_DIR"/${BASENAME}_*.png
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