1
0
Fork 0
mirror of https://github.com/imjasonh/scad-to-png synced 2026-07-07 01:22:23 +00:00
scad-to-png/regenerate-examples.sh
Jason Hall 4e648c7968
Initial commit: scad-to-png CLI tool
A Node.js CLI tool that converts OpenSCAD files to PNG images without
requiring OpenSCAD installation. Uses OpenSCAD WebAssembly for conversion
and implements a software renderer for STL to PNG conversion.

Features:
- Converts .scad files to STL and PNG outputs
- Renders from 8 different viewpoints
- No OpenSCAD installation required
- Pre-commit hooks to keep examples up to date
- GitHub Actions workflow for CI

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 18:10:17 -04:00

26 lines
No EOL
721 B
Bash
Executable file

#!/bin/bash
# Script to regenerate all example outputs
echo "Regenerating all example outputs..."
# Find all .scad files in examples directory
for scad_file in examples/*.scad; do
if [ -f "$scad_file" ]; then
# Get the base name without extension
base_name=$(basename "$scad_file" .scad)
echo "Processing $scad_file..."
# Generate outputs
./scad-to-png "$scad_file" -o "output/$base_name"
if [ $? -eq 0 ]; then
echo "✓ Generated outputs for $base_name"
else
echo "✗ Failed to generate outputs for $base_name"
exit 1
fi
fi
done
echo "All example outputs regenerated successfully!"