Fix laser render. Re-render all DXF files

This commit is contained in:
Matt McWilliams 2024-05-28 22:22:21 -04:00
parent f1c2ec94d9
commit 12f88fbb95
5 changed files with 3004 additions and 23980 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1361,7 +1361,7 @@ module logo () {
//exploded_view();
PART = "arduino_nano_electronics_mount";
PART = "";
//models
@ -1429,7 +1429,7 @@ if (PART == "plate") {
exploded_view();
}
LASER = "";
LASER = "panel_cover";
//laser
if (LASER == "laser_plate") {

View File

@ -11,14 +11,16 @@ listLaser () {
renderPart () {
part="${1}"
echo "renderPart ${part}"
stl="stl/${SCRIPT_NAME}_${part}.stl"
openscad --export-format asciistl -o "${stl}" -D "PART=\"${part}\";" "${SCAD}"
openscad --export-format asciistl -o "${stl}" -D "LASER=\"\";" -D "PART=\"${part}\";" "${SCAD}"
}
renderLaser() {
laser="${1}"
echo "renderLaser ${laser}"
dxf="dxf/${SCRIPT_NAME}_${laser}.dxf"
openscad -o "${dxf}" "LASER=\"${laser}\";" "${SCAD}"
openscad -o "${dxf}" -D "PART=\"\";" -D "LASER=\"${laser}\";" "${SCAD}"
}
allParts () {
@ -27,9 +29,9 @@ allParts () {
renderPart "${part}"
done
LASERs=($(listLaser "${SCAD}"))
LASERS=($(listLaser "${SCAD}"))
for laser in "${LASERS[@]}"; do
renderLaser
renderLaser "${laser}"
done
}