include ; module neopixel_matrix(padding) { size = [25.4*2.88, 25.4*2.88] + [padding, padding]; hole_size = 1-padding/2; led = [5 + 2*padding, 5 + 2*padding]; translate(-size/2) { difference() { union() { translate([0,0,-padding/2])color("black") linear_extrude(1.66 + padding) square(size); translate([25.4 * 0.18, 25.4 * 0.18]) for(i = [0:7]) { for(j = [0:7]) { translate([i * 25.4 * 0.36 + padding/2, j * 25.4 * 0.36 + padding/2, 3.28 - 1.6]) color("white") linear_extrude(1.6) translate(-led/2)square(led); } } } hoffset = .18*25.4 - 2.3; translate([padding/2, padding/2]) for(i = [1:3]) { translate([i*(.18*2+.36)*25.4, 0, -.1]) { translate([0, hoffset, 0]) cylinder(h=3.28, r1=hole_size, r2=hole_size, $fn=circle_res); translate([0, 25.4*2.88 - hoffset, 0]) cylinder(h=3.28, r1=hole_size, r2=hole_size, $fn=circle_res); } translate([(.36+(i-1)*(.18*2+2*.36))*25.4, 0, -.1]) { translate([0, 3*.36*25.4, 0]) cylinder(h=3.28, r1=hole_size, r2=hole_size, $fn=circle_res); translate([0, 25.4*2.88 - 3*.36*25.4, 0]) cylinder(h=3.28, r1=hole_size, r2=hole_size, $fn=circle_res); } } } } } module neopixel_feather(padding) { size = [22.9, 51] + [padding, padding]; translate([0,0,-padding]) difference() { union() { translate(-size/2) { color("black") linear_extrude(1.7 + padding) hull() { translate(size - [2.54, 2.54]) circle(2.54, $fn=circle_res); translate([size[0], 0] + [-2.54, 2.54]) circle(2.54, $fn=circle_res); translate([0, size[1]] + [2.54, -2.54]) circle(2.54, $fn=circle_res); translate([2.54, 2.54]) circle(2.54, $fn=circle_res); } } color("white") translate([0,0,1.7 + padding]) linear_extrude(1.2 + padding) translate(-[18.1, 38.8]/2) square([18.1, 38.8]); } translate(-size/2) { translate([0, 0, -.3]) linear_extrude(5) { translate(size - [2.54, 2.54]) circle(2.54/2 - padding/2, $fn=circle_res); translate([size[0], 0] + [-2.54, 2.54]) circle(2.54/2 - padding/2, $fn=circle_res); translate([0, size[1]] + [2.54, -2.54]) circle(2.54/2 - padding/2, $fn=circle_res); translate([2.54, 2.54]) circle(2.54/2 - padding/2, $fn=circle_res); } } } } module cable_tube(length) { rotate([0,90,0]) cylinder(r=1,h=length, $fn=circle_res); hull() { rotate([0,90,0]) cylinder(r=1,h=3, $fn=circle_res); translate([-.5,0,0]) scale([1, 1.4, 1]) sphere(r=1.5, $fn=circle_res); } } module front_panel(rack_num) { nb_slices = 4; size = [pcb_support[0] + safe_padding * 2 + side_clearance * 2, nb_nodes * node_clearance + sides_margin[0] + power_supply_height + pvc_thickness * 2]; difference() { color("aquamarine", .7) linear_extrude(pvc_thickness) { difference() { translate([-size[0]/2,0]) square(size); for(n = [1:nb_nodes]) { z = (n-1) * node_clearance + power_supply_height + sides_margin[0] - 1; for(s = [0:nb_slices]) { zs = s * 10; translate([0, zs]) translate([0, z]) hull() { translate([-pcb_support[0]/2.7, 0]) circle(d=3); translate([ pcb_support[0]/2.7, 0]) circle(d=3); } } } translate([size[0]/2 - side_clearance/2, (sides_margin[0] + power_supply_height)]) text(str(rack_num), halign = "center", valign = "center", font = "Monospace:style=Bold", size = 25); translate([-size[0]/2 + side_clearance/2 - pvc_thickness + 1, size[1] - sides_margin[1] - 5]) rotate([0,0,90]) text("SCITAS", halign = "right", valign = "center", font = "Monospace:style=Bold", size = 20); } } translate([size[0]/2 - side_clearance/2, size[1] - 51]) neopixel_feather(0.2); sp = pvc_thickness*1.5; tp = pvc_thickness*2.5; translate([0,0, -pvc_thickness/2]) { translate([ size[0]/2 - sp, size[1] - tp + safe_padding]) cylinder(d=6.1, h=pvc_thickness, $fn=circle_res); translate([ size[0]/2 - sp, tp]) cylinder(d=6.1, h=pvc_thickness, $fn=circle_res); translate([-size[0]/2 + sp, size[1] - tp + safe_padding]) cylinder(d=6.1, h=pvc_thickness, $fn=circle_res); translate([-size[0]/2 + sp, tp]) cylinder(d=6.1, h=pvc_thickness, $fn=circle_res); } l=80; l2=120; l3=25.6; r3=35.7; l4=23.6; r4=-25; l5=l3; l6=50; l7=67; l8=10; rotate([0.85,0,0]) translate([size[0]/2 - sp,tp + 3, -.2]) rotate([0,0,90])cable_tube(l7); rotate([0, 0, 0]) translate([size[0]/2 - sp, size[1] - tp - 2.5, 0]) rotate([0,186,90]) cable_tube(l8); translate([-l/2.,25, 0]) { hull() { rotate([0,90,0]) cylinder(r=1,h=l, $fn=circle_res); translate([0,2,0]) rotate([0,90,0]) cylinder(r=1,h=l, $fn=circle_res); } rotate([0,0,r3]) translate([-2-l3,1,0]) cable_tube(l3); translate([-1, 1, 0]) hull() { translate([0, 3, 0]) rotate([90,90,0]) cylinder(r=1,h=2, $fn=circle_res); translate([0.5, 1, 0]) rotate([0, 90,0]) cylinder(r=1,h=2, $fn=circle_res); translate([0.5, -1, 0]) rotate([0, 90,0]) cylinder(r=1,h=2, $fn=circle_res); rotate([0,0,33.5])translate([-2.5, -.5, 0]) rotate([0, 90, 0]) cylinder(r=1,h=2, $fn=circle_res); } translate([l,0,0]) { rotate([1,0,0]) translate([1.2,l6+3,0]) rotate([90,90,0]) cylinder(r=1,h=l6, $fn=circle_res); mirror() { rotate([0,0,r3]) translate([-2-l3,1,0]) cable_tube(l3); translate([-1.2, 1, 0]) hull() { translate([0, 3, 0]) rotate([90,90,0]) cylinder(r=1,h=2, $fn=circle_res); translate([0.5, 1, 0]) rotate([0, 90,0]) cylinder(r=1,h=2, $fn=circle_res); translate([0.5, -1, 0]) rotate([0, 90,0]) cylinder(r=1,h=2, $fn=circle_res); rotate([0,0,33.5])translate([-2.5, -.5, 0]) rotate([0, 90, 0]) cylinder(r=1,h=2, $fn=circle_res); } } } translate([-1,l2+3,0]) { rotate([90,90,0]) cylinder(r=1,h=l2, $fn=circle_res); rotate([0,0, r4]) translate([-1-l4,.5,0]) cable_tube(l4); hull() { rotate([90,90,0]) cylinder(r=1,h=2, $fn=circle_res); translate([.1,.5,0]) rotate([0,-90,-23]) cylinder(r=1,h=2, $fn=circle_res); translate([0,.5,-.5])sphere(r=1.5, $fn=circle_res); } } } } if(!fast) translate([size[0]/2 - side_clearance/2, size[1] - 51]) neopixel_feather(0.2); // if(!fast) neopixel_matrix(0); } front_panel(2);