include<../config.scad>; include<../util.scad>; led_ring(cutout=true); module led_ring(cutout=false,extra =0) { play=(cutout ? 0.1 : 0); // pcb ring color(cutout? "green": "gray") translate([0,0,-extra + (cutout ? 1.3 : 0)]) difference() { cylinder(d=48+play*2,h=1.6 + extra); eps() cylinder(d=30.8-play*2,h=1.6 + extra + $e*2); } // leds on the ring for(r=[0:360/16:360]) rotate([0,0,r]) translate([38.8/2,0,$e]) if(cutout==false) { difference() { color("white") translate([-5/2,-5/2,0]) cube([5,5,2.9-$e]); color([(r/4)%1,(r/7)%1,(r/10)%1]) translate([0,0,2.9-0.3]) cylinder(d1=2.5,d2=3,h=0.3); } } else { hull() { translate([0,0,2.9]) rotate([0,-30,0]) cylinder(d1=3,d2=10,h=10); translate([0,0,2.9]) cylinder(d=3,h=$e); } } }