forked from revarbat/snappy-reprap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxy_sled_parts.scad
147 lines (126 loc) · 3.68 KB
/
xy_sled_parts.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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
include <config.scad>
use <GDMUtils.scad>
use <sliders.scad>
use <joiners.scad>
use <publicDomainGearV1.1.scad>
$fa = 2;
$fs = 2;
module herringbone_rack(l=100, h=10, w=10, tooth_size=5, CA=30)
{
left(tooth_size/2) {
zflip_copy() {
skew_xy(xang=CA) {
intersection() {
up(h/4-0.01) {
left(l/2-tooth_size/2) {
rack(
mm_per_tooth=tooth_size,
number_of_teeth=floor(l/tooth_size),
thickness=h/2+0.005,
height=w,
pressure_angle=20,
backlash=gear_backlash
);
}
}
cube(size=[l, h*3, h*3], center=true);
}
}
}
}
}
//!herringbone_rack(l=100, h=10, tooth_size=5);
module xy_sled()
{
slider_len = 20;
slider_count = 2;
slider_spacing = (platform_length-slider_len-15)/(slider_count-1);
color("MediumSlateBlue")
prerender(convexity=10)
union() {
difference() {
union() {
// Bottom
up(platform_thick/2)
yrot(90) sparse_strut(h=platform_width, l=platform_length, thick=platform_thick, maxang=45, strut=12, max_bridge=999);
// Walls.
zrot_copies([0, 180]) {
translate([(platform_width-joiner_width)/2, 0, platform_height/2]) {
chamfer(chamfer=3, size=[joiner_width, platform_length, platform_height], edges=[[0,0,0,0], [1,1,0,0], [0,0,0,0]]) {
if (wall_style == "crossbeams")
sparse_strut(h=platform_height, l=platform_length-10, thick=joiner_width, strut=5);
if (wall_style == "thinwall")
thinning_wall(h=platform_height, l=platform_length-10, thick=joiner_width, strut=platform_thick, wall=3, bracing=false);
if (wall_style == "corrugated")
corrugated_wall(h=platform_height, l=platform_length-10, thick=joiner_width, strut=platform_thick, wall=3);
}
}
}
// Drive rack
rack_module = rack_tooth_size / 3.1415926535;
rack_pcd = gear_teeth * rack_module;
left(rack_pcd/2) {
up(platform_thick+rack_base+rack_height/2) {
difference() {
zrot(-90) herringbone_rack(l=platform_length, h=rack_height+0.1, w=10, tooth_size=rack_tooth_size);
up(rack_height/2) {
left(rack_tooth_size/2) {
yrot(15) up(2) {
cube(size=[rack_tooth_size*2, platform_length+10, 4], center=true);
}
}
}
}
}
// rack base
addendum = rack_module;
up(platform_thick/2+rack_base/2) {
left(10/2-addendum) {
cube(size=[10,platform_length,platform_thick+rack_base], center=true);
}
}
}
// sliders
xspread(rail_spacing+joiner_width) {
yspread(slider_spacing, n=slider_count) {
slider(l=slider_len, base=rail_offset, slop=2*printer_slop);
}
}
}
// Clear space for joiners.
translate([0,0,platform_height/2]) {
joiner_quad_clear(xspacing=platform_width-joiner_width, yspacing=platform_length-0.1, h=platform_height, w=joiner_width, clearance=5, a=joiner_angle);
}
// Shrinkage stress relief
up(platform_thick/2) {
yspread(18, n=5) {
cube(size=[platform_width+1, 1, platform_thick-2], center=true);
}
xspread(20, n=7) {
yspread(platform_length-10) {
cube(size=[1, 20, platform_thick-2], center=true);
}
}
}
}
// Snap-tab joiners.
up(platform_height/2) {
difference() {
joiner_quad(xspacing=platform_width-joiner_width, yspacing=platform_length, h=platform_height, w=joiner_width, l=6, a=joiner_angle);
up(platform_height/2) {
xspread(platform_width-joiner_width) {
xspread(joiner_width) {
xrot(90) chamfer_mask(r=3, h=platform_length+10);
}
}
}
}
}
}
}
//!xy_sled();
module xy_sled_parts() { // make me
zrot(-90) xy_sled();
}
xy_sled_parts();
// vim: noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap