chiark / gitweb /
osstest-arm-psu-bracket: ready for first test print
[reprap-play.git] / axlepin.scad
index d399092012a805d43b764f1a571f3989ea294199..554a382a66950be25f11c4db54ef1319febf59da 100644 (file)
@@ -1,16 +1,27 @@
 // -*- 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]);
+  }
+}
+
+function Washer_thick() = 1.2;
+
+module Washer(axlerad, washerrad, thick=1.2, slop=0.5){
+  difference(){
+    cylinder(h=thick, r=washerrad);
+    translate([0,0,-1]) cylinder(h=thick+2, r=axlerad+slop);
   }
 }