chiark / gitweb /
filamenttrestle adjustments
[reprap-play.git] / filamenttrestle.scad
index 8d17cf69f2f8a7dc1203364c7975898126937bf8..799bf4ea7e20be05564b8d411e81780b864ccd74 100644 (file)
@@ -1,15 +1,20 @@
 // -*- C -*-
 
 spoolwidth = 80; // fixme needs to be measured
-trestleheight = 80; // fixme needs to be checked
-trestlebase = 80; // fixme needs to be checked
+spoolinnerrad = 25; // fixme needs to be checked
+spoolouterrad = 60; // fixme needs to be checked
 
 include <doveclip.scad>
 include <axlepin.scad>
 
-spoolwidthgap = 2;
+spoolradclear = 10;
+
+spoolinnerslop = 2;
+
 barrad = 7;
-barwasherrad = 20;
+barwasherrad = 17;
+
+hubbasethick = 4;
 
 legw = 12;
 plugl = 20;
@@ -34,6 +39,17 @@ pindwidth = 0.75;
 pintaperlen = plugwmax * 0.85;
 pinstraightlen = 10;
 
+spoolouterpad = AxlePin_holerad()*2 * 1.5;
+spoolbarlen = spoolwidth +
+  2*(Washer_thick() + hubbasethick + AxlePin_holerad()
+     + spoolinnerslop + spoolouterpad);
+  barz = barrad * 0.5;
+axlepin_x = spoolwidth/2 + hubbasethick +
+  Washer_thick() + spoolinnerslop + AxlePin_holerad()*0.5;
+
+trestleheight = spoolouterrad + spoolradclear - barz;
+trestlebase = trestleheight * 1.2;
+
 module Plug(d=0){
   dw = d;
   dh = d;
@@ -52,8 +68,7 @@ module Plug(d=0){
 }
 
 module Bar(){ ////toplevel
-  spoolw = spoolwidth + spoolwidthgap*2;
-  barz = barrad * 0.5;
+  spoolw = spoolbarlen;
   biggestw = spoolw + 50;
 
   intersection(){
@@ -65,8 +80,15 @@ module Bar(){ ////toplevel
          cube([spoolw/2+1.1, 100, 100]);
       }
     }
-    translate([-biggestw/2, -50, 0])
-      cube([biggestw, 100, 100]);
+    difference(){
+      translate([-biggestw/2, -50, 0])
+       cube([biggestw, 100, 100]);
+      for (mir=[0,1]) {
+       mirror([mir,0,0])
+         translate([axlepin_x, 0, -50])
+         cylinder(r=AxlePin_holerad(), 100, $fn=15);
+      }
+    }
     translate([0,0,barz]) {
       translate([-100,0,0])
        rotate([0,90,0]) cylinder(r=barrad, h=200, $fn=30);
@@ -74,10 +96,14 @@ module Bar(){ ////toplevel
   }
 }
 
-module FtAxlePin(){
+module FtAxlePin(){ ////toplevel
   AxlePin(barrad, (barrad + barwasherrad*2)/3 * 2);
 }
 
+module AxleWasher(){ ////toplevel
+  Washer(barrad, barwasherrad);
+}
+
 module Trestle(){ ////toplevel
   legang = atan2(trestlebase/2, trestleheight);
   eplen = sqrt(trestleheight*trestleheight + trestlebase*trestlebase*0.25);
@@ -169,10 +195,33 @@ module TestKit(){ ////toplevel
   }
 }
 
+module DemoSpool(){
+  rotate([0,90,0]) translate([0,0,-spoolwidth/2])
+    difference(){
+      cylinder(r=spoolouterrad, h=spoolwidth);
+      translate([0,0,-1]) cylinder(r=spoolinnerrad, h=spoolwidth+2);
+    }
+}
+
+module Demo(){
+  Bar();
+  for (mir=[0,1]) {
+    mirror([mir,0,0]) {
+      translate([spoolbarlen/2,0,0]) rotate([90,0,90]) Trestle();
+      translate([spoolwidth/2 + hubbasethick + spoolinnerslop/4, 0, barz])
+       rotate([0,90,0]) AxleWasher();
+      translate([axlepin_x, 0, barz]) rotate([90,0,90]) FtAxlePin();
+    }
+  }
+  %translate([0,0,barz]) DemoSpool();
+}
+
 //Bar();
-FtAxlePin();
+//FtAxlePin();
+//AxleWasher();
 //Trestle();
 //Pin();
 //TestKit();
 //Plug(d=1);
 //ExtenderPillars(80,12,8, baseweb=true);
+Demo();