X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=salter-scale-hook.scad;h=3a8cfa354c0ca1642c4415a734a2b2da4251efec;hb=d7b0d240a8d8cf34c040e32dd7fcbc146a9bcc28;hp=025e54a97e9d99dcc1ef2e553959c2371129783f;hpb=665a2c6a2e65094bcbe29993dcbe269f2c2564d3;p=reprap-play.git diff --git a/salter-scale-hook.scad b/salter-scale-hook.scad index 025e54a..3a8cfa3 100644 --- a/salter-scale-hook.scad +++ b/salter-scale-hook.scad @@ -9,7 +9,8 @@ screw_head_dia = 8.2 + 1.0; rod_offset = 14 + 2; mainheight = 25; width = 40; -rearthick = 3; +rearthick = 4; +screw_head_depth = 2; // calculated @@ -19,6 +20,13 @@ ymin = yminc-thick/2; ymaxc = mainheight; ymax = mainheight+thick/2; +cutdepth = rod_offset - rod_dia/2 - rearthick; + +cut_z0 = screw_head_dia/2; +cut_z1 = width/2 - rearthick; + +cutslopez = cutdepth * 0.5; + module C() { circle(r = thick/2, $fn=30); } @@ -42,8 +50,13 @@ module Profile() { } module CutProfile(){ - x = rod_dia/2 + rearthick; - rectfromto([x,yminc], [30,ymaxc]); + hull(){ + for (x = [rod_dia/2 + thick/2, 30]) { + for (y= [yminc,ymaxc] ) { + translate([x,y]) circle(r = (thick-rearthick)/2, $fn=20); + } + } + } } module ProfileDemo(){ @@ -51,4 +64,45 @@ module ProfileDemo(){ color("red") translate([0,0,1]) CutProfile(); } -ProfileDemo(); +module Cut(less){ + translate([0,0, cut_z0 + less]) + linear_extrude(height = cut_z1 - cut_z0 - less*2) + CutProfile(); +} + +module ScrewHole(){ + xd = (screw_head_dia-screw_dia)/2; + translate([0,0,-50]) + cylinder(h=100, r= screw_dia/2, $fn=20); + hull(){ + translate([0,0,-xd]) + cylinder(h=1, r= screw_dia/2, $fn=50); + cylinder(h=20, r= screw_head_dia/2, $fn=50); + } +} + +module Hook(){ + difference(){ + translate([0,0, -width/2]) + linear_extrude(height=width) Profile(); + + for (m=[0,1]) { + mirror([0,0,m]) { + hull(){ + Cut(cutslopez); + translate([cutdepth,0,0]) Cut(0); + } + } + } + + translate([rod_dia/2 + screw_head_depth, + ymaxc - screw_head_dia, + 0]) { + rotate([0,-90,0]) + ScrewHole(); + } + } +} + +//ProfileDemo(); +Hook();