-
Notifications
You must be signed in to change notification settings - Fork 171
/
xy_sled_parts.scad
138 lines (118 loc) · 3.34 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
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)+1,
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 = platform_length/5;
slider_count = 2;
l = platform_length - 2*printer_slop;
slider_spacing = (l-slider_len-15)/max(1,slider_count-1);
rack_module = rack_tooth_size / pi;
rack_pcd = gear_teeth * rack_module;
addendum = rack_module;
color("MediumSlateBlue")
prerender(convexity=10)
union() {
difference() {
union() {
// Bottom
up(platform_thick/2)
yrot(90) sparse_strut(h=platform_width, l=l, 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, l, 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=l-10, thick=joiner_width, strut=5);
if (wall_style == "thinwall")
thinning_wall(h=platform_height, l=l-10, thick=joiner_width, strut=platform_thick);
if (wall_style == "corrugated")
corrugated_wall(h=platform_height, l=l-10, thick=joiner_width, strut=platform_thick, wall=3);
}
}
}
// Drive rack
left(rack_pcd/2) {
up(rail_offset+groove_height/2-rack_height/2-0.01) {
back(rack_height*sin(30)/3) {
difference() {
zrot(-90) herringbone_rack(l=l, 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, l+10, 4], center=true);
}
}
}
}
}
}
// rack base
up((platform_thick+shaft_clear+rack_base)/2) {
left(10/2-addendum) {
cube(size=[10, l, platform_thick+rack_base+shaft_clear], 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=l-0.1, h=platform_height, w=joiner_width, clearance=5, a=joiner_angle);
}
}
// Snap-tab joiners.
up(platform_height/2) {
difference() {
joiner_quad(xspacing=platform_width-joiner_width, yspacing=l, 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=l+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