Accidentally rendered all files wrong. This corrects that. Add laser rendering of DXF files.

This commit is contained in:
Matt McWilliams 2024-05-28 21:42:58 -04:00
parent cb950f3f85
commit f1c2ec94d9
10 changed files with 161718 additions and 142527 deletions

View File

@ -1429,11 +1429,13 @@ if (PART == "plate") {
exploded_view();
}
LASER = "";
//laser
if (PART == "laser_plate") {
if (LASER == "laser_plate") {
dxf_plate();
} else if (PART == "panel") {
} else if (LASER == "panel") {
projection() intval_panel_laser();
} else if (PART == "panel_cover") {
} else if (LASER == "panel_cover") {
intval_laser_panel_cover(true, ALL_RED=true);
}

View File

@ -5,16 +5,31 @@ listParts () {
cat "${1}" | grep 'PART ==' | grep -v 'debug' | awk -F'"' '{print $2}'
}
listLaser () {
cat "${1}" | grep 'LASER ==' | grep -v 'debug' | awk -F'"' '{print $2}'
}
renderPart () {
part="${1}"
stl="stl/${SCRIPT_NAME}_${part}.stl"
openscad --export-format asciistl -o "${stl}" "${SCAD}"
openscad --export-format asciistl -o "${stl}" -D "PART=\"${part}\";" "${SCAD}"
}
renderLaser() {
laser="${1}"
dxf="dxf/${SCRIPT_NAME}_${laser}.dxf"
openscad -o "${dxf}" "LASER=\"${laser}\";" "${SCAD}"
}
allParts () {
PARTS=($(listParts "${SCAD}"))
for part in "${PARTS[@]}"; do
renderPart "${part}"
renderPart "${part}"
done
LASERs=($(listLaser "${SCAD}"))
for laser in "${LASERS[@]}"; do
renderLaser
done
}

View File

@ -21671,20 +21671,6 @@ solid OpenSCAD_Model
vertex 35.008217 36.34321 -4.5
endloop
endfacet
facet normal 0.83866227 -0.5446518 0
outer loop
vertex 35.200962 37.25 -2
vertex 35.286476 37.381676 -4.5
vertex 35.286476 37.381676 -2
endloop
endfacet
facet normal 0.83866227 -0.5446518 0
outer loop
vertex 35.286476 37.381676 -4.5
vertex 35.200962 37.25 -2
vertex 35.200962 37.25 -4.5
endloop
endfacet
facet normal 0.35836035 0.9335833 0
outer loop
vertex 36.036476 35.073414 -4.5
@ -21937,6 +21923,20 @@ solid OpenSCAD_Model
vertex 36.34321 37.991783 -4.5
endloop
endfacet
facet normal 0.83866227 -0.5446518 0
outer loop
vertex 35.200962 37.25 -2
vertex 35.286476 37.381676 -4.5
vertex 35.286476 37.381676 -2
endloop
endfacet
facet normal 0.83866227 -0.5446518 0
outer loop
vertex 35.286476 37.381676 -4.5
vertex 35.200962 37.25 -2
vertex 35.200962 37.25 -4.5
endloop
endfacet
facet normal -0.45399383 0.8910048 0
outer loop
vertex 37.25 35.200962 -4.5
@ -23687,20 +23687,6 @@ solid OpenSCAD_Model
vertex 33.95 -24.599998 -2.25
endloop
endfacet
facet normal 1 0 0
outer loop
vertex 38.95 -24.099998 -2.25
vertex 38.95 -7.9000006 -4.25
vertex 38.95 -7.9000006 -2.25
endloop
endfacet
facet normal 1 0 0
outer loop
vertex 38.95 -7.9000006 -4.25
vertex 38.95 -24.099998 -2.25
vertex 38.95 -24.099998 -4.25
endloop
endfacet
facet normal 1 0 0
outer loop
vertex 38.95 -24.599998 -2.25
@ -23715,6 +23701,20 @@ solid OpenSCAD_Model
vertex 38.95 -24.599998 -4.25
endloop
endfacet
facet normal 1 0 0
outer loop
vertex 38.95 -24.099998 -2.25
vertex 38.95 -7.9000006 -4.25
vertex 38.95 -7.9000006 -2.25
endloop
endfacet
facet normal 1 0 0
outer loop
vertex 38.95 -7.9000006 -4.25
vertex 38.95 -24.099998 -2.25
vertex 38.95 -24.099998 -4.25
endloop
endfacet
facet normal 1 0 0
outer loop
vertex 38.95 -7.9000006 -2.25

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

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

File diff suppressed because it is too large Load Diff