Compare commits
2 commits
6f45f4dd88
...
5a6d4dc983
Author | SHA1 | Date | |
---|---|---|---|
|
5a6d4dc983 | ||
|
ce660d3e91 |
2 changed files with 397 additions and 0 deletions
168
din-rail/unversal.scad
Normal file
168
din-rail/unversal.scad
Normal file
|
@ -0,0 +1,168 @@
|
|||
$fn = 20;
|
||||
|
||||
din_w = 35;
|
||||
din_w2 = 25;
|
||||
din_wall = 1;
|
||||
din_h = 7.5;
|
||||
|
||||
tol = 0.1;
|
||||
|
||||
m = 3;
|
||||
wall = 1.5;
|
||||
|
||||
module cylindery(l, d) {
|
||||
translate([d/2, 0, d/2])
|
||||
rotate(90, [-1, 0, 0])
|
||||
cylinder(l, d/2, d/2);
|
||||
}
|
||||
|
||||
module cylinderx(l, d) {
|
||||
translate([0, d/2, d/2])
|
||||
rotate(90, [0, 1, 0])
|
||||
cylinder(l, d/2, d/2);
|
||||
}
|
||||
|
||||
module cylinderz(l, d) {
|
||||
translate([d/2, d/2, 0])
|
||||
cylinder(l, d/2, d/2);
|
||||
}
|
||||
|
||||
h1 = m + 2;
|
||||
h2 = 3;
|
||||
|
||||
module top_clip(bar_s) {
|
||||
cube([wall, bar_s.y, din_wall+h2-wall/2]);
|
||||
hull() {
|
||||
translate([0, 0, din_wall]) cube([wall, bar_s.y, wall]);
|
||||
translate([0, 0, din_wall+h2-wall/2]) {
|
||||
cylindery(bar_s.y, wall);
|
||||
translate([-2, 0, 0]) cylindery(bar_s.y, wall);
|
||||
}
|
||||
}
|
||||
z = wall*1.2;
|
||||
translate([wall, bar_s.y/2, 0])
|
||||
rotate(45, [0, 1, 0])
|
||||
cube([z, bar_s.y, z], center=true);
|
||||
}
|
||||
|
||||
module bottom_clip_holes(bar_s) {
|
||||
h = bar_s.y/2 + m;
|
||||
translate([-10, h - wall, m/2 + 0.2])
|
||||
cylinderx(50, m);
|
||||
}
|
||||
|
||||
module bottom_clip(bar_s) {
|
||||
h = bar_s.y/2 + m;
|
||||
difference() {
|
||||
union() {
|
||||
cube([wall, bar_s.y, din_wall+h1]);
|
||||
translate([0, 0, din_wall+h1-wall/2])
|
||||
cylindery(bar_s.y, wall);
|
||||
translate([-wall, 0, 0]) {
|
||||
cube([wall, h, h1 + din_wall]);
|
||||
translate([0, h - (h1+din_wall)/2, 0])
|
||||
cylinderx(wall, h1 + din_wall);
|
||||
}
|
||||
}
|
||||
bottom_clip_holes(bar_s);
|
||||
}
|
||||
}
|
||||
|
||||
module main_bar(bar_s) {
|
||||
hull() {
|
||||
cylindery(bar_s.y, wall);
|
||||
translate([bar_s.x - wall, 0, 0]) cylindery(bar_s.y, wall);
|
||||
}
|
||||
}
|
||||
|
||||
module bottom_ledge(bar_s) {
|
||||
h = bar_s.y / 2 - wall;
|
||||
translate([wall, 0, wall]) {
|
||||
cube([m + wall, h, wall]);
|
||||
translate([0, h - (m+wall)/2, 0])
|
||||
cylinderz(wall, m+wall);
|
||||
}
|
||||
}
|
||||
|
||||
module bottom_ledge_holes(bar_s) {
|
||||
h = (bar_s.y - m)/2 - wall;
|
||||
translate([(wall + m)/2, h, -5])
|
||||
cylinderz(50, m);
|
||||
}
|
||||
|
||||
tie_w = 3;
|
||||
tie_wall = wall + 1;
|
||||
|
||||
module tie_holes(bar_s) {
|
||||
w = tie_w;
|
||||
translate([(bar_s.x - 22)/2, 0, 0])
|
||||
for (y = [tie_wall, bar_s.y - tie_wall - w]) {
|
||||
hull() {
|
||||
for (x = [0, 22]) {
|
||||
translate([x, y, -1]) cylinderz(50, w);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module bar(bar_s) {
|
||||
difference() {
|
||||
union() {
|
||||
main_bar(bar_s);
|
||||
bottom_ledge(bar_s);
|
||||
translate([(bar_s.x - din_w - wall)/2, 0, bar_s.z]) {
|
||||
bottom_clip(bar_s);
|
||||
translate([din_w + wall + 0.5, 0, 0]) top_clip(bar_s);
|
||||
}
|
||||
}
|
||||
bottom_ledge_holes(bar_s);
|
||||
tie_holes(bar_s);
|
||||
}
|
||||
}
|
||||
|
||||
module fillet(d) {
|
||||
difference() {
|
||||
cube([d, d, wall]);
|
||||
translate([0, 0, -1]) cylinderz(50, d*2);
|
||||
}
|
||||
}
|
||||
|
||||
joiner_l = 10;
|
||||
|
||||
// Joins two bars.
|
||||
module joiner(w) {
|
||||
cube([joiner_l, w, wall]);
|
||||
translate([joiner_l, 0, 0]) fillet(3);
|
||||
translate([0, 0, 0]) mirror([1, 0, 0]) fillet(3);
|
||||
translate([0, w, 0]) mirror([1, 1, 0]) fillet(3);
|
||||
translate([joiner_l, w, 0]) mirror([0, 1, 0]) fillet(3);
|
||||
}
|
||||
|
||||
module assembly(w=50) {
|
||||
max_w = 20;
|
||||
|
||||
if (w >= max_w*2) {
|
||||
bar_s = [60+10, max_w, wall];
|
||||
bar(bar_s);
|
||||
translate([0, w - bar_s.y, 0]) bar(bar_s);
|
||||
for (x = [bar_s.x*1/4, bar_s.x*3/4]) {
|
||||
translate([x - joiner_l/2, bar_s.y, 0]) joiner(w - bar_s.y*2);
|
||||
}
|
||||
} else {
|
||||
bar_s = [60+10, w, wall];
|
||||
bar(bar_s);
|
||||
}
|
||||
}
|
||||
|
||||
tplink_mc220l_s = [94, 73, 27];
|
||||
edimax_es550g_s = [98, 71, 25.5]; // Note: filleted edges
|
||||
nanopi_r5c_s = [62.5, 62.5, 29];
|
||||
u_poe_af_s = [86, 46, 33];
|
||||
|
||||
tie_offset = tie_wall * 2 + tie_w;
|
||||
|
||||
//assembly(tplink_mc220l_s.y + tie_offset);
|
||||
//assembly(edimax_es550g_s.x + tie_offset - 6);
|
||||
//assembly(nanopi_r5c_s.z + tie_offset);
|
||||
//assembly(nanopi_r5c_s.x + tie_offset);
|
||||
assembly(u_poe_af_s.y + tie_offset);
|
229
insta-fun/insta-fun.scad
Normal file
229
insta-fun/insta-fun.scad
Normal file
|
@ -0,0 +1,229 @@
|
|||
$fn = 60;
|
||||
|
||||
tol = 0.1;
|
||||
|
||||
wall = 1;
|
||||
f = wall*5;
|
||||
|
||||
insta360_s = [53.0, 23.6, 17.5];
|
||||
lens_r = 17.1/2 + wall;
|
||||
|
||||
r = 5;
|
||||
l = insta360_s.x+wall*2 + tol*2;
|
||||
w = insta360_s.y+wall*2 + tol*3;
|
||||
h = insta360_s.z + tol - 1;
|
||||
m = 3;
|
||||
nut = 5.5;
|
||||
|
||||
module rcubez(s, r) {
|
||||
hull() {
|
||||
for (x = [r, s.x - r]) {
|
||||
for (y = [r, s.y - r]) {
|
||||
translate([x, y, 0]) cylinder(s.z, r, r);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module toroid(h, r) {
|
||||
translate([0, 0, h/2])
|
||||
rotate_extrude(convexity = 5)
|
||||
translate([r-h/2, 0]) circle(d=h);
|
||||
}
|
||||
|
||||
module prism(l, w, h){
|
||||
polyhedron(//pt 0 1 2 3 4 5
|
||||
points=[[0,0,0], [l,0,0], [l,w,0], [0,w,0], [0,w,h], [l,w,h]],
|
||||
faces=[[0,1,2,3],[5,4,3,2],[0,4,5,1],[0,3,4],[5,2,1]]
|
||||
);
|
||||
}
|
||||
|
||||
module button(r=r) {
|
||||
toroid(f, r);
|
||||
cylinder(f, r-f/2, r-f/2);
|
||||
}
|
||||
|
||||
// Bottom rounded plate.
|
||||
module plate(l=l, w=w, h=h) {
|
||||
translate([w/2, 0, 0]) {
|
||||
button(w/2);
|
||||
translate([l-w, 0, 0]) button(w/2);
|
||||
|
||||
// Left and right arms.
|
||||
translate([l-w, w/2-f/2, f/2])
|
||||
rotate(90, [0, -1, 0])
|
||||
cylinder(l-w, f/2, f/2);
|
||||
|
||||
translate([l-w, -w/2+f/2, f/2])
|
||||
rotate(90, [0, -1, 0])
|
||||
cylinder(l-w, f/2, f/2);
|
||||
|
||||
// Inner fill.
|
||||
translate([0, -w/2+f/2, 0]) cube([l-w, w-f, h]);
|
||||
translate([0, -w/2, f/2]) cube([l-w, w, h-f/2]);
|
||||
|
||||
// Height extensions.
|
||||
translate([0, 0, f/2]) cylinder(h-f/2, w/2, w/2);
|
||||
translate([l-w, 0, f/2]) cylinder(h-f/2, w/2, w/2);
|
||||
}
|
||||
}
|
||||
|
||||
module rails() {
|
||||
translate([w/2, w/2 - wall/2, h])
|
||||
rotate(90, [0, 1, 0])
|
||||
cylinder(l-w, wall/2, wall/2);
|
||||
|
||||
translate([w/2, -w/2 + wall/2, h])
|
||||
rotate(90, [0, 1, 0])
|
||||
cylinder(l-w, wall/2, wall/2);
|
||||
|
||||
translate([w/2, 0, h-wall/2])
|
||||
difference() {
|
||||
toroid(h=wall, r=w/2);
|
||||
translate([0, -2*w, 0]) cube([w*4, w*4, w]);
|
||||
}
|
||||
|
||||
translate([l-w/2, 0, h-wall/2])
|
||||
difference() {
|
||||
toroid(h=wall, r=w/2);
|
||||
mirror([1, 0, 0])
|
||||
translate([0, -2*w, 0]) cube([w*4, w*4, w]);
|
||||
}
|
||||
}
|
||||
|
||||
module lens_hole() {
|
||||
translate([wall + lens_r + w/2 - lens_r
|
||||
- 1.5, // Patch.
|
||||
0, -1]) {
|
||||
// Lens.
|
||||
cylinder(h=20, lens_r, lens_r);
|
||||
// LED bar.
|
||||
translate([lens_r + 2, 0, 0])
|
||||
cylinder(h=20, wall*2, wall*2);
|
||||
translate([lens_r-1, -wall*2, 0])
|
||||
cube([2+1, wall*4, 4]);
|
||||
}
|
||||
}
|
||||
|
||||
module button_hole() {
|
||||
r1 = w*0.3;
|
||||
translate([l - wall - w/2, 0, -1]) {
|
||||
// Hole.
|
||||
cylinder(h=20, r1, r1);
|
||||
}
|
||||
}
|
||||
|
||||
module retainer() {
|
||||
t = 1.3 + wall/2;
|
||||
translate([w/2, w/2 - wall/2, h - t + wall/2])
|
||||
rotate(90, [1, 0, 0])
|
||||
prism(l-w, t, t);
|
||||
}
|
||||
|
||||
module microphone_hole() {
|
||||
translate([-5, 0, h/2 + wall])
|
||||
rotate(90,[0, 1, 0]) cylinder(l*2, wall*2, wall*2);
|
||||
}
|
||||
|
||||
mount_plate_s = [l+ 15, h, wall*1.5];
|
||||
|
||||
module mount_plate(add_z=0) {
|
||||
rcubez([mount_plate_s.x, mount_plate_s.y, mount_plate_s.z+add_z], 2);
|
||||
}
|
||||
|
||||
module mount_plate_fillet() {
|
||||
translate([0, mount_plate_s.y, 0])
|
||||
rotate(90, [0, 0, -1])
|
||||
translate([0, 0, 0])
|
||||
prism(mount_plate_s.y, w/2, w/2);
|
||||
}
|
||||
|
||||
module mount_plate_locators(pad=0) {
|
||||
for (x = [1, 2, 3]) {
|
||||
translate([mount_plate_s.x*x/4, 0, 0])
|
||||
rotate(90, [-1, 0, 0])
|
||||
cylinder(mount_plate_s.y*0.7+pad, wall+pad, wall+pad);
|
||||
}
|
||||
}
|
||||
|
||||
module mount_plate_holes() {
|
||||
for (x = [m*1.5, mount_plate_s.x-m*1.5]) {
|
||||
translate([x, mount_plate_s.y/2, -1])
|
||||
cylinder(h=20, (m+0.5)/2, (m+0.5)/2);
|
||||
}
|
||||
}
|
||||
|
||||
module safety_mount() {
|
||||
s = [3, 5, 3];
|
||||
translate([mount_plate_s.x-m*3.5, s.y, s.x]) {
|
||||
mirror([1, 0, 0]) {
|
||||
translate([-s.x*1.76, 0, -s.x])
|
||||
rotate(90, [0, 0, -1]) prism(s.y, s.x*2-3, s.x*2-1);
|
||||
rotate(90, [1, 0, 0]) cylinder(s.y, s.x, s.x);
|
||||
translate([0, -s.y, 0])
|
||||
cube([s.x*3, s.y, s.x]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module mount_plate_for_bolts() {
|
||||
difference() {
|
||||
union() {
|
||||
mount_plate();
|
||||
// Fillets.
|
||||
translate([m*3, 0, 0]) mount_plate_fillet();
|
||||
translate([mount_plate_s.x-m*3, 0, 0])
|
||||
mirror([1, 0, 0]) mount_plate_fillet();
|
||||
translate([mount_plate_s.x/4, 0, 0])
|
||||
cube([mount_plate_s.x/2, mount_plate_s.y, mount_plate_s.z*3]);
|
||||
// Locators.
|
||||
mount_plate_locators();
|
||||
// Safety wire.
|
||||
safety_mount();
|
||||
}
|
||||
mount_plate_holes();
|
||||
// Safety wire hole.
|
||||
translate([mount_plate_s.x-m*3.5, 30, 3])
|
||||
rotate(90, [1, 0, 0]) cylinder(60, 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
module mount_plate_for_nuts() {
|
||||
pad = 1.5;
|
||||
difference() {
|
||||
mount_plate(pad);
|
||||
translate([0, 0, mount_plate_s.z+pad]) mount_plate_locators(tol*2);
|
||||
mount_plate_holes();
|
||||
for (x = [m*1.5, mount_plate_s.x-m*1.5]) {
|
||||
translate([x, mount_plate_s.y/2, 0])
|
||||
cube([nut+tol, nut*1.3+tol, wall*3], center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module shroud_mount_plate() {
|
||||
translate([(l - mount_plate_s.x)/2,
|
||||
w/2, 0])
|
||||
rotate(90, [1, 0, 0]) mount_plate_for_bolts();
|
||||
}
|
||||
|
||||
module shroud() {
|
||||
difference() {
|
||||
union() {
|
||||
plate(l, w); rails(); shroud_mount_plate();
|
||||
}
|
||||
translate([wall, 0, wall])
|
||||
plate(l-wall*2, w-wall*2, h=20);
|
||||
lens_hole();
|
||||
button_hole();
|
||||
microphone_hole();
|
||||
}
|
||||
|
||||
retainer();
|
||||
mirror([0, 1, 0]) retainer();
|
||||
}
|
||||
|
||||
//shroud();
|
||||
//mount_plate_for_bolts();
|
||||
//translate([0, 0, -10])
|
||||
mount_plate_for_nuts();
|
Loading…
Reference in a new issue