parts := "cartridge receptacle"

default: build

build:
	#!/bin/sh
	for part in {{parts}}; do
		echo "Rendering $part..."
		just render-part $part
	done

render-part part:
	#!/bin/sh
	echo 'use <{{part}}.scad>; $fn = 128; {{part}}();' > part.scad
	openscad --backend Manifold -o {{part}}.stl part.scad
	rm part.scad
