[WIP] leightweight lighthouse
This commit is contained in:
parent
89a33df7ff
commit
5011c762a5
2 changed files with 115 additions and 0 deletions
45
generate_lighthouse.sh
Executable file
45
generate_lighthouse.sh
Executable file
|
@ -0,0 +1,45 @@
|
|||
#!/bin/sh
|
||||
|
||||
# usage: generate_bottle_tag.sh NAME
|
||||
|
||||
set -u
|
||||
|
||||
VERSION=0.1
|
||||
FN=360
|
||||
|
||||
# usage: render LAYER PART
|
||||
render() {
|
||||
case "$2" in
|
||||
layer)
|
||||
CONNECTOR=false
|
||||
;;
|
||||
connector)
|
||||
CONNECTOR=true
|
||||
;;
|
||||
*)
|
||||
echo 'fatal: invalid part' >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo rendering "$1" "$2"
|
||||
openscad \
|
||||
-D "\$fn=${FN}" \
|
||||
-D "CONNECTOR=${CONNECTOR}" \
|
||||
-D "LAYER=$1" \
|
||||
-o "stls/lighthouse-${2}${1}-v${VERSION}.stl" \
|
||||
lighthouse.scad
|
||||
}
|
||||
|
||||
cd "$(dirname $0)"
|
||||
|
||||
render 1 layer
|
||||
sleep 1
|
||||
for LAYER in 2 3 4;
|
||||
do
|
||||
for PART in layer connector
|
||||
do
|
||||
render "$LAYER" "$PART"
|
||||
sleep 1
|
||||
done
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue