Added Rear Mount

Rear Mount added.

Offset bottom back edge inserts
This commit is contained in:
2025-07-10 07:18:46 -04:00
parent 99bc9e5dda
commit 24e2bdd688

View File

@@ -10,7 +10,7 @@ include <fdmouse.scad>
/* [Part] */ /* [Part] */
PART = ""; // [ all_corners, corner_top, corner_bottom, edge_back_bottom_a, edge_back_bottom_b, edge_front_bottom, edge_side_top, edge_side_foot, edge_top_front, edge_top_back, edge_test, full_box, joiner_top, joiner_bottom, joiner_slop, profile, side_edge, rbfoot, hinge, new_joiner ] PART = ""; // [ all_corners, corner_top, corner_bottom, edge_back_bottom_a, edge_back_bottom_b, edge_back_bottom_c, edge_back_bottom_d, edge_front_bottom, edge_side_top, edge_side_foot_left, edge_side_foot_right, edge_top_front, edge_top_back, edge_test, full_box, joiner_top, joiner_bottom, joiner_slop, profile, side_edge, rbfoot, hinge, new_joiner, rear_mount, grid_mount ]
/* [Profile Dimensions] */ /* [Profile Dimensions] */
@@ -99,7 +99,7 @@ module rb_foot(fw=RB_MOUNT_WIDTH, rl=RB_MOUNT_LEN+5, rh=RB_MOUNT_OUT_H, fl=10) {
translate([rl+fl,0]) square([fl, rh+fl+6]); translate([rl+fl,0]) square([fl, rh+fl+6]);
} }
} }
up(4) right(fl-3.5+rl/2) back(rh + 6) yrot(90)thread_insertM3(bl=10,bz=-10, $die=true); up(4) right(fl-3.5+rl/2) back(rh + 6) xrot(180)yrot(90)m3s_clear(bl=10,bz=-10, sh=0, drop=true, $die=true);
} }
back=5; back=5;
bmax = back + (fw-1); bmax = back + (fw-1);
@@ -124,7 +124,7 @@ module hinge_mount(bz=WIN_THICK, bl=10) {
} }
} }
module hinge(theta=90) { module hinge(theta=90, show=true) {
x=7; x=7;
py=20; py=20;
d = .4 / sqrt(2); d = .4 / sqrt(2);
@@ -149,13 +149,29 @@ module hinge(theta=90) {
left((x)/2-(5+d))back(15+5)cuboid([x,30+2*d,50], fillet=2, edges=EDGES_X_ALL); left((x)/2-(5+d))back(15+5)cuboid([x,30+2*d,50], fillet=2, edges=EDGES_X_ALL);
right(5)back(20+6)zrot(180) { right(5)back(20+6)zrot(180) {
hinge_mount(bl=9, $die=true); hinge_mount(bl=9, $die=true);
%hinge_mount(bl=9,$die=false); if (show) %hinge_mount(bl=9,$die=false);
} }
} }
} }
} }
module box_edge(ps=PROFILE_SIZE, l=10, orient=ORIENT_Z, jh = JOINER_H,jw = JOINER_W, slop=JOINER_SLOP, jb=5, jup = false, jdown=false, flx=false, ft=FLOOR_THICK, wl=WIN_LIP, ioff=0, wx=true, wt=WIN_THICK, wtr = WIN_TRIM, hm=false, hc=false, ht=0, tubepass=false, tn = 2, ix=true, iy=true, rbfoot=false, rbleft=false, cm=false, align=V_CENTER) { module rearMount(md=141.333, theta=90, show=true) {
x=7;
py=20;
d = .4 / sqrt(2);
zspread(n=2, l=md) difference() {
left(x/2)cuboid([x,20+2*d,50], fillet=2, edges=EDGES_X_ALL);
hinge_mount($die=true);
}
left(5+d)back(13+py/2 + 5+2*d)zrot(theta){
zrot(-theta)zspread(n=2, l=md+25+25/2 ) {
right(5.3)fwd(9/4+6)cuboid([x,2*d+1+9/2+20,25/2], align=V_LEFT);
}
fwd(5+2*d)cyl(r=4.75, h=md+50);
}
}
module box_edge(ps=PROFILE_SIZE, l=10, orient=ORIENT_Z, jh = JOINER_H,jw = JOINER_W, slop=JOINER_SLOP, jb=5, jup = false, jdown=false, flx=false, ft=FLOOR_THICK, wl=WIN_LIP, ioff=0, wx=true, wt=WIN_THICK, wtr = WIN_TRIM, hm=false, hc=false, ht=0, hs=false, tubepass=false, tn = 2, ix=true, iy=true, rbfoot=false, rbleft=false, cm=false, gm=false, align=V_CENTER) {
jzoff = l/2-jw/2; jzoff = l/2-jw/2;
inner_off = ps/2 + wt; inner_off = ps/2 + wt;
jdiff = (ps-wt)/2 - jh; jdiff = (ps-wt)/2 - jh;
@@ -185,10 +201,14 @@ module box_edge(ps=PROFILE_SIZE, l=10, orient=ORIENT_Z, jh = JOINER_H,jw = JOINE
up(ioff) right(ps-wl/2)back(wt)xrot(90) thread_insertM3(bl=5+wt, bz=-5, $die=true); up(ioff) right(ps-wl/2)back(wt)xrot(90) thread_insertM3(bl=5+wt, bz=-5, $die=true);
if (cm) zspread(n=2, l=20) right(inner_off)back(inner_off)zrot(-45)xrot(-90){ if (cm) zspread(n=2, l=20) right(inner_off)back(inner_off)zrot(-45)xrot(-90){
thread_insertM3(bl=6, bz=-4, $die=true); thread_insertM3(bl=6, bz=-4, $die=true);
%thread_insertM3(bl=6, bz=-4, $die=false); //%thread_insertM3(bl=6, bz=-4, $die=false);
}
if (gm) zspread(n=2, l=42) right(inner_off)back(inner_off)zrot(-45)xrot(-90){
thread_insertM3(bl=6, bz=-4, $die=true);
//%thread_insertM3(bl=6, bz=-4, $die=false);
} }
} }
if (hm) zrot(45) right(face_off*sqrt(2)) %hinge(theta=ht); if (hm && hs) zrot(45) right(face_off*sqrt(2)) %hinge(theta=ht);
if (tubepass) { if (tubepass) {
if (tn > 1) { if (tn > 1) {
zspread(l=l/2, n=tn) right(0)zrot(-45)back(face_off*sqrt(2))pc4M10(orient=ORIENT_Y,align=V_BACK); zspread(l=l/2, n=tn) right(0)zrot(-45)back(face_off*sqrt(2))pc4M10(orient=ORIENT_Y,align=V_BACK);
@@ -196,10 +216,6 @@ module box_edge(ps=PROFILE_SIZE, l=10, orient=ORIENT_Z, jh = JOINER_H,jw = JOINE
right(0)zrot(-45)back(face_off*sqrt(2))pc4M10(orient=ORIENT_Y,align=V_BACK); right(0)zrot(-45)back(face_off*sqrt(2))pc4M10(orient=ORIENT_Y,align=V_BACK);
} }
} }
//if (jup) up(l/2 - jw/2)back(joiner_off)right(joiner_off)zrot(45)boxjoiner(orient=ORIENT_Y_90, align=V_CENTER);
//if (jdown) down(l/2 - jw/2)back(joiner_off)right(joiner_off)zrot(45)xrot(180)boxjoiner(orient=ORIENT_Y_90, align=V_CENTER);
//if (jup) up(l/2)back(joiner_off)right(joiner_off)zrot(-45)new_joiner(slop=slop, orient=ORIENT_Y, align=V_CENTER);
//if (jdown) down(l/2)back(joiner_off)right(joiner_off)zrot(-45)yrot(180)new_joiner(slop=slop, orient=ORIENT_Y, align=V_CENTER);
if (jup) up(l/2)back(joiner_off)right(joiner_off)zrot(-45)new_joiner(slop=slop, orient=ORIENT_Y, align=V_CENTER); if (jup) up(l/2)back(joiner_off)right(joiner_off)zrot(-45)new_joiner(slop=slop, orient=ORIENT_Y, align=V_CENTER);
if (jdown) down(l/2)back(joiner_off)right(joiner_off)zrot(-45)yrot(180)new_joiner(slop=slop, orient=ORIENT_Y, align=V_CENTER); if (jdown) down(l/2)back(joiner_off)right(joiner_off)zrot(-45)yrot(180)new_joiner(slop=slop, orient=ORIENT_Y, align=V_CENTER);
if (rbfoot) right(ps/2+psoff-2)zrot(180) { if (rbfoot) right(ps/2+psoff-2)zrot(180) {
@@ -297,6 +313,7 @@ sz = 3*ps/2;
lx = BOX_X - 2* sz - 2*psoff; lx = BOX_X - 2* sz - 2*psoff;
ly = BOX_Y - sz; ly = BOX_Y - sz;
lz = BOX_Z - sz; lz = BOX_Z - sz;
ioff = 4*lx/50;
echo(str("Edge Len X: ", lx, " (3 x ", lx/3, ")")); echo(str("Edge Len X: ", lx, " (3 x ", lx/3, ")"));
echo(str("Edge Len Y: ", ly, " (1 x ", ly, ")")); echo(str("Edge Len Y: ", ly, " (1 x ", ly, ")"));
@@ -326,7 +343,7 @@ if (PART == "edge_back_bottom_a") {
left(coff/2-2*psoff) fwd(lx/5/2)zrot(45)ear(thick=.2, dis=-2); left(coff/2-2*psoff) fwd(lx/5/2)zrot(45)ear(thick=.2, dis=-2);
right(coff/2-2*psoff) fwd(lx/5/2)zrot(135)ear(thick=.2, dis=-2); right(coff/2-2*psoff) fwd(lx/5/2)zrot(135)ear(thick=.2, dis=-2);
} }
up((wt+wl)/sqrt(2))xrot(90) zrot(45) box_edge(l=lx/5, jup=true, jdown=true, flx=true, wx=false, tubepass=true, tn=1, orient=ORIENT_Z); up((wt+wl)/sqrt(2))xrot(90) zrot(45) box_edge(l=lx/5, jup=true, jdown=true, ioff=ioff, flx=true, wx=false, tubepass=true, tn=1, orient=ORIENT_Z);
} }
if (PART == "edge_back_bottom_b") { if (PART == "edge_back_bottom_b") {
if (Print_Ears) { if (Print_Ears) {
@@ -337,8 +354,29 @@ if (PART == "edge_back_bottom_b") {
} }
up((wt+wl)/sqrt(2))xrot(90) zrot(45) box_edge(l=lx/5, jup=true, jdown=true, ix=false, iy=false, flx=true, wx=false, tubepass=true, tn=1, orient=ORIENT_Z); up((wt+wl)/sqrt(2))xrot(90) zrot(45) box_edge(l=lx/5, jup=true, jdown=true, ix=false, iy=false, flx=true, wx=false, tubepass=true, tn=1, orient=ORIENT_Z);
} }
if (PART == "edge_side_foot") { if (PART == "edge_back_bottom_c") {
box_edge(l=ly, rbfoot=true, flx=true, wx=false, jup=true, jdown=true, cm=true, orient=ORIENT_Y); if (Print_Ears) {
left(coff/2-2*psoff) back(lx/5/2)zrot(315)ear(thick=.2, dis=-2);
right(coff/2-2*psoff) back(lx/5/2)zrot(225)ear(thick=.2, dis=-2);
left(coff/2-2*psoff) fwd(lx/5/2)zrot(45)ear(thick=.2, dis=-2);
right(coff/2-2*psoff) fwd(lx/5/2)zrot(135)ear(thick=.2, dis=-2);
}
up((wt+wl)/sqrt(2))xrot(90) zrot(45) box_edge(l=lx/5, jup=true, jdown=true, ix=true, iy=true, flx=true, wx=false, tubepass=true, tn=1, orient=ORIENT_Z);
}
if (PART == "edge_back_bottom_d") {
if (Print_Ears) {
left(coff/2-2*psoff) back(lx/5/2)zrot(315)ear(thick=.2, dis=-2);
right(coff/2-2*psoff) back(lx/5/2)zrot(225)ear(thick=.2, dis=-2);
left(coff/2-2*psoff) fwd(lx/5/2)zrot(45)ear(thick=.2, dis=-2);
right(coff/2-2*psoff) fwd(lx/5/2)zrot(135)ear(thick=.2, dis=-2);
}
up((wt+wl)/sqrt(2))xrot(90) zrot(45) box_edge(l=lx/5, jup=true, jdown=true, ix=true, iy=true, ioff=-ioff, flx=true, wx=false, tubepass=true, tn=1, orient=ORIENT_Z);
}
if (PART == "edge_side_foot_left") {
box_edge(l=ly, rbfoot=true, rbleft=true, flx=true, wx=false, jup=true, jdown=true, gm=true, orient=ORIENT_Y);
}
if (PART == "edge_side_foot_right") {
box_edge(l=ly, rbfoot=true, flx=true, wx=false, jup=true, jdown=true, gm=true, orient=ORIENT_Y);
} }
if (PART == "edge_side_top") { if (PART == "edge_side_top") {
left(coff/2-2*psoff) back(ly/2)zrot(315)ear(thick=.2, dis=-2); left(coff/2-2*psoff) back(ly/2)zrot(315)ear(thick=.2, dis=-2);
@@ -354,7 +392,7 @@ if (PART == "edge_top_front") {
right(coff/2-2*psoff) back(lx/3/2)zrot(225)ear(thick=.2, dis=-2); right(coff/2-2*psoff) back(lx/3/2)zrot(225)ear(thick=.2, dis=-2);
left(coff/2-2*psoff) fwd(lx/3/2)zrot(45)ear(thick=.2, dis=-2); left(coff/2-2*psoff) fwd(lx/3/2)zrot(45)ear(thick=.2, dis=-2);
right(coff/2-2*psoff) fwd(lx/3/2)zrot(135)ear(thick=.2, dis=-2); right(coff/2-2*psoff) fwd(lx/3/2)zrot(135)ear(thick=.2, dis=-2);
up((wt+wl)/sqrt(2)) yrot(45+90)zrot(90)box_edge(l=lx/3, rbfoot=false, hm=true, ht=r, flx=false, iy=false, wx=true, jup=true, jdown=true, cm=true, orient=ORIENT_XNEG_180); up((wt+wl)/sqrt(2)) yrot(45+90)zrot(90)box_edge(l=lx/3, rbfoot=false, hm=true, ht=r, hs=true, flx=false, iy=false, wx=true, jup=true, jdown=true, cm=true, orient=ORIENT_XNEG_180);
face_off = ((ps+psoff)/4); face_off = ((ps+psoff)/4);
//xrot(45)yrot(-90)right(face_off+7/2)zrot(180)hinge(); //xrot(45)yrot(-90)right(face_off+7/2)zrot(180)hinge();
} }
@@ -375,9 +413,9 @@ if (PART == "full_box") {
left(ps+lx/2) fwd(ps+ly/2) box_corner(orient=ORIENT_ZNEG, cl=true); left(ps+lx/2) fwd(ps+ly/2) box_corner(orient=ORIENT_ZNEG, cl=true);
} }
up(lz/2+eoff) { // Top Edges up(lz/2+eoff) { // Top Edges
fwd(eoff + ly/2) xspread(n=3, lx/3) box_edge(l=lx/3, hm=true, hc=true, jup=true, jdown=true, iy=false, flx=true, wx=false, orient=ORIENT_XNEG_180); fwd(eoff + ly/2) xspread(n=3, lx/3) box_edge(l=lx/3, hm=true, hc=true, hs=true, jup=true, jdown=true, iy=false, flx=true, wx=false, orient=ORIENT_XNEG_180);
back(eoff + ly/2) { back(eoff + ly/2) {
xspread(n=3, lx/3)box_edge(l=lx/3, jup=true, jdown=true, flx=true, wx=false, tubepass=false, orient=ORIENT_X_180); xspread(n=3, lx/3)box_edge(l=lx/3, jup=true, jdown=true, hm=true, hc=false, flx=true, wx=false, tubepass=false, orient=ORIENT_X_180);
} }
right(eoff + lx/2) box_edge(l=ly, jup=true, jdown=true, flx=true, wx=false, orient=ORIENT_YNEG_180); right(eoff + lx/2) box_edge(l=ly, jup=true, jdown=true, flx=true, wx=false, orient=ORIENT_YNEG_180);
left(eoff + lx/2) zrot(180)box_edge(l=ly, jup=true, jdown=true, flx=true, wx=false, orient=ORIENT_YNEG_180); left(eoff + lx/2) zrot(180)box_edge(l=ly, jup=true, jdown=true, flx=true, wx=false, orient=ORIENT_YNEG_180);
@@ -395,7 +433,6 @@ if (PART == "full_box") {
down(lz/2+eoff) { down(lz/2+eoff) {
fwd(eoff + ly/2) xspread(n=3, lx/3) box_edge(l=lx/3, iy=false, jup=true, jdown=true, flx=true, wx=false, orient=ORIENT_X); fwd(eoff + ly/2) xspread(n=3, lx/3) box_edge(l=lx/3, iy=false, jup=true, jdown=true, flx=true, wx=false, orient=ORIENT_X);
back(eoff + ly/2) zrot(180) { // rear back(eoff + ly/2) zrot(180) { // rear
ioff = 4*lx/50;
box_edge(l=lx/5, jup=true, jdown=true, flx=true, wx=false, tubepass=true, tn=1, orient=ORIENT_X); box_edge(l=lx/5, jup=true, jdown=true, flx=true, wx=false, tubepass=true, tn=1, orient=ORIENT_X);
xspread(n=2, 2*lx/5)box_edge(l=lx/5, jup=true, jdown=true, flx=true, wx=false, tubepass=true, tn=1, ix=false, iy=false, orient=ORIENT_X); xspread(n=2, 2*lx/5)box_edge(l=lx/5, jup=true, jdown=true, flx=true, wx=false, tubepass=true, tn=1, ix=false, iy=false, orient=ORIENT_X);
left(4*lx/10)box_edge(l=lx/5, jup=true, jdown=true, flx=true, wx=false, tubepass=true, tn=1, ioff=ioff, orient=ORIENT_X); left(4*lx/10)box_edge(l=lx/5, jup=true, jdown=true, flx=true, wx=false, tubepass=true, tn=1, ioff=ioff, orient=ORIENT_X);
@@ -439,8 +476,22 @@ if (PART == "hinge") {
hinge(theta=r); hinge(theta=r);
} }
if (PART == "rear_mount") {
rearMount();
}
if (PART == "new_joiner") { if (PART == "new_joiner") {
new_joiner(); new_joiner();
//#new_joiner_clear(); //#new_joiner_clear();
//boxjoiner(); //boxjoiner();
} }
if (PART == "grid_mount") {
difference() {
union() {
fwd(19.799/2)cuboid([48,6+19.799,1]);
fwd(19.799)xrot(-45) cuboid([84,6,25], align=V_TOP);
}
xspread(n=2, l=42) cyl(d=3.2, h=5);
}
}