summaryrefslogtreecommitdiff
path: root/cubbies.sh
blob: 10c92f6053d65d909510f032d0913b872bb9a816 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash

usage() {
    cat <<EOF
    $0 cubby-depth cubby-height cubby-width0 cubby-width1 cubby-widthN
    e.g.:
    $0 150 90 20 30 35
EOF
}

[ "-h" == "$1" ] && usage && exit;

shopenscad_cmd="./shopenscad.sh cubbies.scad "

export $(echo $($shopenscad_cmd -p))
# # $ ./shopenscad.sh -p cubbies.scad
# tab_padding=5
# tab_width=10
# max_bridge=0
# # cubby_width=150
# # cubby_depth=120
# strut_thickness=5
# screw_tabs=true
# # cubby_height=90
# #part="both"
# thickness=3
# tab_tolerance=0.5

cubby_depth=$1; shift
cubby_height=$1; shift

# echo depth: $cubby_depth
# echo height: $cubby_height
part='"side"' ${shopenscad_cmd}

for i in "$@"; do
    part='"bottom"' cubby_width="$i" ${shopenscad_cmd}
done;