Add common SCAD lib. Add a script that compiles all scad files to stl (make is getting excessive). Canonicalize STL files after they're compiled.

This commit is contained in:
Matt McWilliams 2023-03-04 19:44:20 -05:00
parent e27cae353f
commit 211101cd6b
5 changed files with 6845 additions and 0 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "scad/common"]
path = scad/common
url = https://git.sixteenmillimeter.com/modules/common.git

1
scad/common Submodule

@ -0,0 +1 @@
Subproject commit cba7a3051ef0729eaa1d5c5da6205464185734e0

View File

@ -0,0 +1,22 @@
include <arduino.scad>;
PART="electronics_mount";
CaseX = 100;
CaseY = 200;
CaseZ = 40;
CaseMountsX = 90;
CaseMountsY = 190;
module case_debug () {
cube([CaseX, CaseY, CaseZ], center = true);
}
module electronics_mount () {
bumper();
}
if (PART == "electronics_mount") {
electronics_mount();
}

13
scripts/scad.sh Normal file
View File

@ -0,0 +1,13 @@
#!/bin/bash
openscadPart () {
openscad -o "./stl/${3}" -D"PART=\"${2}\"" "./scad/${1}"
if [ -f "./scad/common/c14n_stl.py" ]; then
python3 ./scad/common/c14n_stl.py "./stl/${3}"
fi
}
# mcopy mono 99 projector controller
openscadPart "projector_controller.scad" "electronics_mount" "mcopy_mono99_electronics_mount.stl"

File diff suppressed because it is too large Load Diff