hw: added first front and back mounts

master
Michael Hope 4 years ago
commit d5f5ac7413
  1. 119
      hw/back_mount.scad
  2. 79
      hw/front_mount.scad

@ -0,0 +1,119 @@
$fn = 20;
through = 20;
d = 4.5;
e = 0.01;
function midxy(a, b) = [(a[0]-b[0])/2, (a[1]-b[1])/2, 0];
function centerx(w) = [-w/2, 0, 0];
module rcube(s, r=2) {
hull() {
for (y = [r, s[1]-r]) {
for (x = [r, s[0]-r]) {
translate([x, y, 0]) {
cylinder(r=r, s[2]);
}
}
}
}
}
module sixmount() {
pad = 1.5;
m = 3;
ow = 10;
oh = 6.5;
s = [ow+3, 10, 4.5];
color("grey") {
translate(midxy(s, [ow, oh, 0])) {
translate([m/2, m/2, -through/2])
cylinder(d=m, through);
translate([ow-m/2, oh-m/2, -through/2])
cylinder(d=m, through);
}
}
translate([-pad/2, -pad/2, 0])
rcube(s + [pad, pad, 0], 1);
}
module midmounts() {
m = 2;
ow = 18;
oh = 6.2;
h = 3.2;
w = 7.5;
for (y = [h+m/2, h+oh-m/2]) {
for (x = [-ow/2+m/2, ow/2-m/2]) {
translate([x, y, -through/2]) {
cylinder(d=m, through);
}
}
}
for (x = [-ow/2+m/2, ow/2-m/2]) {
hull() {
for (y = [h+m/2, h+oh-m/2]) {
translate([x, y, 0]) {
cylinder(d=w, d);
}
}
}
}
}
module sixmounts() {
d = 0.5 + 37 + 3;
ang = 26;
translate([d/2, 0, 0])
rotate(ang, [0, 0, 1])
sixmount();
translate([-d/2, 0, 0])
mirror([1, 0, 0]) {
rotate(ang, [0, 0, 1])
sixmount();
}
}
module crossbar() {
s = [45, 10, d];
translate([-s[0]/2, 0, 0])
rcube(s, r=1);
}
module bar() {
w = 100;
d = 16;
h = 10;
t = 3;
r = 2;
translate(centerx(w)) {
hull() {
translate([r+d, r, 0])
cylinder(r=r, t);
translate([w-r-d, r, 0])
cylinder(r=r, t);
translate([0, d-r, 0])
cube([r, r, t]);
translate([w-r, d-r, 0])
cube([r, r, t]);
}
}
translate([0, d, 0]) {
translate(centerx(w))
cube([w, t, t+2]);
}
}
module assembly() {
module cutout() {
sixmounts();
midmounts();
crossbar();
}
difference() {
bar();
translate([0, -e, 2])
cutout();
}
}
assembly();

@ -0,0 +1,79 @@
$fn = 20;
through = 20;
d = 4.5;
e = 0.01;
function midxy(a, b) = [(a[0]-b[0])/2, (a[1]-b[1])/2, 0];
function centerx(w) = [-w/2, 0, 0];
module rcube(s, r=2) {
hull() {
for (y = [r, s[1]-r]) {
for (x = [r, s[0]-r]) {
translate([x, y, 0]) {
cylinder(r=r, s[2]);
}
}
}
}
}
module midmounts() {
m = 2;
ow = 18.5;
oh = 6.5;
h = 3;
w = 7.5;
w2 = 10;
for (y = [h+m/2, h+oh-m/2]) {
for (x = [-ow/2+m/2, ow/2-m/2]) {
translate([x, y, -through/2]) {
cylinder(d=m, through);
}
}
}
for (y = [h+oh-m/2]) {
for (x = [-ow/2+m/2-w2, ow/2-m/2+w2]) {
translate([x, y, -through/2]) {
cylinder(d=m, through);
}
}
}
}
module bar() {
w = 100;
h = 10;
t = 2;
r = 2;
d = 28-t;
d2 = d+5;
translate(centerx(w)) {
hull() {
translate([r+d2, r, 0])
cylinder(r=r, t);
translate([w-r-d2, r, 0])
cylinder(r=r, t);
translate([0, d-r, 0])
cube([r, r, t]);
translate([w-r, d-r, 0])
cube([r, r, t]);
}
}
translate([0, d, 0]) {
translate(centerx(w))
cube([w, t, t+2]);
}
}
module assembly() {
module cutout() {
midmounts();
}
difference() {
bar();
cutout();
}
}
assembly();
Loading…
Cancel
Save