forked from timschmidt/parameterized-mendel
-
Notifications
You must be signed in to change notification settings - Fork 1
/
y-belt-clamp.scad
132 lines (119 loc) · 4.44 KB
/
y-belt-clamp.scad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
//
/*
* OpenSCAD Shapes Library (www.openscad.at)
* Foot for Mendel Y platform
* by Vik Olliver. Based on examples which are:
* Copyright (C) 2009 Catarina Mota <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
m4_clearance_rad=2.8;
m6_clearance_rad=3.7;
m8_clearance_rad=4.7;
post_wid=20;
module box(w,h,d) {
scale ([w,h,d]) cube(1, true);
}
module roundedBox(w,h,d,f){
difference(){
box(w,h,d);
translate([-w/2,h/2,0]) cube(w/(f/2),true);
translate([w/2,h/2,0]) cube(w/(f/2),true);
translate([-w/2,-h/2,0]) cube(w/(f/2),true);
translate([w/2,-h/2,0]) cube(w/(f/2),true);
}
translate([-w/2+w/f,h/2-w/f,-d/2]) cylinder(d,w/f, w/f);
translate([w/2-w/f,h/2-w/f,-d/2]) cylinder(d,w/f, w/f);
translate([-w/2+w/f,-h/2+w/f,-d/2]) cylinder(d,w/f, w/f);
translate([w/2-w/f,-h/2+w/f,-d/2]) cylinder(d,w/f, w/f);
}
module hexagon(height, depth) {
boxWidth=height/1.75;
union(){
box(boxWidth, height, depth);
rotate([0,0,60]) box(boxWidth, height, depth);
rotate([0,0,-60]) box(boxWidth, height, depth);
}
}
module m4_hole_horiz(l) {
cylinder(l,m4_clearance_rad,m4_clearance_rad,center=true);
translate ([m4_clearance_rad*0.6,0,0]) rotate ([0,0,45])
cube([m4_clearance_rad,m4_clearance_rad,l],center=true);
}
module m4_hole_vert(l) {
cylinder(l,m4_clearance_rad,m4_clearance_rad,center=true);
}
module m6_hole_horiz(l) {
cylinder(l,m6_clearance_rad,m6_clearance_rad,center=true);
translate ([m6_clearance_rad*0.6,0,0]) rotate ([0,0,45])
cube([m6_clearance_rad,m6_clearance_rad,l],center=true);
}
module m8_hole_horiz(l) {
cylinder(l,m8_clearance_rad,m8_clearance_rad,center=true);
translate ([m8_clearance_rad*0.6,0,0]) rotate ([0,0,45])
cube([m8_clearance_rad,m8_clearance_rad,l],center=true);
}
// No .4 3/4 inch countersunk woodscrew (includes a lot of headspace)
module small_woodscrew() {
rotate ([0,0,30]) {
translate ([0,0,-7.5]) cylinder(h=3,r1=0.2,r2=1.8,center=true);
cylinder(h=12,r1=1.8,r2=2.0,center=true);
translate([0,0,6]) cylinder(h=4, r1=2.0, r2=4.0);
}
}
clamp_len=35;
clamp_top_len=18;
clamp_base_thick=6;
clamp_height=22;
clamp_thick=30;
clamp_hole_spacing=14;
cutout_size=8;
// The big bit of the clamp.
module clamp_main() {
difference() {
union () {
// Basic T shape
translate ([0,0,clamp_base_thick/2]) box(clamp_thick,clamp_len,clamp_base_thick);
translate ([0,0,clamp_height/2]) box(clamp_thick,clamp_top_len,clamp_height);
}
// Holes for countersunk screws.
translate ([clamp_thick/2-5,4-clamp_len/2,-2]) small_woodscrew();
translate ([5-clamp_thick/2,4-clamp_len/2,-2]) small_woodscrew();
translate ([5-clamp_thick/2,clamp_len/2-4,-2]) small_woodscrew();
translate ([clamp_thick/2-5,clamp_len/2-4,-2]) small_woodscrew();
// Cavities for M4 clamp nuts. Yeah this overhangs. So what? it works.
translate ([clamp_hole_spacing/2,0,0]) rotate([0,0,30]) hexagon(height=8,depth=(clamp_height-4)*2);
translate ([-clamp_hole_spacing/2,0,0]) rotate([0,0,30])hexagon(height=8,depth=(clamp_height-4)*2);
// Cavities for M4 bolts.
translate ([-clamp_hole_spacing/2,0,0]) m4_hole_vert(clamp_height*3);
translate ([clamp_hole_spacing/2,0,0]) m4_hole_vert(clamp_height*3);
// Big hole in case you need to fiddle with your nuts.
translate ([0,0,cutout_size*0.8+clamp_base_thick]) rotate ([0,45,0]) box(cutout_size,clamp_len,cutout_size);
}
}
// Little crosspiece of clamp
module clamp_crosspiece() {
difference() {
translate ([0,0,clamp_base_thick/2]) box(clamp_thick,clamp_top_len,clamp_base_thick);
// Cavities for M4 bolts.
translate ([-clamp_hole_spacing/2,0,0]) m4_hole_vert(clamp_height*3);
translate ([clamp_hole_spacing/2,0,0]) m4_hole_vert(clamp_height*3);
}
}
translate ([0,clamp_len/2+5,0]) {
translate ([clamp_thick*2,0,0]) clamp_crosspiece();
translate ([clamp_thick*0.5+5,0,0]) clamp_main();
}