2024-03-17 11:03:14 -04:00
|
|
|
/* */
|
|
|
|
|
|
|
|
|
|
include <BOSL/constants.scad>
|
|
|
|
|
include <BOSL/shapes.scad>
|
|
|
|
|
include <BOSL/transforms.scad>
|
|
|
|
|
include <BOSL/joiners.scad>
|
|
|
|
|
include <./pc4m10.scad>
|
2024-03-22 12:17:54 -04:00
|
|
|
include <inserts/inserts.scad>
|
2024-03-24 10:39:50 -04:00
|
|
|
include <fdmouse.scad>
|
2024-03-17 11:03:14 -04:00
|
|
|
|
2024-03-18 18:02:05 -04:00
|
|
|
/* [Part] */
|
|
|
|
|
|
2024-04-03 19:09:38 -04:00
|
|
|
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, hinge ]
|
2024-03-18 18:02:05 -04:00
|
|
|
|
2024-03-17 11:03:14 -04:00
|
|
|
/* [Dimensions] */
|
|
|
|
|
|
2024-03-18 18:02:05 -04:00
|
|
|
PROFILE_SIZE = 34;
|
2024-03-17 11:03:14 -04:00
|
|
|
|
|
|
|
|
BOX_X = 530;
|
|
|
|
|
BOX_Y = 210;
|
|
|
|
|
BOX_Z = 210;
|
|
|
|
|
|
|
|
|
|
WIN_LIP = 10;
|
|
|
|
|
WIN_TRIM = 5;
|
|
|
|
|
WIN_THICK = 3;
|
|
|
|
|
|
|
|
|
|
FLOOR_LIP = 10;
|
|
|
|
|
FLOOR_THICK = 5;
|
|
|
|
|
|
|
|
|
|
JOINER_H = 18;
|
|
|
|
|
JOINER_W = 10;
|
|
|
|
|
|
2024-03-19 21:32:27 -04:00
|
|
|
RB_MOUNT_INSET=17;
|
|
|
|
|
RB_MOUNT_WIDTH=9;
|
|
|
|
|
RB_MOUNT_LEN=136;
|
|
|
|
|
RB_MOUNT_OUT_H=19;
|
|
|
|
|
RB_MOUNT_IN_H=6.15;
|
|
|
|
|
|
2024-03-17 11:03:14 -04:00
|
|
|
/* [Render Options] */
|
|
|
|
|
render_fs=.4;
|
2024-03-24 10:39:50 -04:00
|
|
|
render_fn=undef;
|
2024-03-17 11:03:14 -04:00
|
|
|
render_fa=.4;
|
|
|
|
|
|
|
|
|
|
// Set Render Options
|
|
|
|
|
$fs= ($preview) ? $fs : render_fs;
|
|
|
|
|
$fn= ($preview) ? $fn : render_fn;
|
|
|
|
|
$fa= ($preview) ? $fa : render_fa;
|
|
|
|
|
|
|
|
|
|
/***
|
|
|
|
|
|
|
|
|
|
sides:
|
|
|
|
|
V_TOP, [0,0,1] : Top Middle Brace
|
|
|
|
|
V_ALLPOS, [1,1,1] POS Corner
|
|
|
|
|
V_TOPLEFT, [-1,0,1] : Left Top Edge
|
|
|
|
|
|
|
|
|
|
***/
|
|
|
|
|
|
|
|
|
|
//profile();
|
|
|
|
|
module profile(ps=PROFILE_SIZE, wl=WIN_LIP, wt=WIN_THICK, wtr=WIN_TRIM, fl=FLOOR_LIP, ft=FLOOR_THICK, flx=false, fly=false, wx=true, wy=true) {
|
2024-03-19 21:32:27 -04:00
|
|
|
conv = (wx && wy && flx)
|
|
|
|
|
? 3
|
|
|
|
|
: ((wx && wy) || (wy && flx))
|
|
|
|
|
? 2
|
|
|
|
|
: (wx || wy || flx)
|
|
|
|
|
? 1
|
|
|
|
|
: 0;
|
2024-03-17 11:03:14 -04:00
|
|
|
gon=concat(
|
2024-03-18 18:02:05 -04:00
|
|
|
[[0,ps-wl-wtr]], // Trim Start
|
2024-03-17 11:03:14 -04:00
|
|
|
// Y Window
|
2024-03-18 18:02:05 -04:00
|
|
|
wy ? [[0,ps-wl],[wt,ps-wl],[wt,ps]]
|
|
|
|
|
: [[0,ps]],
|
|
|
|
|
[[2*wt,ps]], // End of Y.
|
|
|
|
|
// Inner Cut to X
|
|
|
|
|
flx ? [[ps-fl,2*wt+fl],[ps-fl,2*wt+fl-ft],[ps,2*wt+fl-ft]]
|
|
|
|
|
: [[ps,2*wt]],
|
2024-03-17 11:03:14 -04:00
|
|
|
// X Window
|
2024-03-18 18:02:05 -04:00
|
|
|
wx ? [[ps,wt],[ps-wl,wt],[ps-wl,0]]
|
|
|
|
|
: [[ps,0]],
|
|
|
|
|
[[ps-wl-wtr,0]]
|
2024-03-17 11:03:14 -04:00
|
|
|
);
|
2024-03-19 21:32:27 -04:00
|
|
|
polygon(points = gon, convexity=conv);
|
|
|
|
|
}
|
|
|
|
|
|
2024-03-21 00:11:37 -04:00
|
|
|
module rb_foot(fw=RB_MOUNT_WIDTH, rl=RB_MOUNT_LEN, rh=RB_MOUNT_OUT_H, fl=10) {
|
|
|
|
|
translate([-(fl+rl/2),0]) linear_extrude(height=fw-1)
|
|
|
|
|
offset(r=1)offset(delta=-1)union() {
|
|
|
|
|
square([rl+2*fl, rh]);
|
|
|
|
|
square([fl, rh+fl]);
|
|
|
|
|
translate([rl+fl,0]) square([fl, rh+fl]);
|
|
|
|
|
}
|
|
|
|
|
back=5;
|
|
|
|
|
bmax = back + (fw-1);
|
2024-03-19 21:32:27 -04:00
|
|
|
|
2024-03-21 00:11:37 -04:00
|
|
|
fwd(bmax)up(fw-1)
|
2024-03-22 12:17:54 -04:00
|
|
|
yrot(90)linear_extrude(height=rl, center=true) polygon([[0,bmax-fw+1],[0,bmax],[fw-1,bmax]]);
|
2024-03-21 00:11:37 -04:00
|
|
|
|
2024-03-17 11:03:14 -04:00
|
|
|
}
|
|
|
|
|
|
2024-03-21 00:11:37 -04:00
|
|
|
module hinge_mount(bz=WIN_THICK, bl=10) {
|
|
|
|
|
zspread(l=40) {
|
|
|
|
|
zrot(-90)xrot(90)right(5) {
|
2024-04-03 19:09:38 -04:00
|
|
|
up(3+2) cyl(d1=7, d2=9,h=7, align=V_TOP);
|
|
|
|
|
thread_insertM3(bl=10,bz=-7, $die=true);
|
|
|
|
|
//%thread_insertM3(bl=10,bz=-7);
|
2024-03-21 00:11:37 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
zrot(-90)xrot(90)left(5) {
|
2024-04-03 19:09:38 -04:00
|
|
|
up(3+2) cyl(d1=7, d2=9,h=7, align=V_TOP);
|
2024-03-21 00:11:37 -04:00
|
|
|
thread_insertM3(bl=10,bz=-7, $die=true);
|
2024-04-03 19:09:38 -04:00
|
|
|
//%thread_insertM3(bl=10,bz=-7);
|
2024-03-21 00:11:37 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-03-22 19:06:10 -04:00
|
|
|
module box_edge(ps=PROFILE_SIZE, l=10, orient=ORIENT_Z, jh = JOINER_H,jw = JOINER_W, jb=5, jup = false, jdown=false, flx=false, ft=FLOOR_THICK, wl=WIN_LIP, wx=true, wt=WIN_THICK, wtr = WIN_TRIM, hm=false, tubepass=false, tn = 2, ix=true, iy=true, rbfoot=false, cm=false, align=V_CENTER) {
|
|
|
|
|
inner_off = ps/2 + wt;
|
|
|
|
|
joiner_off = inner_off - jb/sqrt(2);
|
2024-03-19 00:10:58 -04:00
|
|
|
jzoff = l/2-jw/2;
|
2024-03-21 00:11:37 -04:00
|
|
|
psoff = ps/2 - wl - wt;
|
|
|
|
|
face_off = ((ps+psoff)/4);
|
2024-03-18 18:02:05 -04:00
|
|
|
orient_and_align([ps,ps,l], orient=orient, align=align, orig_orient=ORIENT_Z) left(ps/2) fwd(ps/2) {
|
2024-03-17 11:03:14 -04:00
|
|
|
difference() {
|
|
|
|
|
linear_extrude(height=l, center=true)
|
|
|
|
|
profile(flx=flx, fly=true, wx=wx, wy=true);
|
2024-03-22 19:06:10 -04:00
|
|
|
if (jup) up(jzoff) back(joiner_off)right(joiner_off)zrot(45)boxjoiner_clear(orient=ORIENT_Y_90, align=V_CENTER, cl="green");
|
2024-03-22 15:14:19 -04:00
|
|
|
if (jdown) down(jzoff)back(joiner_off)right(joiner_off)zrot(45)boxjoiner_clear(orient=ORIENT_Y_90, align=V_CENTER, cl="brown");
|
2024-03-21 16:19:43 -04:00
|
|
|
if (tubepass) zspread(l=l/2, n=tn) zrot(-45)back(face_off*sqrt(2)-.01)pc4M10_clear(orient=ORIENT_Y,align=V_BACK);
|
2024-03-21 00:11:37 -04:00
|
|
|
if (hm) right(face_off)back(face_off)zrot(45)hinge_mount();
|
2024-03-21 16:19:43 -04:00
|
|
|
if (iy) back(ps-wl/2)right(wt)yrot(-90) thread_insertM3(bl=5+wt, bz=-wt-2, $die=true);
|
|
|
|
|
if (ix && flx )
|
|
|
|
|
right(ps-wl/2)back(ps/2-ft-1)xrot(-90) thread_insertM3(bl=ft+3, bz=-ft, $die=true);
|
|
|
|
|
if (ix && wx)
|
|
|
|
|
right(ps-wl/2)back(wt)xrot(90) thread_insertM3(bl=5+wt, bz=-wt-2, $die=true);
|
2024-03-22 19:06:10 -04:00
|
|
|
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=false);
|
|
|
|
|
}
|
2024-03-17 11:03:14 -04:00
|
|
|
}
|
2024-04-03 19:09:38 -04:00
|
|
|
if (hm) zrot(45) right(face_off*sqrt(2)) %hinge();
|
2024-03-21 16:19:43 -04:00
|
|
|
if (tubepass) zspread(l=l/2, n=tn) right(0)zrot(-45)back(face_off*sqrt(2))pc4M10(orient=ORIENT_Y,align=V_BACK);
|
2024-03-18 18:02:05 -04:00
|
|
|
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);
|
2024-03-22 12:17:54 -04:00
|
|
|
if (rbfoot) right(ps/2+psoff-2)zrot(180)yrot(90)rb_foot();
|
2024-03-17 11:03:14 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-03-21 00:11:37 -04:00
|
|
|
module box_corner(ps = PROFILE_SIZE, l=0, zfl = true, zw = false, wl=WIN_LIP, wt=WIN_THICK, align=V_CENTER, orient=ORIENT_Z) {
|
|
|
|
|
psoff = ps/2 - wl - wt;
|
|
|
|
|
coff = ps + psoff;
|
2024-03-22 12:17:54 -04:00
|
|
|
sz = 3*ps/2 + psoff;
|
2024-03-19 21:32:27 -04:00
|
|
|
orient_and_align([sz,sz,sz], orient=orient, align=align) {
|
2024-03-17 11:03:14 -04:00
|
|
|
intersection() {
|
2024-03-18 18:02:05 -04:00
|
|
|
// Cap
|
2024-03-22 12:17:54 -04:00
|
|
|
fwd(ps)right(psoff)down(psoff)right(ps/2)box_edge(l=PROFILE_SIZE, orient=ORIENT_Y, align=V_BACK+V_LEFT, flx=zfl, wx=zw);
|
|
|
|
|
right(ps)fwd(psoff)down(psoff)fwd(ps/2)box_edge(l=PROFILE_SIZE, orient=ORIENT_X, align=V_BACK+V_LEFT, flx=zfl, wx=zw);
|
|
|
|
|
down(ps/2+WIN_TRIM)fwd(psoff)right(psoff)box_edge(l=PROFILE_SIZE, orient=ORIENT_Z_90, align=V_TOP, flx=false, wx=true);
|
2024-03-17 11:03:14 -04:00
|
|
|
}
|
2024-03-22 12:17:54 -04:00
|
|
|
fwd(1)right(psoff)down(psoff)right(ps/2)box_edge(l=ps+1, orient=ORIENT_Y, jup=true, align=V_BACK+V_LEFT, flx=zfl, wx=zw);
|
|
|
|
|
right(1)fwd(psoff)down(psoff)fwd(ps/2)box_edge(l=ps+1, orient=ORIENT_X, jdown=true, align=V_BACK+V_LEFT, flx=zfl, wx=zw);
|
|
|
|
|
down(1)fwd(psoff)right(psoff)box_edge(l=ps+1, orient=ORIENT_Z_90, align=V_TOP, jup=true, flx=false, wx=true);
|
2024-03-17 11:03:14 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-03-18 18:02:05 -04:00
|
|
|
module beam_joiner(jw=JOINER_W, jh=JOINER_H, fl=false) {
|
|
|
|
|
difference() {
|
|
|
|
|
union() {
|
2024-03-24 10:39:50 -04:00
|
|
|
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);
|
2024-03-18 18:02:05 -04:00
|
|
|
}
|
|
|
|
|
if (fl)
|
2024-03-21 16:19:43 -04:00
|
|
|
left(jh/2)down(3)yrot(45)cuboid([jw,2*jh,4]);
|
2024-03-18 18:02:05 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
2024-03-17 11:03:14 -04:00
|
|
|
|
|
|
|
|
module box_all_corners(ex=0) {
|
|
|
|
|
// top
|
|
|
|
|
up(ex) fwd(ex) left(ex) box_corner(zfl=false, zw=true,align=V_UP+V_FRONT+V_LEFT, orient=ORIENT_ZNEG);
|
|
|
|
|
up(ex) back(ex) left(ex) box_corner(zfl=false, zw=true,align=V_UP+V_BACK+V_LEFT, orient=ORIENT_ZNEG_90);
|
|
|
|
|
up(ex) back(ex) right(ex) box_corner(zfl=false, zw=true, align=V_UP+V_BACK+V_RIGHT, orient=ORIENT_ZNEG_180);
|
|
|
|
|
up(ex) fwd(ex) right(ex) box_corner(zfl=false,zw=true,align=V_UP+V_FRONT+V_RIGHT, orient=ORIENT_ZNEG_270);
|
|
|
|
|
// bottom
|
|
|
|
|
down(ex) fwd(ex) right(ex) box_corner(align=V_DOWN+V_FRONT+V_RIGHT, orient=ORIENT_Z);
|
|
|
|
|
down(ex) back(ex) right(ex) box_corner(align=V_DOWN+V_BACK+V_RIGHT, orient=ORIENT_Z_90);
|
|
|
|
|
down(ex) back(ex) left(ex) box_corner(align=V_DOWN+V_BACK+V_LEFT, orient=ORIENT_Z_180);
|
|
|
|
|
down(ex) fwd(ex) left(ex) box_corner(align=V_DOWN+V_FRONT+V_LEFT, orient=ORIENT_Z_270);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
module boxjoiner(slop=.01, align=V_FRONT, jh=JOINER_H, jw=JOINER_W, l=3, orient=ORIENT_Z) {
|
2024-03-18 18:02:05 -04:00
|
|
|
orient_and_align([jw,0,jh], orig_align=V_FRONT, align=align, orient=orient)
|
2024-03-17 11:03:14 -04:00
|
|
|
joiner(h=jh, w=jw, l=l, screwsize= $preview ? undef : .8);
|
|
|
|
|
}
|
2024-03-18 18:02:05 -04:00
|
|
|
|
2024-03-22 15:14:19 -04:00
|
|
|
module boxjoiner_clear(inset=5, slop=.01, jh=JOINER_H, jw=JOINER_W, align=V_FRONT, orient=ORIENT_Z, cl=undef) {
|
|
|
|
|
color(cl)
|
2024-03-17 11:03:14 -04:00
|
|
|
orient_and_align([jw,inset,jh],orient=orient, align=align) fwd() {
|
2024-03-18 18:02:05 -04:00
|
|
|
cuboid([jw+slop,inset+slop,jh], align=V_BACK);
|
|
|
|
|
joiner_clear(h=jh, w=jw+slop);
|
2024-03-17 11:03:14 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-03 19:09:38 -04:00
|
|
|
module hinge(theta=90) {
|
|
|
|
|
x=7;
|
|
|
|
|
difference() {
|
|
|
|
|
left(x/2)cuboid([x,20,50], fillet=2, edges=EDGES_X_ALL);
|
|
|
|
|
hinge_mount($die=true);
|
|
|
|
|
}
|
|
|
|
|
zrot(theta)back(11+5){
|
|
|
|
|
cylinder(r=5, h=6);
|
|
|
|
|
back(10+5)cuboid([x,20,50], fillet=2, edges=EDGES_X_ALL);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-03-24 10:39:50 -04:00
|
|
|
wt=WIN_TRIM;
|
|
|
|
|
wl=WIN_LIP;
|
2024-03-22 12:17:54 -04:00
|
|
|
ps = PROFILE_SIZE;
|
2024-03-24 10:39:50 -04:00
|
|
|
psoff = ps/2 - wl - wt;
|
2024-03-22 12:17:54 -04:00
|
|
|
coff = ps + psoff;
|
|
|
|
|
sz = 3*ps/2;
|
|
|
|
|
lx = BOX_X - 2* sz - 2*psoff;
|
|
|
|
|
ly = BOX_Y - sz;
|
|
|
|
|
lz = BOX_Z - sz;
|
|
|
|
|
|
|
|
|
|
echo(str("Edge Len X: ", lx, " (3 x ", lx/3, ")"));
|
|
|
|
|
echo(str("Edge Len Y: ", ly, " (1 x ", ly, ")"));
|
|
|
|
|
echo(str("Edge Len Z: ", lz, " (1 x ", lz, ")"));
|
2024-03-21 00:11:37 -04:00
|
|
|
|
2024-04-03 19:09:38 -04:00
|
|
|
echo(str("Window Size: ", lx + 2* (ps-WIN_THICK-1), "mm x ", ly + 2*(ps-WIN_THICK-1), "mm"));
|
|
|
|
|
|
2024-03-19 21:32:27 -04:00
|
|
|
if (PART == "profile") {
|
|
|
|
|
profile(flx=true);
|
|
|
|
|
}
|
2024-03-18 18:02:05 -04:00
|
|
|
if (PART == "all_corners")
|
|
|
|
|
box_all_corners(ex=30);
|
2024-03-22 12:17:54 -04:00
|
|
|
if (PART == "corner_top") box_corner(zw=true, zfl=false);
|
|
|
|
|
if (PART == "corner_bottom") box_corner(zw=false, zfl=true);
|
2024-03-24 10:39:50 -04:00
|
|
|
if (PART == "edge_back_bottom") {
|
2024-04-03 19:09:38 -04:00
|
|
|
left(coff/2-2*psoff) back(lx/3/2)zrot(315)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);
|
|
|
|
|
right(coff/2-2*psoff) fwd(lx/3/2)zrot(135)ear(thick=.2, dis=-2);
|
2024-03-24 10:39:50 -04:00
|
|
|
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);
|
2024-03-22 12:17:54 -04:00
|
|
|
}
|
2024-04-03 19:09:38 -04:00
|
|
|
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") {
|
|
|
|
|
left(coff/2-2*psoff) back(ly/2)zrot(315)ear(thick=.2, dis=-2);
|
|
|
|
|
right(coff/2-2*psoff) back(ly/2)zrot(225)ear(thick=.2, dis=-2);
|
|
|
|
|
left(coff/2-2*psoff) fwd(ly/2)zrot(45)ear(thick=.2, dis=-2);
|
|
|
|
|
right(coff/2-2*psoff) fwd(ly/2)zrot(135)ear(thick=.2, dis=-2);
|
|
|
|
|
up((wt+wl)/sqrt(2))yrot(45)box_edge(l=ly, rbfoot=false, flx=false, wx=true, jup=true, jdown=true, cm=true, orient=ORIENT_Y);
|
|
|
|
|
}
|
|
|
|
|
if (PART == "edge_top_front") {
|
|
|
|
|
box_edge(l=lx/3, rbfoot=false, hm=true, flx=false, iy=false, wx=true, jup=true, jdown=true, cm=true, orient=ORIENT_XNEG_180);
|
|
|
|
|
face_off = ((ps+psoff)/4);
|
|
|
|
|
//xrot(45)yrot(-90)right(face_off+7/2)zrot(180)hinge();
|
|
|
|
|
}
|
2024-03-22 19:06:10 -04:00
|
|
|
if (PART == "edge_top_back") box_edge(l=lx/3, rbfoot=false, hm=false, flx=false, iy=false, wx=true, jup=true, jdown=true, cm=true, orient=ORIENT_XNEG_180);
|
2024-03-19 21:32:27 -04:00
|
|
|
if (PART == "full_box") {
|
|
|
|
|
up(lz/2+ps) {
|
2024-03-21 16:19:43 -04:00
|
|
|
// Top Corners:
|
2024-03-22 12:17:54 -04:00
|
|
|
right(ps+lx/2) fwd(ps+ly/2) box_corner(orient=ORIENT_ZNEG_270, zfl=false);
|
2024-03-21 16:19:43 -04:00
|
|
|
right(ps+lx/2) back(ps+ly/2) box_corner(orient=ORIENT_ZNEG_180);
|
|
|
|
|
left(ps+lx/2) back(ps+ly/2) box_corner(orient=ORIENT_ZNEG_90);
|
|
|
|
|
left(ps+lx/2) fwd(ps+ly/2) box_corner(orient=ORIENT_ZNEG);
|
2024-03-19 21:32:27 -04:00
|
|
|
}
|
|
|
|
|
up(lz/2+coff) { // Top Edges
|
2024-03-22 12:17:54 -04:00
|
|
|
fwd(coff + ly/2) xspread(n=3, lx/3) box_edge(l=lx/3, hm=true, jup=true, jdown=true, iy=false, flx=true, wx=false, orient=ORIENT_XNEG_180);
|
2024-03-19 21:32:27 -04:00
|
|
|
back(coff + 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);
|
|
|
|
|
}
|
|
|
|
|
right(coff + lx/2) box_edge(l=ly, jup=true, jdown=true, flx=true, wx=false, orient=ORIENT_YNEG_180);
|
|
|
|
|
left(coff + lx/2) zrot(180)box_edge(l=ly, jup=true, jdown=true, flx=true, wx=false, orient=ORIENT_YNEG_180);
|
|
|
|
|
}
|
2024-03-22 12:17:54 -04:00
|
|
|
{ // vertical
|
2024-03-19 21:32:27 -04:00
|
|
|
left(coff+lx/2)fwd(coff+ly/2)
|
2024-03-22 12:17:54 -04:00
|
|
|
box_edge(l=lz,jup=true, ix=false, jdown=true);
|
2024-03-19 21:32:27 -04:00
|
|
|
right(coff+lx/2)fwd(coff+ly/2)
|
2024-03-22 12:17:54 -04:00
|
|
|
box_edge(l=lz,jup=true, iy=false, jdown=true, orient=ORIENT_Z_90);
|
2024-03-19 21:32:27 -04:00
|
|
|
right(coff+lx/2)back(coff+ly/2)
|
|
|
|
|
box_edge(l=lz,jup=true, jdown=true, orient=ORIENT_Z_180);
|
|
|
|
|
left(coff+lx/2)back(coff+ly/2)
|
|
|
|
|
box_edge(l=lz,jup=true, jdown=true, orient=ORIENT_Z_270);
|
|
|
|
|
}
|
2024-03-22 12:17:54 -04:00
|
|
|
down(lz/2+coff) {
|
|
|
|
|
fwd(coff + 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);
|
2024-03-19 21:32:27 -04:00
|
|
|
back(coff + ly/2) zrot(180) { // rear
|
|
|
|
|
xspread(n=3, lx/3)box_edge(l=lx/3, jup=true, jdown=true, flx=true, wx=false, tubepass=true, orient=ORIENT_X);
|
|
|
|
|
}
|
2024-03-22 12:17:54 -04:00
|
|
|
right(coff + lx/2) box_edge(l=ly, jup=true, jdown=true, flx=true, wx=false, rbfoot=true, orient=ORIENT_Y);
|
|
|
|
|
left(coff + lx/2) zrot(180)box_edge(l=ly, jup=true, jdown=true, flx=true, wx=false, rbfoot=true, orient=ORIENT_Y);
|
2024-03-19 21:32:27 -04:00
|
|
|
}
|
|
|
|
|
down(lz/2+ps) {
|
|
|
|
|
// Bottom Corners:
|
2024-03-22 12:17:54 -04:00
|
|
|
right(ps+lx/2) fwd(ps+ly/2)box_corner();
|
2024-03-19 21:32:27 -04:00
|
|
|
right(ps+lx/2) back(ps+ly/2)box_corner(orient=ORIENT_Z_90);
|
|
|
|
|
left(ps+lx/2) back(ps+ly/2)box_corner(orient=ORIENT_Z_180);
|
|
|
|
|
left(ps+lx/2) fwd(ps+ly/2)box_corner(orient=ORIENT_Z_270);
|
|
|
|
|
}
|
2024-03-21 00:11:37 -04:00
|
|
|
|
|
|
|
|
xspread(n=6, l=70*6) %cyl(d=200, l=70, orient=ORIENT_X);
|
2024-03-18 18:02:05 -04:00
|
|
|
}
|
2024-03-22 12:17:54 -04:00
|
|
|
if (PART == "joiner_top") beam_joiner(fl=false);
|
2024-03-24 10:39:50 -04:00
|
|
|
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);
|
|
|
|
|
}
|
2024-03-18 18:02:05 -04:00
|
|
|
|
2024-03-21 00:11:37 -04:00
|
|
|
if (PART == "rbfoot") rb_foot();
|
2024-03-21 16:19:43 -04:00
|
|
|
|
|
|
|
|
if (PART == "edge_test") box_edge(l=35, tubepass=true, jup=true, jdown=true, tn=1, flx=true, wx = false, orient=ORIENT_Y);
|
2024-03-22 12:17:54 -04:00
|
|
|
|
2024-04-03 19:09:38 -04:00
|
|
|
if (PART == "hinge") {
|
|
|
|
|
box_edge(l=lx/3, rbfoot=false, hm=true, flx=false, iy=false, wx=true, jup=true, jdown=true, cm=true);
|
|
|
|
|
//hinge();
|
|
|
|
|
}
|
2024-03-22 12:17:54 -04:00
|
|
|
//down(BOX_Y/2 + 40)color("red") cube([BOX_X-22, BOX_Y, 1], center=true);
|
|
|
|
|
//down(BOX_Y/2 + 0*40)color("blue") cube([BOX_X, BOX_Y/2, 1], center=true);
|
|
|
|
|
|