Complete and render v2. Process is running

This commit is contained in:
mmcwilliams 2020-05-23 21:47:47 -04:00
parent 459bcecaea
commit 002874282d
4 changed files with 71 additions and 66 deletions

View File

@ -5,7 +5,7 @@ include <../libraries/gnal.scad>;
SPOKE_COUNT = 24;
PART="";
module gnal_spiral_100ft (spiral_count = 60, od = 298.75) {
module gnal_100ft_spiral (spiral_count = 60, od = 298.75) {
outer_d = 299;
outer_d_inside = outer_d - 6;
outer_h = 7.5;
@ -130,65 +130,6 @@ module gnal_spiral_100ft (spiral_count = 60, od = 298.75) {
}
}
module spacer_ridges () {
ridges = 16;
for (i = [0 : ridges]) {
rotate([0, 0, i * (360 / ridges)]) translate([13.5, 0, 0]) cylinder(r = 1.25, h = 8, $fn = 60);
}
}
module spacer_ridges_loose () {
ridges = 16;
intersection () {
union () {
for (i = [0 : ridges]) {
rotate([0, 0, i * (360 / ridges)]) translate([13.7, 0, 0]) cylinder(r = 1.25, h = 8, $fn = 60);
}
}
cylinder(r = 13.7, h = 12, center = true);
}
}
module spacer_outer_ridges () {
ridges = 24;
H = 6.5;
difference () {
union () {
for (i = [0 : ridges]) {
rotate([0, 0, i * (360 / ridges)]) translate([14.6, 0, -4.75]) cylinder(r = 1.25, h = 8, $fn = 30);
}
}
translate([0, 0, -4.1]) difference () {
cylinder(r = 33 / 2, h = 4, center = true, $fn = 100);
cylinder(r2 = 33 / 2, r1 = 27.75 / 2, h = 4.1, center = true, $fn = 100);
}
}
}
module gnal_spiral_100ft_spacer () {
add = 3.25;
core_d = 29.5;
core_bottom_d = 26.2 + .2;
void_d = 22.5;
h = 8 + add;
translate([0, 0, (add / 2) - 1]) difference () {
union () {
difference () {
cylinder(r = core_d / 2, h = h, center = true, $fn = 200);
translate([0, 0, 8]) cylinder(r = core_bottom_d / 2, h = h, center = true, $fn = 200);
cylinder(r = void_d / 2, h = h + 1, center = true, $fn = 200);
}
translate([0, 0, 0]) spacer_ridges_loose();
spacer_outer_ridges();
}
//trim top
translate([0, 0, h - 0.1]) cylinder(r = (core_d + 1) / 2, h = h, center = true, $fn = 200);
//trim bottom
translate([0, 0, -h + 0.9]) cylinder(r = (core_d + 1) / 2, h = h, center = true, $fn = 200);
//finger grips
//translate([0, 24, 0]) rotate([-6, 0, 0]) cylinder(r = 10, h = 6, center = true, $fn = 100);
//translate([0, -24, 0]) rotate([6, 0, 0]) cylinder(r = 10, h = 6, center = true, $fn = 100);
}
}
module gnal_100ft_top () {
H = 5;
center_d = 53;
@ -311,7 +252,9 @@ module film_guide (rotations = 40, od = 215.75) {
}
if (PART == "spiral") {
gnal_spiral_100ft();
} else if (PART == "") {
gnal_100ft_spiral();
} else if (PART == "top") {
gnal_100ft_top();
} else if (PART == "spacer") {
gnal_spacer();
}

View File

@ -6,8 +6,9 @@ $fn = 20;
SPOKE_COUNT = 24;
PART="";
module gnal_spiral_50ft (spiral_count = 40, od = 215.75) {
module gnal_50ft_spiral (spiral_count = 40, od = 215.75) {
outer_d = 215;
outer_d_inside = 209;
outer_h = 7.5;
@ -80,7 +81,7 @@ module gnal_spiral_50ft (spiral_count = 40, od = 215.75) {
}
}
module top () {
module gnal_50ft_top () {
H = 5;
center_d = 53;
spoke_w = 4.5;
@ -172,6 +173,15 @@ module film_guide (rotations = 40, od = 215.75) {
XMAXSHAPE);
}
if (PART == "spiral") {
gnal_50ft_spiral();
} else if (PART == "top") {
gnal_50ft_top();
} else if (PART == "spacer") {
gnal_spacer();
}
//difference() {
//spiral();
//translate([250, 0, 0]) cube([500, 500, 50], center = true);

View File

@ -253,7 +253,7 @@ module spacer_outer_ridges () {
}
}
}
module spacer () {
module gnal_spacer () {
add = 3.25;
core_d = 29.5;
core_bottom_d = 26.2 + .2;

52
scripts/v2.sh Normal file
View File

@ -0,0 +1,52 @@
#!/bin/bash
V="v2"
echo "Rendering GNAL ${V}"
VERSION=`bash ./scripts/version.sh`
CPU=`bash ./scripts/cpu.sh`
DIST=./dist
IMG=./img
NOTES=./notes/${V}.csv
FILES=( "spacer" "top" "spiral" )
SIZES=( "50ft" "100ft" )
mkdir -p $DIST
echo "version,cpu,file,file_hash,file_size,source_hash,source_size,facets,volume,render_time" > $NOTES
for SIZE in "${SIZES[@]}"
do
:
mkdir -p "${DIST}/${SIZE}_${V}"
scad="${SIZE}_${V}/gnal_${SIZE}.scad"
srchash=`sha256sum "${scad}" | awk '{ print $1 }'`
srcsize=`wc -c < "${scad}"`
srcsize=`echo $srcsize | xargs`
for FILE in "${FILES[@]}"
do
:
stl="${DIST}/${SIZE}_${V}/gnal_${SIZE}_${FILE}.stl"
png="${IMG}/gnal_${SIZE}_${V}_${FILE}.png"
echo "${scad} - ${FILE}"
start=`date +%s`
openscad -o "$stl" -D "PART=\"${FILE}\"" "${scad}"
end=`date +%s`
runtime=$((end-start))
hash=`sha256sum "$stl" | awk '{ print $1 }'`
fileSize=`wc -c < "$stl"`
fileSize=`echo $fileSize | xargs`
ao=`admesh -c "$stl"`
facets=`echo "$ao" | grep "Number of facets" | awk '{print $5}'`
volume=`echo "$ao" | grep "Number of parts" | awk '{print $8}'`
line="${VERSION},${CPU},$stl,$hash,$fileSize,$srchash,$srcsize,$facets,$volume,$runtime"
echo "$line" >> $NOTES
echo "$line"
echo "Rendering image of ${stl}..."
openscad -o "$png" --preview --imgsize=1920,1080 --colorscheme=DeepOcean -D "PART=\"${FILE}\"" "${scad}"
done
done