-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathredox-body-mod.scad
143 lines (129 loc) · 5.01 KB
/
redox-body-mod.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
139
140
141
142
143
$fa=1;
$fs=5;
$fs=2; // Uncomment for final render
base_height = 13;
base_chamfer = 2.5;
wall_thickness = 2.0004;
usb_interconnect = 1; // 0 = keep existing TRRS interconnect hole, 1 = mini-usb interconnect
tent_positions = [
// [X, Y, Angle]
[85.5, 45.0, 0],
[85.5, -28, 0],
[-57.8, 45.5, 155],
[-69, -46, -150],
];
// M5 bolt tenting
boltRad = 5 / 2;
nutRad = 9.4 / 2;
nutHeight = 3.5;
module tent_support(position) {
off = apothem(nutRad, 6)+0.5;
lift = 0;
height = base_height - lift;
translate([position[0], position[1], lift]) rotate([0, 0, position[2]]) {
difference() {
chamfer_extrude(height=height, chamfer=base_chamfer, faces = [true, false]) {
hull() {
translate([-5,0]) square([0.1, 35], center=true);
translate([off, 0]) circle(r=boltRad+base_chamfer+1.5);
}
}
translate([-10,-20, -0.1]) cube([10-base_chamfer, 40, base_chamfer+1], center=false);
translate([-10,-20, base_chamfer]) cube([10-wall_thickness+0.1, 40, base_height+1], center=false);
translate([off, 0, -0.1]) polyhole(r=boltRad, h=height+1);
// Nut hole
translate([off, 0, height-nutHeight]) rotate([0, 0, 60/2]) cylinder(r=nutRad, h=nutHeight+0.1, $fn=6);
}
}
}
mini_usb_screw_rad = 2.4 / 2; // Smaller than M3 to tap into
mini_usb_screw_sep = 20;
mini_usb_hole_height = 7.5;
module mini_usb_hole() {
translate([0, 0, mini_usb_hole_height/2]) rotate([90, 0, 0]) roundedcube([10, mini_usb_hole_height, 10], r=1.5, center=true, $fs=1);
for (i = [-1,1], j = [0, 14]) {
translate([i*mini_usb_screw_sep/2, -4-j, -5]) polyhole(r=mini_usb_screw_rad, h=10);
}
}
micro_usb_screw_dia = 3.0;
micro_usb_screw_rad = (micro_usb_screw_dia - 0.6) / 2; // Smaller than M3 to tap into
micro_usb_screw_sep = 9;
micro_usb_hole_height = 7.5;
micro_usb_socket_height = 2.5;
pcb_thickness = 2;
module micro_usb_hole() {
translate([0, 1, micro_usb_hole_height/2]) rotate([90, 0, 0]) roundedcube([11, micro_usb_hole_height, 10], r=1.5, center=true, $fs=1);
translate([0, -1.5, pcb_thickness + micro_usb_socket_height / 2]) rotate([90, 0, 0]) cube([7.5, micro_usb_socket_height, 10], r = 1.5, center = true, $fs = 1);
for (i = [-1,1]) {
translate([i * micro_usb_screw_sep/2, -8, -5]) polyhole(r = micro_usb_screw_rad, h=15);
}
}
// Print a couple of these to prevent heads of the mini-usb mounting screws from
// hitting the mini-usb socket
module micro_usb_bracket() {
height = micro_usb_socket_height + 0.25; // One layer above
difference() {
translate([0, 0, height/2]) roundedcube([micro_usb_screw_sep + 7, 7, height], center = true);
translate([0, 8, -pcb_thickness - 0.01]) micro_usb_hole();
for (i = [-1,1]) {
translate([i * micro_usb_screw_sep/2, 0, 0]) polyhole(r = (micro_usb_screw_dia + 0.2) / 2, h = 15, center = true);
}
}
}
// Make a mold for making an oogoo foot around the M5 nut heads.
module foot_negative() {
rotate([0, 90, 0]) {
// Nut trap to stop the bolt from being pushed out. Two half height nuts.
translate([0, 0, -1]) cylinder(r = nutRad + 0.75, h = 5.5, center = true, $fn=16);
// actual bolt shaft
polyhole(r = boltRad, h = 20, center = true);
// show actual bolt head shape
translate([0, 0, 10]) cylinder(r1 = 5, r2 = 2.5, h = 2.7, center = false);
// This is the rubber around the head
translate([0, 0, 11]) {
scale([1, 1, 0.5]) sphere(r = 6.5);
}
}
}
module foot_mold() {
height = 8;
for (m = [0, 1])
mirror([m, 0, 0])
translate([5, 0, 0])
difference() {
translate([0, -10, 0]) cube([25, 65, height], center = false);
for (i = [0:3]) {
# translate([7, i*15, height]) foot_negative();
}
}
}
module modified_base() {
difference() {
union() {
rotate([0,0,180]) import("orig/BottomR.stl");
if (usb_interconnect) {
// Fill in TRRS hole, since we'll do something different
translate([-42, 61.426, base_chamfer]) cube([20, wall_thickness, base_height - base_chamfer - 0.1]);
}
for(i = [0:len(tent_positions)-1]) {
tent_support(tent_positions[i]);
}
}
if (usb_interconnect) {
translate([-28, 61.426, wall_thickness]) mini_usb_hole();
//translate([65.5, 61.426, wall_thickness]) micro_usb_hole();
}
// Hole to access reset microswitch
#translate([40, 55.38, wall_thickness]) {
cube([14, 6, 6], center = false);
translate([8, 0, 1]) cube([2, 10, 4], center = false);
}
}
}
//mirror([1, 0, 0])
modified_base();
//micro_usb_bracket();
//foot_mold();
// Requires my utility functions in your OpenSCAD lib or as local submodule
// https://github.com/Lenbok/scad-lenbok-utils.git
use<../Lenbok_Utils/utils.scad>