chiark / gitweb /
filamenttrestle wip plug fix some dimensions nfc
[reprap-play.git] / filamenttrestle.scad
1 // -*- C -*-
2
3 spoolwidth = 80; // fixme needs to be measured
4
5 include <doveclip.scad>
6
7 spoolwidthgap = 2;
8 barrady = 5;
9 barradz = 7;
10 guidewidth = 3;
11 guiderad = 20;
12
13 plugl = 12;
14 plugwmin = min(8, DoveClipPairSane_width(2));
15 plugh = 10;
16 plugslope = 0.5;
17 plugwmax = plugwmin + plugh * plugslope * 2;
18
19 module Plug(d=0){
20   a = atan(plugslope);
21   tdx = d * cos(a);
22   tdy = d * sin(a);
23   bdx = d / cos(a);
24   rotate([90,0,90]) linear_extrude(height=plugl+0.1){
25     polygon([[-(plugwmax/2 + bdx),  0],
26              [-(plugwmin/2 + tdx),  plugh + tdy],
27              [+(plugwmin/2 + tdx),  plugh + tdy],
28              [+(plugwmax/2 + bdx),  0]]);
29   }
30   translate([plugl + DoveClip_depth()*0.7, 0, 0])
31     DoveClipPairSane(count=1, h=plugh-0.1);
32 }
33
34 module Bar(){
35   spoolw = spoolwidth + spoolwidthgap*2;
36   barz = barradz * 0.5;
37   biggestw = spoolw + 50;
38
39   intersection(){
40     for (mir=[0,1]) {
41       mirror([mir,0,0]) {
42         translate([0,0,barz]) {
43           scale([1,barrady,barradz]) translate([-1,0,0])
44             rotate([0,90,0]) cylinder(r=1, h=spoolw/2+2, $fn=30);
45           translate([spoolw/2,0,0])
46             rotate([0,90,0]) cylinder(r=guiderad, h=guidewidth, $fn=60);
47         }
48         translate([spoolw/2 + guidewidth, 0, 0])
49           Plug();
50       }
51     }
52     translate([-biggestw/2, -50, 0])
53       cube([biggestw, 100, 100]);
54   }
55 }
56
57 Bar();
58 //Plug(d=1);