-
Notifications
You must be signed in to change notification settings - Fork 0
/
dock_adapter.scad
95 lines (83 loc) · 1.91 KB
/
dock_adapter.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
// dock adapter to hold charging cable on
// phone mount.
// parameters
plug_width = 10.74; // mm
plug_depth = 5.54; // mm
below_plug = 2; // mm
cable_width = 7.2; // mm
plug_back_depth = 3; // mm
peg_width = 13.0; // mm
peg_height = 7.0; // mm
peg_distance = 15.0; // mm between inside of pegs
peg_angle = 12; // degrees
extra_height = 1; // mm
around_peg = 4; // mm
rounding = 2; // mm
main_width = around_peg * 2 + peg_width * 2 + peg_distance;
main_depth = plug_depth + plug_back_depth * 2;
main_height = peg_height + around_peg * 2 + extra_height;
difference() {
// main body
translate([rounding, rounding, rounding]) {
minkowski() {
cube([
main_width - rounding * 2,
main_depth - rounding * 2,
main_height - rounding *2
]);
sphere(rounding);
}
}
// cable slot
translate([
(main_width - cable_width) / 2,
0,
0
]) {
cube([
cable_width,
main_depth - plug_back_depth,
main_height
]);
}
// plug slot
translate([
(main_width - plug_width) / 2,
plug_back_depth,
below_plug
]) {
cube([
plug_width,
plug_depth,
main_height - below_plug
]);
}
// left peg
translate([
around_peg,
-0.5 * main_depth,
main_height - around_peg - peg_height
]) {
rotate([-peg_angle, 0, 0]) {
cube([
peg_width,
main_depth * 2,
peg_height
]);
}
}
// right peg
translate([
main_width - peg_width - around_peg,
-0.5 * main_depth,
main_height - around_peg - peg_height
]) {
rotate([-peg_angle, 0, 0]) {
cube([
peg_width,
main_depth * 2,
peg_height
]);
}
}
}