-
Notifications
You must be signed in to change notification settings - Fork 2
/
y_endstop.scad
80 lines (57 loc) · 1.67 KB
/
y_endstop.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
use<ss_3gl13p.scad>
module nut(w, h){
translate([0,0,h/2])
for (i=[1:3])
rotate([0,0,60*i])
cube([w, w/sqrt(3), h], center=true);
}
module yendstop(color="blue", switch=0){
$fn=12;
switch_offset_side=5;
switch_offset_in=0;
switch_offset_height=15.8-15.8;
thickness=4;
extrusion_pad_width=50;
extrusion_pad_ridge_depth=1.5;
extrusion_pad_ridge_width=5.9;
strut_thickness=10;
strut_width=5.5;
switch_backing_width=19;
switch_backing_height=9;
switch_hole_dia=2.5;
if(switch){
translate([switch_offset_side,switch_offset_in,switch_offset_height+6.4])
ss_3gl13p();}
color(color)
translate([-20/2, 0, 0])
difference(){
union(){
rotate([90,0,90])
difference(){
union(){
translate([-20/2, 0, 0])
cube([20, thickness, extrusion_pad_width]);
hull(){
translate([-extrusion_pad_ridge_width/2, -.01, 0])
cube([extrusion_pad_ridge_width, .02, extrusion_pad_width]);
translate([-(extrusion_pad_ridge_width-.8)/2, -extrusion_pad_ridge_depth, 0])
cube([extrusion_pad_ridge_width-.8, 2*extrusion_pad_ridge_depth, extrusion_pad_width]);
}
}
for (x=[7, extrusion_pad_width-7])
translate([0, 0, x])
rotate([90,0,0])
cylinder(r=5/2, h=thickness*3, center=true);
}
translate([20/2+switch_offset_side, -10, 0])
cube([switch_backing_width, 20+switch_offset_in-3, 6.4+switch_offset_height]);
}
for (q=[switch_offset_side+5.15,switch_offset_side+5.15+9.5])
translate([20/2+q, switch_offset_height+switch_offset_in, -extrusion_pad_ridge_depth-1])
rotate([0,0,90]){
cylinder(r=switch_hole_dia/2, h=strut_width*30, center=true);
nut(w=5, h=extrusion_pad_ridge_depth+2+1);
}
}
}
yendstop(switch=0);