diff --git a/box.scad b/box.scad index c90779e..d1053c6 100644 --- a/box.scad +++ b/box.scad @@ -111,6 +111,37 @@ module hinge_mount(bz=WIN_THICK, bl=10) { } } +module hinge(theta=90) { + x=7; + py=20; + d = .4 / sqrt(2); + difference() { + left(x/2)cuboid([x,20+2*d,50], fillet=2, edges=EDGES_X_ALL); + hinge_mount($die=true); + } + left(5+d)back(py/2 + 5+d)zrot(theta){ + zrot(-theta)zspread(n=4, l=37.4 ) { + cyl(d=9, h=6, chamfer=.8); + right(5+d)fwd(9/4)cuboid([x,1+9/2,6], align=V_LEFT, chamfer=1, edges=EDGES_Y_RT+EDGE_BK_RT); + } + cyl(r=2, h=42); + zspread(n=3, l=25 ) difference() { + union() { + cyl(d=9, h=6, chamfer=.8); + right(5+d)back(9/4)cuboid([x,1+9/2,6], align=V_LEFT, chamfer=1, edges=EDGES_Y_RT+EDGE_FR_RT); + } + cyl(r=2.2, h=6.2); + } + difference() { + left((x)/2-5)back(10+5)cuboid([x,20+2*d,50], fillet=2, edges=EDGES_X_ALL); + right(5)back(10+6)zrot(180) { + hinge_mount(bl=9, $die=true); + %hinge_mount(bl=9,$die=false); + } + } + } +} + module box_edge(ps=PROFILE_SIZE, l=10, orient=ORIENT_Z, jh = JOINER_H,jw = JOINER_W, jb=5, jup = false, jdown=false, flx=false, ft=FLOOR_THICK, wl=WIN_LIP, wx=true, wt=WIN_THICK, wtr = WIN_TRIM, hm=false, ht=0, tubepass=false, tn = 2, ix=true, iy=true, rbfoot=false, cm=false, align=V_CENTER) { inner_off = ps/2 + wt; joiner_off = inner_off - jb/sqrt(2); @@ -210,36 +241,6 @@ module boxjoiner_clear(inset=5, slop=.01, jh=JOINER_H, jw=JOINER_W, align=V_FRON } } -module hinge(theta=90) { - x=7; - py=20; - d = .4 / sqrt(2); - difference() { - left(x/2)cuboid([x,20+2*d,50], fillet=2, edges=EDGES_X_ALL); - hinge_mount($die=true); - } - left(5+d)back(py/2 + 5+d)zrot(theta){ - zspread(n=4, l=37.4 ) { - cyl(d=9, h=6, chamfer=.8); - right(5+d)fwd(9/4)cuboid([x,1+9/2,6], align=V_LEFT, chamfer=1, edges=EDGES_Y_RT+EDGE_BK_RT); - } - cyl(r=2, h=42); - zspread(n=3, l=25 ) difference() { - union() { - cyl(d=9, h=6, chamfer=.8); - right(5+d)back(9/4)cuboid([x,1+9/2,6], align=V_LEFT, chamfer=1, edges=EDGES_Y_RT+EDGE_FR_RT); - } - cyl(r=2.2, h=6.2); - } - difference() { - left((x)/2-5)back(10+5)cuboid([x,20+2*d,50], fillet=2, edges=EDGES_X_ALL); - right(5)back(10+6)zrot(180) { - hinge_mount(bl=9, $die=true); - %hinge_mount(bl=9,$die=false); - } - } - } -} wt=WIN_TRIM; wl=WIN_LIP;