$fn=128; Deksel=01; DoLetters=0; Kast=10; Tag=0; SCHAKELAAR=12.5; if(false) { WTAG=45; HTAG=60; difference() { union() { cube([WTAG+8,HTAG+8,2.8]); translate([(WTAG+8)/2,0,0]) cylinder(d=30,h=2.8); // Oog translate([0,HTAG+8,0]) difference() { cylinder(d=9.8,h=2.8); } } // Holle ruimte voor sticker translate([(WTAG+8)/2,0,0.8]) cylinder(d=27,h=1); translate([3.5,3.5,1.4])cube([WTAG+1,HTAG+1,10]); translate([0,HTAG+8,0])translate([0,0,-1])cylinder(d=5.2,h=10); // Oog } #translate([(WTAG+8)/2,-2,2.8]) linear_extrude(height=0.6) text("Nutri",size=4.5,font="Ubuntu:style=Bold",valign="center",halign="center"); #translate([(WTAG+8)/2,-8,2.8]) linear_extrude(height=0.6) text("Sense",size=4.5,font="Ubuntu:style=Bold",valign="center",halign="center"); /* WTAG=37.6; HTAG=48.6; difference() { Cube(WTAG+4,HTAG+4,1.6); translate([2,2,1.2])cube([WTAG,HTAG,1]);// 3,7 x 4,8 translate([(WTAG+4)/2,(HTAG+4)/2,0.6])cylinder(d=27,h=10); } */ } if(Tag) { WTAG=45; HTAG=60; difference() { union() { cube([WTAG+8,HTAG+8,2.8]); //translate([(WTAG+8)/2,0,0]) cylinder(d=30,h=2.8); } // Holle ruimte voor sticker translate([(WTAG+8)/2,45,0.8]) cylinder(d=27,h=1); translate([3.5,3.5,1.4])cube([WTAG+1,HTAG+1,10]); } } if(DoLetters) { Letters(); } if(Kast) translate([-2,-2,-40]) { difference() { Cube(144,174,40); translate([2,2,2])Cube(144-4,174-4,40); //translate([137,135,20])cube([20,4,30]); // USB 16x8 translate([144/2-7,170,4])cube([16,80,7]); // Luchtcirulatie (ding werd anders te warm!) hull() { translate([144/2-15,180,22])rotate([90,0,0])cylinder(d=3,h=20); translate([144/2+15,180,22])rotate([90,0,0])cylinder(d=3,h=20); } hull() { translate([-5,30,22])rotate([90,0,90])cylinder(d=3,h=20); translate([-5,60,22])rotate([90,0,90])cylinder(d=3,h=20); } hull() { translate([140,30,22])rotate([90,0,90])cylinder(d=3,h=20); translate([140,60,22])rotate([90,0,90])cylinder(d=3,h=20); } } // Opstaand randje hull() { translate([0,172,50])Cube(144,2,2); translate([0,172,38])Cube(144,2,2); } hull() { translate([0,172,50])Cube(2,2,2); translate([0,172,38])Cube(2,2,2); translate([0,120,38])cube([2,2,2]); } hull() { translate([142,172,50])Cube(2,2,2); translate([142,172,38])Cube(2,2,2); translate([142,120,38])cube([2,2,2]); } //#translate([0,H+2,54])Cube(W+4,2,2); translate([6,6,0])Pilaar(H=35); translate([144-6,6,0])Pilaar(H=35); translate([144-6,174-6,0])Pilaar(H=35); translate([6,174-6,0])Pilaar(H=35); translate([6,(174-6)/2,0])Pilaar(H=35); translate([144-6,(174-6)/2,0])Pilaar(H=35); // Oortjes cylinder(d=14,h=0.4); translate([144,0,0])cylinder(d=14,h=0.4); translate([144,174])cylinder(d=14,h=0.4); translate([0,174,0])cylinder(d=14,h=0.4); } if(Deksel) { difference() { Cube(140,170,3,1.4); translate([70-78/2,120,-1]) LCDGat(); translate([4,4,-1])cylinder(d=2.6,h=10); translate([140-4,4,-1])cylinder(d=2.6,h=10); translate([140-4,170-4,-1])cylinder(d=2.6,h=10); translate([4,170-4,-1])cylinder(d=2.6,h=10); // Schakelaars translate([87,20,-1]) cylinder(d=SCHAKELAAR,h=10); translate([116,20,-1]) cylinder(d=SCHAKELAAR,h=10); Letters(); } translate([70-93/2-2.5,120-(60-25.4)/2,-9])color("green")LCDBack(); //translate([70,99,0])rotate([0,0,270])color("green")Arduino(); //translate([20,20,0]) NFC(); } module NFC() { %cube([39.25,59.9,1]);// Zelftappers M2x6 translate([7,6.85,-4])difference(){cylinder(d=6,h=4);cylinder(d=2.2,h=4);} translate([39.25-7,6.85,-4])difference(){cylinder(d=6,h=4);cylinder(d=2.2,h=4);} translate([2.25,59.9-15.7,-4])difference(){cylinder(d=6,h=4);cylinder(d=2.2,h=4);} translate([39.25-2.25,59.9-15.7,-4])difference(){cylinder(d=6,h=4);cylinder(d=2.2,h=4);} } module Arduino() { %cube([69,54,1]); // Zelftappers M2x6 translate([13.97,2.54,-4])difference(){cylinder(d=6,h=4);cylinder(d=2.2,h=4);} translate([66.04,2.54,-4])difference(){cylinder(d=6,h=4);cylinder(d=2.2,h=4);} translate([66.04,35.56,-4])difference(){cylinder(d=6,h=4); cylinder(d=2.2,h=4);} translate([15.24,50.08,-4])difference(){cylinder(d=6,h=4); cylinder(d=2.2,h=4);} } module Letters() { #translate([87,5,2]) linear_extrude(height=1) text("OK",size=5.2,font="Ubuntu:style=Condensed Bold",halign="center",valign="baseline"); #translate([116,5,2]) linear_extrude(height=1) text("Cancel",size=5.2,font="Ubuntu:style=Condensed Bold",halign="center",valign="baseline"); //translate([122,5,2]) linear_extrude(height=1) // text("Sync",size=4,font="Ubuntu:style=Condensed Bold",halign="center",valign="baseline"); #translate([18,10,2.2]) difference() { Cube(48,54,0.8,4); translate([3,3,-3])Cube(48-6,54-6,10,4); } translate([42,36,2.2])linear_extrude(height=0.8) text("TAG",halign="center",valign="center",size=8, font="Ubuntu:style=Bold"); translate([70,94,2.2])linear_extrude(height=0.8) text("NutriSense",halign="center",valign="center",size=12, font="Continuum Bold:style=Regular"); } module LCDGat() { Cube(78,25.4,40,1); } module LCDBack() { difference() { union() { //#cube([90,60,9]); translate([2.5,2.5,0])cylinder(d=9,h=9); translate([93+2.5,2.5,0])cylinder(d=9,h=9); translate([93+2.5,60-2.5,0])cylinder(d=9,h=9); translate([2.5,60-2.5,0])cylinder(d=9,h=9); } translate([(93-78)/2,(60-25.4)/2,-1])LCDGat(); // Busjes M3x8x5 translate([2.5,2.5,-1])cylinder(d=4.8,h=8); translate([93+2.5,2.5,-1])cylinder(d=4.8,h=8); translate([93+2.5,60-2.5,-1])cylinder(d=4.8,h=8); translate([2.5,60-2.5,-1])cylinder(d=4.8,h=8); // Ruimte voor soldeerogen translate([8,55,-1])cube([40,6,5]); } } // Knoppen: OK, Wissen, Sync // Tag, LCD 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 Pilaar(W=10,H=40) { difference() { cylinder(d=W,h=H); // M3x10 translate([0,0,H-10]) cylinder(d=3,h=11); } }