$fn = $preview ? 64 : 128;//translate([90,0,0])roundedcube([80,56,50],false,0.6);//, center, radius, apply_to); //Donderdag 8:30 Well r=40; //6,3 x 4 W=63; H=40; Tube=1; // Print gray or white Case=1; // Print sand or light brown LCDBracket=1; // Print dark brown with bronze letters. Supports op build plate needed sicne the letters are at the top. Controlpanel=1; // Print brown and print on its side and apply Fuzzy Skin to walls Table=1; // Print sand or light brown Back=1; // Print sand or light brown or if you prefer dark gray if(Back)translate([0,55,0]) color("lightgrey"){ difference() { union() { rotate([90,0,0]) Cube(110,70,1); mirror([0,1,0])rotate([90,0,0])hull() { S=10; translate([110/2-S,70/2-S,0])cylinder(d1=8,d2=3,h=10); translate([110/2+S,70/2-S,0])cylinder(d1=8,d2=3,h=10); translate([110/2+S,70/2+S,0])cylinder(d1=8,d2=3,h=10); translate([110/2-S,70/2+S,0])cylinder(d1=8,d2=3,h=10); } } // Room for USB cable hull() { translate([2.4,4,20])rotate([90,0,0])cylinder(d=4,h=10); translate([0,4,20])rotate([90,0,0])cylinder(d=4,h=10); } } } if(Table) translate([3,3,-3]) { Cube(104,44,2.4,3); T=10; translate([T,T,0.9])rotate([-10,10,0])mirror([0,0,1])cylinder(d1=12,d2=6,h=55); translate([104-T,T,0.9])rotate([-10,-10,0])mirror([0,0,1])cylinder(d1=12,d2=6,h=55); translate([104-T,44-T,0.9])rotate([10,-10,0])mirror([0,0,1])cylinder(d1=12,d2=6,h=55); translate([T,44-T,0.9])rotate([10,10,0])mirror([0,0,1])cylinder(d1=12,d2=6,h=55); } if(Controlpanel) translate([86,2,3.1]) { difference() { union() { cube([21,3,62.8]); cube([21,48,2]); } // Push button translate([10.5,10,50]) rotate([90,0,0])cylinder(d=10,h=40); } } if(LCDBracket) translate([3,4,3]) { difference() { color("saddlebrown")union() { cube([80,5,63]); translate([0.2,0,0.2])cube([80-0.4,46,4]); //Bottom plate translate([0.2,5,59-0.2])cube([80-0.4,41,4]); //Top plate } translate([8.5,-1,13.5])cube([63,10,40]); // Space for PCB pins translate([4,2,18]) cube([10,10,32]); } color("yellow")translate([40,0,5]) rotate([90,0,0]) linear_extrude(height=0.6) text("PHILIPS",font="Gill Sans:style=Bold", valign="center",halign="center",size=5.5); } if(Case) color("burlywood") { difference() { Kubus([110,50,70]); translate([3,-3,3])cube([80,100,63]); // Space tube translate([86,-3,3])cube([21,100,63]); // Space side panel translate([50,12,9])cube([50,60,51]); // Pass-through for wires, etc. } } module Kubus(v) { if($preview) cube(v); else roundedcube(v); } if(Tube) translate([11.5,-5,16.5]) color("lightgrey") { difference() { translate([-4,-4,-4])cube([W+8,2,H+8]); translate([0,4,0])hull() { OFF=4; translate([OFF,0,OFF])cyl(); translate([OFF,0,H-OFF])cyl(); translate([OFF/2+15,0,H/2])cyl(30);//Midden translate([W/2,0,H-OFF/2-15])cyl(30);//Midden translate([W-OFF,0,H-OFF])cyl(); translate([W-OFF/2-15,0,H/2])cyl(30);//Midden translate([W-OFF,0,OFF])cyl(); translate([W/2,0,OFF/2+15])cyl(30);//Midden //#translate([W/2-10,0,OFF/2+1])cyl(); //translate([W/2+8,0,OFF/0.8])cyl(); } } } module Cube(xdim ,ydim ,zdim,rdim=1) { hull(){ translate([rdim,rdim,0])cylinder(h=zdim,r=rdim); translate([xdim-rdim,rdim,0])cylinder(h=zdim,r=rdim); translate([rdim,ydim-rdim,0])cylinder(h=zdim,r=rdim); translate([xdim-rdim,ydim-rdim,0])cylinder(h=zdim,r=rdim); } } module cyl(R=2) { rotate([90,0,0])cylinder(d=R,h=10); } // Higher definition curves $fs = 0.01; module roundedcube(size = [1, 1, 1], center = false, radius = 0.5, apply_to = "all") { // If single value, convert to [x, y, z] vector size = (size[0] == undef) ? [size, size, size] : size; translate_min = radius; translate_xmax = size[0] - radius; translate_ymax = size[1] - radius; translate_zmax = size[2] - radius; diameter = radius * 2; module build_point(type = "sphere", rotate = [0, 0, 0]) { if (type == "sphere") { sphere(r = radius); } else if (type == "cylinder") { rotate(a = rotate) cylinder(h = diameter, r = radius, center = true); } } obj_translate = (center == false) ? [0, 0, 0] : [ -(size[0] / 2), -(size[1] / 2), -(size[2] / 2) ]; translate(v = obj_translate) { hull() { for (translate_x = [translate_min, translate_xmax]) { x_at = (translate_x == translate_min) ? "min" : "max"; for (translate_y = [translate_min, translate_ymax]) { y_at = (translate_y == translate_min) ? "min" : "max"; for (translate_z = [translate_min, translate_zmax]) { z_at = (translate_z == translate_min) ? "min" : "max"; translate(v = [translate_x, translate_y, translate_z]) if ( (apply_to == "all") || (apply_to == "xmin" && x_at == "min") || (apply_to == "xmax" && x_at == "max") || (apply_to == "ymin" && y_at == "min") || (apply_to == "ymax" && y_at == "max") || (apply_to == "zmin" && z_at == "min") || (apply_to == "zmax" && z_at == "max") ) { build_point("sphere"); } else { rotate = (apply_to == "xmin" || apply_to == "xmax" || apply_to == "x") ? [0, 90, 0] : ( (apply_to == "ymin" || apply_to == "ymax" || apply_to == "y") ? [90, 90, 0] : [0, 0, 0] ); build_point("cylinder", rotate); } } } } } } }