summaryrefslogtreecommitdiff
path: root/experimental/filament-spindle/spindle-hub_1off.scad
blob: 9429e1505258b1f2399052f1c1c003562c8cc8cd (plain)
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
/*
 *  Mendel Filament Spindle Hub 1off
 *  by Tony Buser <tbuser@gmail.com>
 *
 *  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 3 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
*/

include <../mendel.inc>
include <../mendel.conf>

include <spindle.scad>

hub_width = 40;
hub_length = 40;
hub_height = 33;

module hub() {
	difference () {

		// base shape box and a crude chamfer
		intersection() {
			box(hub_width, hub_length, hub_height);
			cylinder(hub_height+2, hub_width/2+3.5, hub_width/2+3.5, center=true);
		}

		// center rod and bearing support
		cylinder(hub_height+2, bearing_608_rad_h-2, bearing_608_rad_h-2, center=true);
		translate([0, 0, hub_height/2-(bearing_608_len+6)/2+1]) {
			cylinder((bearing_608_len+6)+1, bearing_608_rad_h, bearing_608_rad_h, center=true);
		}

		// left nut
		translate([-hub_width/2+3-1, 0, hub_height/2-rod_diameter+1]) {
			rotate([0, -90, 0]) {
				spindle_hole_horiz(rod_diameter+2);
			}
			rotate([90, 0, 90]) {
				spindle_nut_cavity(rod_diameter-1);
			}
		}

		// right nut
		translate([+hub_width/2-3+1, 0, hub_height/2-rod_diameter+1]) {
			rotate([0, -90, 0]) {
				spindle_hole_horiz(rod_diameter+2);
			}
			rotate([90, 0, 90]) {
				spindle_nut_cavity(rod_diameter-1);
			}
		}

		// front nut
		translate([0, -hub_width/2+3-1, hub_height/2-rod_diameter+1]) {
			rotate([0, -90, 90]) {
				spindle_hole_horiz(rod_diameter+2);
			}
			rotate([90, 0, 0]) {
				spindle_nut_cavity(rod_diameter-1);
			}
		}

		// back nut
		translate([0, +hub_width/2-3+1, hub_height/2-rod_diameter+1]) {
			rotate([0, -90, 90]) {
				spindle_hole_horiz(rod_diameter+2);
			}
			rotate([90, 0, 0]) {
				spindle_nut_cavity(rod_diameter-1);
			}
		}

		// left support rod
		translate([-hub_width/2+rod_diameter, 0, -hub_height/2+rod_diameter]) {
			rotate([90, -90, 0]) {
				spindle_hole_horiz(hub_length+2);
			}
		}

		// right support rod
		translate([hub_width/2-rod_diameter, 0, -hub_height/2+rod_diameter]) {
			rotate([90, -90, 0]) {
				spindle_hole_horiz(hub_length+2);
			}
		}
	}
}

translate([0, 0, hub_height/2]) {
	hub();
}