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