From 14f7e84755c253adc6bb6c63a89c3df182ecbd39 Mon Sep 17 00:00:00 2001 From: Stephen J Carpenter Date: Sun, 24 Mar 2024 10:39:50 -0400 Subject: [PATCH] Added mouse ears; back bottom renders in print orientation --- box.scad | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/box.scad b/box.scad index d97b853..1c825ea 100644 --- a/box.scad +++ b/box.scad @@ -6,10 +6,11 @@ include include include <./pc4m10.scad> include +include /* [Part] */ -PART = ""; // [ all_corners, corner_top, corner_bottom, edge_back, edge_side_top, edge_side_foot, edge_top_front, edge_top_back, edge_test, full_box, joiner_top, joiner_bottom, profile, side_edge, rbfoot ] +PART = ""; // [ all_corners, corner_top, corner_bottom, edge_back_bottom, edge_side_top, edge_side_foot, edge_top_front, edge_top_back, edge_test, full_box, joiner_top, joiner_bottom, profile, side_edge, rbfoot ] /* [Dimensions] */ @@ -37,7 +38,7 @@ RB_MOUNT_IN_H=6.15; /* [Render Options] */ render_fs=.4; -render_fn=0; +render_fn=undef; render_fa=.4; // Set Render Options @@ -159,8 +160,8 @@ module box_corner(ps = PROFILE_SIZE, l=0, zfl = true, zw = false, wl=WIN_LIP, w module beam_joiner(jw=JOINER_W, jh=JOINER_H, fl=false) { difference() { union() { - fwd(jw/2)boxjoiner(h=jh, w=jw,l=5,align=FRONT, orient=ORIENT_X); - back(jw/2)zrot(180)boxjoiner(h=jh, w=jw,l=5,align=FRONT, orient=ORIENT_X); + boxjoiner(jh=jh, jw=jw,l=5,align=V_FRONT, orient=ORIENT_X); + zrot(180)boxjoiner(jh=jh, jw=jw,l=5,align=V_FRONT, orient=ORIENT_X); } if (fl) left(jh/2)down(3)yrot(45)cuboid([jw,2*jh,4]); @@ -194,8 +195,10 @@ module boxjoiner_clear(inset=5, slop=.01, jh=JOINER_H, jw=JOINER_W, align=V_FRON } } +wt=WIN_TRIM; +wl=WIN_LIP; ps = PROFILE_SIZE; -psoff = ps/2 - WIN_LIP - WIN_THICK; +psoff = ps/2 - wl - wt; coff = ps + psoff; sz = 3*ps/2; lx = BOX_X - 2* sz - 2*psoff; @@ -213,8 +216,12 @@ if (PART == "all_corners") box_all_corners(ex=30); if (PART == "corner_top") box_corner(zw=true, zfl=false); if (PART == "corner_bottom") box_corner(zw=false, zfl=true); -if (PART == "edge_back") { - xrot(90) zrot(0) box_edge(l=lx/3, jup=true, jdown=true, flx=true, wx=false, tubepass=true, orient=ORIENT_Z); +if (PART == "edge_back_bottom") { + left(coff/2-2*psoff) back(lx/3/2)zrot(315)ear(); + right(coff/2-2*psoff) back(lx/3/2)zrot(225)ear(); + left(coff/2-2*psoff) fwd(lx/3/2)zrot(45)ear(); + right(coff/2-2*psoff) fwd(lx/3/2)zrot(135)ear(); + up((wt+wl)/sqrt(2))xrot(90) zrot(45) box_edge(l=lx/3, jup=true, jdown=true, flx=true, wx=false, tubepass=true, orient=ORIENT_Z); } if (PART == "edge_side_foot") box_edge(l=ly, rbfoot=true, flx=true, wx=false, jup=true, jdown=true, cm=true, orient=ORIENT_Y); if (PART == "edge_side_top") box_edge(l=ly, rbfoot=false, flx=true, wx=false, jup=true, jdown=true, cm=true, orient=ORIENT_Y); @@ -265,7 +272,13 @@ if (PART == "full_box") { xspread(n=6, l=70*6) %cyl(d=200, l=70, orient=ORIENT_X); } if (PART == "joiner_top") beam_joiner(fl=false); -if (PART == "joiner_bottom") beam_joiner(fl=true); +if (PART == "joiner_bottom") { + back(JOINER_W) right(JOINER_H/2) zrot(225)ear(); + back(JOINER_W) left(JOINER_H/2 - 5) zrot(315)ear(); + fwd(JOINER_W) right(JOINER_H/2) zrot(135)ear(); + fwd(JOINER_W) left(JOINER_H/2-5) zrot(45)ear(); + up(5) beam_joiner(fl=true); +} if (PART == "rbfoot") rb_foot();