forked from jcrocholl/kossel
-
Notifications
You must be signed in to change notification settings - Fork 36
/
retractable.scad
81 lines (76 loc) · 2.46 KB
/
retractable.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
include <configuration.scad>;
use <microswitch.scad>;
height = 26;
height2 = 26;
tunnel = 2.4;
face_offset = 4;
module foot() {
difference() {
translate([12.5, 0, 0]) rotate([0, 0, -60])
translate([-12.5, 0, 1]) rotate([0, 0, -60]) union() {
cylinder(r=5, h=2, center=true, $fn=24);
translate([10, 0, 0])
cube([20, 10, 2], center=true);
}
translate([0, -10, 0])
cube([40, 20, 20], center=true);
translate([12.5, 0, 0]) {
// Space for bowden push fit connector.
cylinder(r=6.49, h=3*height, center=true, $fn=32);
for (a = [60:120:359]) {
rotate([0, 0, a]) translate([-12.5, 0, 0])
cylinder(r=m3_wide_radius, h=20, center=true, $fn=12);
}
}
}
}
module retractable() {
difference() {
union() {
translate([0, 0, height/2])
cylinder(r=6, h=height, center=true, $fn=32);
translate([0, -3, height/2])
cube([12, 6, height], center=true);
// Lower part on the left.
translate([-6, 0, height2/2])
cylinder(r=6, h=height2, center=true, $fn=32);
translate([-3, 0, height2/2])
cube([6, 12, height2], center=true);
translate([-3, -3, height2/2])
cube([18, 6, height2], center=true);
// Feet for vertical M3 screw attachment.
rotate([0, 0, 90]) {
foot();
scale([1, -1, 1]) foot();
}
}
translate([-19, 0, height/2+6]) rotate([0, 15, 0])
cube([20, 20, height], center=true);
cylinder(r=tunnel/2+extra_radius, h=3*height, center=true, $fn=12);
translate([0, -6, height/2+12])
cube([tunnel-0.5, 12, height], center=true);
rotate([0, 0, 30]) translate([0, -6, height/2+22])
cube([tunnel, 12, height], center=true);
// Safety needle spring.
translate([-4.5, 0, height-11]) rotate([90, 0, 0])
cylinder(r=2.5/2, h=40, center=true, $fn=12);
translate([-4, 0, height-2]) rotate([90, 0, 0])
cylinder(r=1/2, h=40, center=true, $fn=12);
// Effector screw heads.
rotate([0, 0, 330]) translate([-12.5, 0, 2])
cylinder(r=4, h=30, $fn=24);
// Flat front face.
translate([0, -face_offset-10, height/2]) difference() {
cube([30, 20, 2*height], center=true);
}
// Sub-miniature micro switch.
translate([-2.5, -face_offset-3, 5]) {
% microswitch();
for (x = [-9.5/2, 9.5/2]) {
translate([x, 0, 0]) rotate([90, 0, 0])
cylinder(r=2.5/2, h=40, center=true, $fn=12);
}
}
}
}
retractable();