diff options
Diffstat (limited to 'test_fits.sh')
-rwxr-xr-x | test_fits.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test_fits.sh b/test_fits.sh new file mode 100755 index 0000000..003cb3d --- /dev/null +++ b/test_fits.sh | |||
@@ -0,0 +1,28 @@ | |||
1 | #!/bin/bash | ||
2 | usage() { | ||
3 | cat <<EOF | ||
4 | Usage: | ||
5 | $0 | ||
6 | $0 [depth] [tolerance1 tolerance2 .. toleranceN] | ||
7 | |||
8 | By default five test fit pieces are generated with a length of 120mm at the | ||
9 | tolerances 0.1mm, 0.2mm, 0.3mm, 0.4mm, and 0.5mm. | ||
10 | |||
11 | Over ride the defaults by supplying paramaters; the first parameter the depth and the rest are | ||
12 | taken as tolerances. | ||
13 | EOF | ||
14 | } | ||
15 | |||
16 | [ "-h" == "$1" ] || [ "--help" == "$1" ]&& usage && exit; | ||
17 | |||
18 | depth=${1:-120}; shift | ||
19 | tolerances=${*:-0.1 0.2 0.3 0.4 0.5}; | ||
20 | |||
21 | male='"male_tabs"' | ||
22 | female='"female_tabs"' | ||
23 | shopen="./shopenscad.sh cubbies.scad" | ||
24 | |||
25 | part="$male" $shopen | ||
26 | for t in ${tolerances[@]}; do | ||
27 | tab_tolerance=$t part="$female" $shopen | ||
28 | done; | ||