-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrepbox_roller_definition.scad
130 lines (115 loc) · 4.64 KB
/
repbox_roller_definition.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
// in retrospect this whole thing would've been more sensible with a
// full 2d base and only minimal alterations to that later on - maybe
// fix that in the next generation.
main_thickness = base_thickness+cutout_thickness;
module copy_mirror(vec=[0,1,0])
{
children();
mirror(vec) children();
}
// this defines the parts which are same on both sides, and can just be mirrored later on
module half_roller(){
difference(){
// main body
union(){
difference(){
cube([main_length/2, main_height, main_thickness]);
// top corner
translate([main_length/2-20, 0, 0]){
cube([20, 20, main_thickness]);
}
}
// replace top corner with round thing
translate([main_length/2-20, 20, 0]){
linear_extrude(main_thickness) pieSlice(size=20, start_angle=270, end_angle=360);
}
}
// central cutout
translate([0, 0, main_thickness - cutout_thickness]){
cube([cutout_length/2, main_height, cutout_thickness]);
}
translate([cutout_length/2, 0, main_thickness - cutout_thickness]){
cube([cutout_length/2, main_height - (main_height-bearing_diameter/2-bearing_offset_y) - 2, cutout_thickness]);
}
// cutouts on the sides
translate([main_length/2-rod_x_offset, 0, main_thickness - cutout_thickness]){
cylinder(h=cutout_thickness, r=20,$fn=3);
}
// bearing_diameter already contains some margins, so no additional margins should be required here
translate(bearing_center_v){
translate([0,0,base_thickness]){
cylinder(h=cutout_thickness, r=bearing_diameter/2);
}
}
translate(rod_center_v){
rod_grip_size=1.5;
cylinder(h=main_thickness, r=rod_diameter/2);
translate([(rod_diameter/2*-1)+rod_grip_size,0,0]){
cube([rod_diameter-rod_grip_size, rod_diameter/2+(main_height-rod_y_offset+rod_diameter), main_thickness]);
}
}
// top cutout
translate([0, (main_length/2*-1)+60, 0]){
cylinder(h=main_thickness, r=main_length/2-40);
}
}
translate(bearing_center_v){
cylinder(h=main_thickness, r=bearing_shaft_diameter/2);
translate([0,0,base_thickness]){
cylinder(h=bearing_spacer_thickness, r=bearing_spacer_diameter/2);
}
}
}
bearing_interlock_offset = 2;
tolerance = 0.2;
// increase if assembly requires too much force. Something like 0.1-0.2 should
// be sufficient - anything more and you should rather calibrate your printer.
snap_tolerance = 0;
side_interlock_offset = 2;
side_interlock_diameter = 4;
side_interlock_xy=[main_length/2-rod_x_offset/2, main_height-side_interlock_offset-side_interlock_diameter/2];
side_interlock_v=[main_length/2-side_interlock_offset, main_height-side_interlock_offset, main_thickness];
difference(){
union() {
copy_mirror([1, 0, 0]){half_roller();}
// interlock on the bearing
translate([bearing_center_x, bearing_offset_y, main_thickness]){
cylinder(h=bearing_interlock_offset, r=bearing_shaft_diameter/2-1);
}
// interlock on the side
translate([side_interlock_xy[0], side_interlock_xy[1], main_thickness]){
cylinder(h=side_interlock_offset, r=side_interlock_diameter/2);
translate([0, -20, 0]){
cylinder(h=side_interlock_offset, r=side_interlock_diameter/2);
}
}
// interlock on the bottom, under the bearing
translate([bearing_center_x, side_interlock_xy[1], main_thickness]){
cylinder(h=side_interlock_offset, r=side_interlock_diameter/2);
}
}
// screw head hole
translate([bearing_center_x, bearing_center_y, 0]){
cylinder(h=screw_head_height, r=screw_head_diameter/2);
cylinder(h=main_thickness+bearing_interlock_offset, r=screw_diameter/2);
}
// screw hole other side
translate([bearing_center_x*-1, bearing_offset_y, 0]){
cylinder(h=main_thickness, r=screw_diameter/2);
}
// interlock cutout on the bearing
translate([bearing_center_x*-1, bearing_offset_y, main_thickness-bearing_interlock_offset-tolerance]){
cylinder(h=bearing_interlock_offset+tolerance, r=bearing_shaft_diameter/2-1+snap_tolerance);
}
// interlock cutouts on the sides
translate([side_interlock_xy[0]*-1, side_interlock_xy[1], main_thickness-side_interlock_offset-tolerance]){
cylinder(h=side_interlock_offset+tolerance, r=side_interlock_diameter/2+snap_tolerance);
translate([0, -20, 0]){
cylinder(h=side_interlock_offset+tolerance, r=side_interlock_diameter/2+snap_tolerance);
}
}
// interlock cutout on the bottom, under the bearing
translate([bearing_center_x*-1, side_interlock_xy[1], main_thickness-side_interlock_offset-tolerance]){
cylinder(h=side_interlock_offset+tolerance, r=side_interlock_diameter/2+snap_tolerance);
}
}