summaryrefslogtreecommitdiff
path: root/test_fits.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test_fits.sh')
-rwxr-xr-xtest_fits.sh28
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
2usage() {
3 cat <<EOF
4Usage:
5$0
6$0 [depth] [tolerance1 tolerance2 .. toleranceN]
7
8By default five test fit pieces are generated with a length of 120mm at the
9tolerances 0.1mm, 0.2mm, 0.3mm, 0.4mm, and 0.5mm.
10
11Over ride the defaults by supplying paramaters; the first parameter the depth and the rest are
12taken as tolerances.
13EOF
14}
15
16[ "-h" == "$1" ] || [ "--help" == "$1" ]&& usage && exit;
17
18depth=${1:-120}; shift
19tolerances=${*:-0.1 0.2 0.3 0.4 0.5};
20
21male='"male_tabs"'
22female='"female_tabs"'
23shopen="./shopenscad.sh cubbies.scad"
24
25part="$male" $shopen
26for t in ${tolerances[@]}; do
27 tab_tolerance=$t part="$female" $shopen
28done;