chiark / gitweb /
tube-crossdrill-jig: rotate
[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 keepslotclear = 10;
33
34 // computed values
35
36 mainframeholex = backslotedgespace/2 + slotwidth/sqrt(2) +
37   backslotmid2screwhole / sqrt(2);
38
39 mainframeholey = -backslotmid2screwhole / sqrt(2);
40
41 mainframemaxx = mainframeholex + mainframeextraside;
42 mainframeminy = mainframeholey - mainframeextrafront;
43 mainframemaxz = keepslotstartz + keepslotlen;
44
45 module MainFrame(){
46   for (m=[0,1]) {
47     mirror([m,0,0]) {
48       translate([-1, mainframeminy, 0])
49         cube([mainframemaxx+1, -mainframeminy, basethick]);
50       translate([-1, -rearwallthick, 0])
51         cube([mainframemaxx+1, rearwallthick, mainframemaxz]);
52
53       for (x=[keepslotx - keepslotclear, mainframemaxx]) {
54         translate([x,0,0])
55           rotate([90,0,-90])
56           linear_extrude(height=mainframeendthick)
57           polygon([[-mainframeminy, 0],
58                    [0, mainframemaxz],
59                    [0, 0]]);
60       }
61
62       translate([backslotedgespace/2, 0, 1])
63         mirror([0,0,1])
64         linear_extrude(height=slotplugheight+1)
65         polygon([[0,0],
66                  [slotwidth * sqrt(2), 0],
67                  [slotplugdepth / sqrt(2) + slotwidth * sqrt(2),
68                   -slotplugdepth],
69                  [slotplugdepth / sqrt(2), -slotplugdepth]]);
70       translate([-1,
71                  -rearwallthick - boltholeslotshorter + 0.2,
72                  tubedia + tubetubetopslop + tubetubethick + 4])
73         cube([keepslotx - keepslotclear + 1,
74               boltholeslotshorter + 0.5,
75               rearwallstrengthwidth]);
76     }
77   }
78 }
79
80 module TubeThing(extralen, dia, extraheight, underheight){
81   effheight = tubetubetopslop + extraheight + underheight;
82   len = -mainframeminy + extralen * 2;
83   translate([0, mainframeminy - extralen, -underheight]) {
84     translate([0,0, dia/2 + effheight])
85       rotate([-90,0,0]) cylinder(h=len, r=dia/2);
86     translate([-dia/2, 0, 0])
87       cube([dia, len, effheight + dia/2]);
88   }
89 }
90
91 module Jig(){
92   difference(){
93     union(){
94       MainFrame();
95       TubeThing(0, tubedia+tubetubethick*2, -tubetubethick, 0);
96     }
97     union(){
98       translate([0,0,-0.1])
99         TubeThing(10, tubedia, 0, 5);
100       translate([-boltholedia/2, mainframeminy - 1, -5])
101         cube([boltholedia,
102               -mainframeminy + 1 - rearwallthick - boltholeslotshorter,
103               mainframemaxz + 10]);
104       for (m=[0,1]) {
105         mirror([m,0,0]) {
106           translate([mainframeholex, mainframeholey, -30])
107             cylinder(h=basethick+40, r=mainframeholedia/2);
108           translate([keepslotx - keepslotwidth/2,
109                      -10, keepslotstartz])
110             cube([keepslotwidth, 20, keepslotlen + 10]);
111         }
112       }
113     }
114   }
115 }
116
117 //MainFrame();
118 //TubeThing(0, tubedia);
119
120 rotate([-90,0,0])
121   Jig();