2022-12-07 17:56:37 +00:00
|
|
|
|
2024-06-04 01:07:52 +00:00
|
|
|
SRC=scad/bolex_rewind_key.scad
|
2022-12-07 17:56:37 +00:00
|
|
|
IM=convert
|
|
|
|
OPENSCAD=openscad
|
2024-10-17 00:16:43 +00:00
|
|
|
OPENSCAD_OPTIONS=-D VERBOSE=false --export-format=asciistl
|
2022-12-07 17:56:37 +00:00
|
|
|
THEME=DeepOcean
|
|
|
|
OPENSCAD_IMAGE=--viewall --render --imgsize=512,512 --colorscheme=$(THEME)
|
2024-06-04 01:07:52 +00:00
|
|
|
ORDER_STL=python3 scad/common/c14n_stl.py
|
2022-12-07 17:56:37 +00:00
|
|
|
|
|
|
|
all: bolex_rewind_key bolex_rewind_key_handle
|
|
|
|
|
|
|
|
bolex_rewind_key : $(SRC)
|
|
|
|
echo "Generating $@.stl from $(SRC)..."
|
2024-06-04 01:07:52 +00:00
|
|
|
$(OPENSCAD) $(OPENSCAD_OPTIONS) -o stl/$@.stl -D PART=\"$@\" $(SRC)
|
|
|
|
$(ORDER_STL) stl/$@.stl
|
|
|
|
$(OPENSCAD) $(OPENSCAD_IMAGE) -o img/$@.png -D PART=\"$@\" $(SRC)
|
|
|
|
$(IM) img/$@.png img/$@.jpg
|
|
|
|
rm img/$@.png
|
2022-12-07 17:56:37 +00:00
|
|
|
|
|
|
|
bolex_rewind_key_handle : $(SRC)
|
|
|
|
echo "Generating $@.stl from $(SRC)..."
|
2024-06-04 01:07:52 +00:00
|
|
|
$(OPENSCAD) $(OPENSCAD_OPTIONS) -o stl/$@.stl -D PART=\"$@\" $(SRC)
|
|
|
|
$(ORDER_STL) stl/$@.stl
|
|
|
|
$(OPENSCAD) $(OPENSCAD_IMAGE) -o img/$@.png -D PART=\"$@\" $(SRC)
|
|
|
|
$(IM) img/$@.png img/$@.jpg
|
|
|
|
rm img/$@.png
|