mirror of
https://github.com/imjasonh/scad-to-png
synced 2026-07-07 01:22:23 +00:00
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>
12 lines
No EOL
299 B
OpenSCAD
12 lines
No EOL
299 B
OpenSCAD
// Simple test object - a cube with a cylinder hole
|
|
difference() {
|
|
// Main cube
|
|
cube([30, 30, 30], center = true);
|
|
|
|
// Cylinder hole through the center
|
|
cylinder(h = 40, r = 10, center = true, $fn = 50);
|
|
}
|
|
|
|
// Add a sphere on top
|
|
translate([0, 0, 25])
|
|
sphere(r = 8, $fn = 50); |