X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=reprap-play.git;a=blobdiff_plain;f=axlepin.scad;h=554a382a66950be25f11c4db54ef1319febf59da;hp=818b5a2f3fdb7f0aeb65ad45beecf3446ee574ca;hb=7f744cc777d843b40cab33b0b37c824fb035dac5;hpb=dbb40611844ae5274c44a16313b4319aff35475e diff --git a/axlepin.scad b/axlepin.scad index 818b5a2..554a382 100644 --- a/axlepin.scad +++ b/axlepin.scad @@ -1,17 +1,19 @@ // -*- C -*- function AxlePin_holerad() = 2; +function AxlePin_zoffset(holerad=2, slop=0.5) = (holerad - slop)*0.7; module AxlePin(axlerad, pinlen, holerad=2, tabthick=5, slop=0.5){ pinr = holerad - slop; intersection(){ - translate([0, 0, pinr*0.7]) { + union(){ translate([0, -pinlen/2, 0]) rotate([-90,0,0]) cylinder(r=pinr, h=pinlen, $fn=10); translate([-tabthick, axlerad, -holerad]) cube([tabthick*2, holerad*2, holerad*2]); } - translate([-50,-50,0]) cube([100,100,50]); + translate([-50,-50,-AxlePin_zoffset(holerad,slop)]) + cube([100,100,50]); } }