diff --git a/magnet holder.scad b/magnet holder.scad index dbee6ef16f479084eb111588ade4f2fa2793e1d5..4cfbac2daaf99b3a68e194dd00fd3c6f0c0a918e 100644 --- a/magnet holder.scad +++ b/magnet holder.scad @@ -21,61 +21,77 @@ rodRad=3; linearBearingOD=12; linearBearingHeight=19; + union(){ translate([-80,0,0]){ + translate([-10,0,0])// color("blue") magnetPlate(); color("red") pillar(30); - + + translate([0,0,-20])// translate([40,0,-15]) motorSide(); + translate([0,0,30])// color("orange") translate([40,0,2]) - rotate([0,180,360/10*.5]) + rotate([0,180,360/10*-.15]) pinion(10); color("green") - translate([40,0,0]) + translate([40,0,20]) for (y = [-1,1]){ translate([0, y*(magnetLength+5+2*(rodRad+3))/2, 0]) bearingClamp(); } } - color("Purple") endPlate(30); + translate([10,0,0])// + color("Purple") endPlate(30); } +//color("red") magnetPlate(30); + // Magnet plate -module magnetPlate(){ - thickness = 10; +module magnetPlate(spacing = 30){ + thickness = 12; + thicknessMin = 7; + length = magnetLength+5; + $fn=50; union(){ difference(){// rod holders for (y = [-1,1]){ - translate([-thickness/2, y*(magnetLength+5+2*(rodRad+3))/2, 0]) + translate([-thickness/2, y*(length+2*(rodRad+3))/2, 0]) rotate([0,-90,0]) cube(size = [2*(rodRad+3),2*(rodRad+3), thickness], center = true); }; for (y = [-1,1]){ // rod insert---halfway through holder + 1mm so face doesn't line up - translate([1, y*(magnetLength+5+2*(rodRad+3))/2, 0]) + translate([1, y*(length+2*(rodRad+3))/2, 0]) rotate([0,-90,0]) cylinder(h=thickness/2+1, r=rodRad); }; } difference(){ //magnet trough - translate([0, -(magnetLength+5)/2, -(magnetWidth+5)/2]) + translate([0, -length/2, -(magnetWidth+5)/2]) rotate([0,-90,0]) cube([magnetWidth+5, magnetLength+5, thickness]); - translate([-5, -(magnetLength)/2, -(magnetWidth)/2]) // 5mm under magnet + translate([-thicknessMin, -magnetLength/2, -(magnetWidth)/2]) rotate([0,-90,0]) cube([magnetWidth, magnetLength, magnetHeight]); + + for (y = [-spacing/2, spacing/2]){ + translate([-thicknessMin+3, y, 0]) // cap recessed by 3mm + rotate([0,+90,0]) + boltHole(size=3, length=thicknessMin, extraCapHeight=10); } + } } } module pillar(spacing = 30){ - thickness = 8; + thickness = 10; width = 50; length = 80; cavitySideThickness = 10; @@ -85,25 +101,31 @@ module pillar(spacing = 30){ innerRadius=0;//shaft radius, in mm borders=5;//how thick should the borders around the central "shaft" be, in mm - translate([0, -width/2, -thickness/2+1]) - difference(){ - cube([length,width,thickness]); - for (y = [width/2-spacing/2, width/2+spacing/2]){ // M3 nut/bolt holes - translate([length-5, y, -1]) - rotate([0,0,-90]) - linear_extrude(height=thickness/2+3.2+1) - nutHole(size=3, proj=2); - - $fn=50; - translate([length-5, y, thickness/2]) - rotate([0,90,0]) - linear_extrude(height=6) boltHole(size=3, proj=1); - } - translate([cavityEndThickness, cavitySideThickness, -1]) - cube([length-cavityEndThickness*2, width-cavitySideThickness*2, thickness+2]); + translate([0, -width/2, -thickness/2]) + difference(){ + cube([length,width,thickness]); + for (r_z = [0,180]){ + translate([length/2, width/2, 0]) + rotate([0,0,r_z]) + translate([-length/2, -width/2, 0]) // center piece before rotation + for (y = [width/2-spacing/2, width/2+spacing/2]){ // M3 nut/bolt holes + translate([length-5, y, -1]) + rotate([0,0,-90]) + linear_extrude(height=thickness/2+3.2+1) + nutHole(size=3, proj=2); + + $fn=50; + translate([length-5, y, thickness/2]) + rotate([0,90,0]) + linear_extrude(height=6) boltHole(size=3, proj=1); + } + } + + translate([cavityEndThickness, cavitySideThickness, -1]) + cube([length-cavityEndThickness*2, width-cavitySideThickness*2, thickness+2]); } - translate([length/2, -width/2+7.2, -thickness/2+1]) + translate([length/2+2, -width/2+7.3, -borders+2]) rotate([0,0,180]) rack(innerRadius, borders, 180/circular_pitch*20, 10, pressureAngle*pi/180, centerAngle);