chiark / gitweb /
tube-crossdrill-jig wip
[reprap-play.git] / tube-crossdrill-jig.scad
1 // -*- C -*-
2
3 rearwallthick = 3;
4 basethick = 3;
5 mainframeendthick = 2.5;
6
7 tubedia=16;
8 tubetubethick=2;
9 tubetubetopslop=1;
10
11 boltholedia = 6.5 + 0.5;
12 boltholeslotshorter = 6;
13 mainframeholedia = 5 + 0.5;
14
15 // "slot" refers to the things in the base of the drill press stand
16 backslotedgespace = 71;
17 slotwidth = 11.5;
18 backslotmid2screwhole = 17;
19 slotplugheight = 5.5;
20 slotplugdepth = 10;
21
22 // "keepslot" refers to the screws in the wooden jig block
23 keepslotstartz = 20;
24 keepslotlen = 25;
25 keepslotx = backslotedgespace / 2;
26 keepslotwidth = 4;
27
28 mainframeextraside = 15;
29 mainframeextrafront = 25;
30
31 rearwallstrengthwidth = 10;
32
33 // computed values
34
35 mainframeholex = backslotedgespace/2 + slotwidth/sqrt(2) +
36   backslotmid2screwhole / sqrt(2);
37
38 mainframeholey = -backslotmid2screwhole / sqrt(2);
39
40 mainframemaxx = mainframeholex + mainframeextraside;
41 mainframeminy = mainframeholey - mainframeextrafront;
42 mainframemaxz = keepslotstartz + keepslotlen;
43
44 module MainFrame(){
45   for (m=[0,1]) {
46     mirror([m,0,0]) {
47       translate([-1, mainframeminy, 0])
48         cube([mainframemaxx+1, -mainframeminy, basethick]);
49       translate([-1, -rearwallthick, 0])
50         cube([mainframemaxx+1, rearwallthick, mainframemaxz]);
51
52       for (x=[keepslotx - 10, mainframemaxx]) {
53         translate([x,0,0])
54           rotate([90,0,-90])
55           linear_extrude(height=mainframeendthick)
56           polygon([[-mainframeminy, 0],
57                    [0, mainframemaxz],
58                    [0, 0]]);
59       }
60
61       translate([backslotedgespace/2, 0, 1])
62         mirror([0,0,1])
63         linear_extrude(height=slotplugheight+1)
64         polygon([[0,0],
65                  [slotwidth * sqrt(2), 0],
66                  [slotplugdepth / sqrt(2) + slotwidth * sqrt(2),
67                   -slotplugdepth],
68                  [slotplugdepth / sqrt(2), -slotplugdepth]]);
69       translate([-1,
70                  -rearwallthick - boltholeslotshorter + 0.2,
71                  tubedia + tubetubetopslop + tubetubethick + 4])
72         cube([keepslotx - 10 + 1,
73               boltholeslotshorter + 0.5,
74               rearwallstrengthwidth]);
75     }
76   }
77 }
78
79 module TubeThing(extralen, dia, extraheight, underheight){
80   effheight = tubetubetopslop + extraheight + underheight;
81   len = -mainframeminy + extralen * 2;
82   translate([0, mainframeminy - extralen, -underheight]) {
83     translate([0,0, dia/2 + effheight])
84       rotate([-90,0,0]) cylinder(h=len, r=dia/2);
85     translate([-dia/2, 0, 0])
86       cube([dia, len, effheight + dia/2]);
87   }
88 }
89
90 module Jig(){
91   difference(){
92     union(){
93       MainFrame();
94       TubeThing(0, tubedia+tubetubethick*2, -tubetubethick, 0);
95     }
96     union(){
97       translate([0,0,-0.1])
98         TubeThing(10, tubedia, 0, 5);
99       translate([-boltholedia/2, mainframeminy - 1, -5])
100         cube([boltholedia,
101               -mainframeminy + 1 - rearwallthick - boltholeslotshorter,
102               mainframemaxz + 10]);
103       for (m=[0,1]) {
104         mirror([m,0,0]) {
105           translate([mainframeholex, mainframeholey, -30])
106             cylinder(h=basethick+40, r=mainframeholedia/2);
107           translate([keepslotx - keepslotwidth/2,
108                      -10, keepslotstartz])
109             cube([keepslotwidth, 20, keepslotlen + 10]);
110         }
111       }
112     }
113   }
114 }
115
116 //MainFrame();
117 //TubeThing(0, tubedia);
118
119 Jig();