Add 'part' variable

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

View File

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