little bug fixes

master
kreativmonkey 7 years ago
parent d33b38fe1a
commit dbacf0fba4

@ -14,6 +14,7 @@
// lock // lock
// tux // tux
// moneybox minimum hight 200mm // moneybox minimum hight 200mm
// dev
renderer = "moneybox"; renderer = "moneybox";
// Dimention in mm // Dimention in mm
@ -58,7 +59,7 @@ if ( renderer == "moneybox") {
} }
} }
if (renderer == "test"){ if (renderer == "dev"){
difference(){ difference(){
tux(hight, true); tux(hight, true);
@ -66,8 +67,10 @@ if (renderer == "test"){
cutLock(hight); cutLock(hight);
coinhole(hight, currency); coinhole(hight, currency);
cube(200); translate([-hight/2, 0, 0]) cube(hight);
} }
} }
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
@ -96,19 +99,19 @@ module coinhole(size, currency = "euro") {
if( currency == "euro" ) { if( currency == "euro" ) {
if(size < 170) echo("The minimal hight is 150mm"); if(size < 170) echo("The minimal hight is 150mm");
translate([0,size*0.05,size*0.95]) rotate([0,0,90]) cube([3, 30, size*0.3], center=true); translate([0,size*0.05,size*0.95]) rotate([0,0,90]) cube([3, 30, size*0.3], center=true);
translate([0, 0, size*0.60]) cylinder(r=35/2, h=size*0.2); translate([0, 0, size*0.60]) cylinder(d=35, h=size*0.18);
} }
if( currency == "dollar" ) { if( currency == "dollar" ) {
if(size < 170) echo("The minimal hight is 170mm"); if(size < 170) echo("The minimal hight is 170mm");
translate([0,size*0.05,size*0.95]) rotate([0,0,90]) cube([3, 35, size*0.3], center=true); translate([0,size*0.05,size*0.95]) rotate([0,0,90]) cube([3, 35, size*0.3], center=true);
translate([0, 0, size*0.60]) cylinder(r=40/2, h=size*0.2); translate([0, 0, size*0.60]) cylinder(d=40, h=size*0.18);
} }
if( currency == "sterling" ) { if( currency == "sterling" ) {
if(size < 190) echo("The minimal hight is 190mm"); if(size < 190) echo("The minimal hight is 190mm");
translate([0,size*0.05,size*0.95]) rotate([0,0,90]) cube([4, 43, size*0.3], center=true); translate([0,size*0.05,size*0.95]) rotate([0,0,90]) cube([4, 43, size*0.3], center=true);
translate([0, 0, size*0.60]) cylinder(r=45/2, h=size*0.2); translate([0, 0, size*0.60]) cylinder(d=45, h=size*0.18);
} }
@ -153,25 +156,40 @@ module tux(size, inside = false){
} }
// Botton // Botton
resize(newsize=[size*0.60,size*0.52,0]) resize(newsize=[size*0.59,size*0.52,0])
cylinder(r=size*0.2, h=size*0.06); cylinder(r2=size*0.14, r1=size*0.13, h=size*0.06);
} }
module head(size, wthikness = 0){ module head(size, wthikness = 0){
difference(){ if( wthikness == 0){
difference(){
union(){ union(){
// HEAD // HEAD
translate([0,1,size*0.82]) translate([0,1,size*0.82])
rotate([30,0,0]) rotate([30,0,0])
resize(newsize=[size*0.36-wthikness,size*0.34-wthikness,size*0.34-wthikness]) resize(newsize=[size*0.36-wthikness,size*0.34-wthikness,size*0.34-wthikness])
sphere(size*0.16); sphere(size*0.16-wthikness);
} }
// Eyeholes // Eyeholes
translate([-size*0.07,-size*0.19,size*0.85]) rotate([80,-5,-10]) resize(newsize=[size*0.1, size*0.15, size*0.12]) cylinder(r=size*0.12, h=size*0.01, center=true); translate([-size*0.07,-size*0.19+wthikness,size*0.85]) rotate([80,-5,-10]) resize(newsize=[size*0.1, size*0.15, size*0.12]) cylinder(r=size*0.12, h=size*0.01, center=true);
translate([size*0.07,-size*0.19,size*0.85]) rotate([80,5,10]) resize(newsize=[size*0.1, size*0.15, size*0.12]) cylinder(r=size*0.12, h=size*0.01, center=true); translate([size*0.07,-size*0.19+wthikness,size*0.85]) rotate([80,5,10]) resize(newsize=[size*0.1, size*0.15, size*0.12]) cylinder(r=size*0.12, h=size*0.01, center=true);
translate([0,-size*0.155,size*0.85]) rotate([-10,0,0]) resize(newsize=[size*0.15, size*0.02,size*0.15])sphere(size*0.02); translate([0,-size*0.155+wthikness,size*0.85]) rotate([-10,0,0]) resize(newsize=[size*0.15, size*0.02,size*0.15])sphere(size*0.02);
}
} else {
difference(){
union(){
// HEAD
translate([0,1,size*0.82])
rotate([30,0,0])
resize(newsize=[size*0.36-wthikness,size*0.34-wthikness,size*0.34-wthikness])
sphere(size*0.16-wthikness);
}
translate([0,-size*0.135,size*0.85]) rotate([-10,0,0]) cube([size*0.25, size*0.05, size*0.25], center=true);
}
} }
@ -187,20 +205,22 @@ module head(size, wthikness = 0){
sphere(3); sphere(3);
// beak // beak
hull(){ if(wthikness ==0){
// tip hull(){
translate([0,-size*0.22,size*0.74]) // tip
resize(newsize=[size*0.11-wthikness,size*0.15-wthikness,size*0.044-wthikness]) translate([0,-size*0.22,size*0.74])
sphere(2); resize(newsize=[size*0.11-wthikness,size*0.15-wthikness,size*0.044-wthikness])
//chin sphere(2);
translate([0,-size*0.05,size*0.73]) //chin
resize(newsize=[size*0.25-wthikness,size*0.03-wthikness,size*0.22-wthikness]) translate([0,-size*0.05,size*0.73])
sphere(2); resize(newsize=[size*0.25-wthikness,size*0.03-wthikness,size*0.22-wthikness])
//nose sphere(2);
translate([0,-10,size*0.77]) //nose
rotate([5,0,0]) translate([0,-10,size*0.77])
resize(newsize=[size*0.01-wthikness,size*0.22-wthikness,size*0.044-wthikness]) rotate([5,0,0])
sphere(2); resize(newsize=[size*0.01-wthikness,size*0.22-wthikness,size*0.044-wthikness])
sphere(2);
}
} }
} }

Loading…
Cancel
Save