X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=simplephone-case.scad;h=b8fea21ddb800356be2421bb9ca6d6e52f898471;hb=371f759f3dd99928c6cbbe22914363fd02a9a378;hp=bc2cebf9da7637fd7ed998f087d7b9c6a0525e46;hpb=8d29013bdc7e0cd3f7afa7647404e387b6011d11;p=reprap-play.git diff --git a/simplephone-case.scad b/simplephone-case.scad index bc2cebf..b8fea21 100644 --- a/simplephone-case.scad +++ b/simplephone-case.scad @@ -13,14 +13,35 @@ thick = [ ]; btn_x = 58; -btn_dia = 14; +btn_dia = 13; btn_yprop = 0.23; +abtn_x = 45; +abtn_sz = [ 11, 13 ]; + +screen_xbot = 67; +screen_sz = [ 45, 46 ]; + +thumb_xbot = 90; +thumb_dia = 25; + +rail_ysz = 2.5; +rail_zsz = 2.5; + +case_x_less = 0; //case_x_less = 10; + +// calculated + +ym = psz[1]/2; + module Case(){ difference(){ mirror([1,0,0]) translate(-thick) - cube(psz + 2*thick - [1,0,0] * (thick[0])); + cube(psz + + 2*thick + - [1,0,0] * (thick[0]) + - [case_x_less, 0, 0]); for (yp= [ btn_yprop, 1-btn_yprop ]) translate([ -btn_x, @@ -28,8 +49,37 @@ module Case(){ 0.5 * psz[2] ]) cylinder(r= btn_dia/2, h=20); - #mirror([1,0,0]) - cube(psz + [1,0,0]); + translate([ -abtn_x, + btn_yprop * psz[1], + psz[2] ]) + cube(concat(abtn_sz, [ thick[2]*3 ]), center=true); + + mirror([1,0,0]) + translate([ screen_xbot, + (psz[1] - screen_sz[1])/2, + psz[2]-1 ]) + cube(concat(screen_sz, [ thick[2]+2 ])); + + hull(){ + for (x=[ thumb_xbot+thumb_dia/2, psz[0]+10 ]) + translate([ -x, + ym, + -thick[2]-1 ]) + cylinder(r= thumb_dia/2, + h= thick[2] + 2, + $fn= 20); + } + + mirror([1,0,0]) + difference(){ + cube(psz + [1,0,0]); + + for (m=[0,1]) { + translate([0,ym,0]) mirror([0,m,0]) translate([0,-ym,0]) + translate([-1,-1, psz[2]-rail_zsz]) + cube([psz[0]+1, rail_ysz+1, rail_zsz+1]); + } + } } }