-
Notifications
You must be signed in to change notification settings - Fork 1
/
plugs.scad
99 lines (89 loc) · 2.29 KB
/
plugs.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
// This is all licensed as CC-BY-SA. See COPYING for details
// Note: these haven't been certified or anything. But they look about right
$fa = 1;
wall_thickness = 2;
// Units: mm
module schucko() {
// results: origin is top min(x,y) corner
// DIN 49440-1
difference() {
union() {
translate(v=[0,0,-wall_thickness])
cube(size=[(19.5 + wall_thickness) * 2, (19.5 + wall_thickness) * 2, wall_thickness]);
translate(v=[19.5 + wall_thickness, 19.5 + wall_thickness,-17.5 - wall_thickness])
cylinder(r=19.5 + wall_thickness, h=17.5 + wall_thickness);
}
translate(v=[21,21,-17.5]) {
union() {
intersection() {
cylinder(r=19.5, h=18);
union() {
cube(size = [33.5, 40, 70], center=true); // z=35, because we go way out the top
cube(size = [40, 5.5, 70], center = true);
translate(v=[0,0,17.5]) {
cube(size = [40, 40, 7.5], center = true);
}
}
}
// The holes
translate(v=[-9.5,0,-20]) {
cylinder(r=2.75, h=21);
}
translate(v=[9.5,0,-20]) {
cylinder(r=2.75, h=21);
}
// The side bits...
translate(v=[0,0,7.5]) {
cube(size=[2.3, 45, 15], center=true);
}
translate(v=[0,20,0]) {
cube(size=[2.3, 3, 4], center=true);
}
translate(v=[0,-20,0]) {
cube(size=[2.3, 3, 4], center=true);
}
}
}
}
}
module europlug() {
translate(v=[19.5 + wall_thickness,8.5,0]) {
difference() {
union() {
translate(v=[0,0,wall_thickness / 2])
cube(size=[(19.5 + wall_thickness) * 2, (17.5 + wall_thickness * 2), wall_thickness], center=true);
// cube(42, 17.5, 17.5);
translate(v=[0,0,-8.75]) {
intersection() {
cube(size=[(19.5 + wall_thickness) * 2, 15.5 + wall_thickness * 2, 17.5], center=true);
rotate(a=[0,0,45])
cube(size=[30,28.5 + wall_thickness * 2,17.5], center=true);
}
}
}
translate(v=[0,0,-6.5]) {
intersection() {
cube(size=[42, 15.5, 18], center=true);
rotate(a=[0,0,45])
cube(size=[28.5, 28.5, 18], center=true);
}
}
// The holes
translate(v=[-9.5,0,-35]) {
cylinder(r=2.75, h=21);
}
translate(v=[9.5,0,-35]) {
cylinder(r=2.75, h=21);
}
}
}
}
difference() {
union() {
schucko();
translate(v=[0, 50, -2]) { // 45 is lined up.
europlug();
}
}
//cube(size=[42,160,160], center=true);
}