Add 'part' variable

This commit is contained in:
Remi Rampin 2024-03-27 18:18:54 -04:00
parent 0515c30253
commit 840f9f2b55
1 changed files with 9 additions and 3 deletions

View File

@ -12,8 +12,12 @@ border = 1;
funnel_size = 1;
part = 0;
module _end_of_customizer() {}
assert(part >= 0 && part <= 2);
$fn = $preview?30:80;
module overall_cylinder() {
@ -29,7 +33,7 @@ module overall_cylinder() {
}
}
*if($preview)
if($preview && part == 0)
color("#777")
overall_cylinder();
@ -71,8 +75,9 @@ module bottom_part() {
}
}
if(part == 0 || part == 1)
color("#dd08")
*bottom();
bottom();
module top() {
for(i = [0:5]) {
@ -111,11 +116,12 @@ module top_part_hollow() {
}
}
if(part == 0 || part == 2)
color("#4d48")
translate([0, 0, bottom_height])
top();
*if($preview)
if($preview && part == 1)
color("#f008")
for(i = [0:5]) {
rotate([0, 0, i/6*360 + 360 / 12])