added modes and inserts
Added initeq m3 insert holes new modes edge_side_foot edge_test side foot not yet integrated into edge
This commit is contained in:
32
box.scad
32
box.scad
@@ -8,7 +8,7 @@ include <./pc4m10.scad>
|
||||
|
||||
/* [Part] */
|
||||
|
||||
PART = ""; // [corner, back_edge, all_corners, full_box, beamjoiner, profile, edge, rbfoot]
|
||||
PART = ""; // [ all_corners, corner, edge_back, edge_side_foot, edge_test, full_box, beamjoiner, profile, side_edge, rbfoot ]
|
||||
|
||||
/* [Dimensions] */
|
||||
|
||||
@@ -107,7 +107,7 @@ module hinge_mount(bz=WIN_THICK, bl=10) {
|
||||
}
|
||||
}
|
||||
|
||||
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, wl=WIN_LIP, wx=true, wt=WIN_THICK, wtr = WIN_TRIM, hm=false, tubepass=false, align=V_CENTER) {
|
||||
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, align=V_CENTER) {
|
||||
joiner_off = ps/2 + wt - jb/sqrt(2);
|
||||
jzoff = l/2-jw/2;
|
||||
psoff = ps/2 - wl - wt;
|
||||
@@ -118,10 +118,15 @@ module box_edge(ps=PROFILE_SIZE, l=10, orient=ORIENT_Z, jh = JOINER_H,jw = JOINE
|
||||
profile(flx=flx, fly=true, wx=wx, wy=true);
|
||||
if (jup) up(jzoff)back(joiner_off)right(joiner_off)zrot(45)boxjoiner_clear(orient=ORIENT_Y_90, align=V_CENTER);
|
||||
if (jdown) down(jzoff)back(joiner_off)right(joiner_off)zrot(45)boxjoiner_clear(orient=ORIENT_Y_90, align=V_CENTER);
|
||||
if (tubepass) zspread(l=l/2) zrot(-45)back(face_off*sqrt(2)-.01)pc4M10_clear(orient=ORIENT_Y,align=V_BACK);
|
||||
if (tubepass) zspread(l=l/2, n=tn) zrot(-45)back(face_off*sqrt(2)-.01)pc4M10_clear(orient=ORIENT_Y,align=V_BACK);
|
||||
if (hm) right(face_off)back(face_off)zrot(45)hinge_mount();
|
||||
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);
|
||||
}
|
||||
if (tubepass) zspread(l=l/2) right(0)zrot(-45)back(face_off*sqrt(2))pc4M10(orient=ORIENT_Y,align=V_BACK);
|
||||
if (tubepass) zspread(l=l/2, n=tn) 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);
|
||||
}
|
||||
@@ -151,7 +156,7 @@ module beam_joiner(jw=JOINER_W, jh=JOINER_H, fl=false) {
|
||||
back(jw/2)zrot(180)boxjoiner(h=jh, w=jw,l=5,align=FRONT, orient=ORIENT_X);
|
||||
}
|
||||
if (fl)
|
||||
left(jh/2)down(3)yrot(45)cuboid([4,2*jh,4]);
|
||||
left(jh/2)down(3)yrot(45)cuboid([jw,2*jh,4]);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -205,11 +210,11 @@ if (PART == "full_box") {
|
||||
echo(str("Edge Len Y: ", ly, " (1 x ", ly, ")"));
|
||||
echo(str("Edge Len Z: ", lz, " (1 x ", lz, ")"));
|
||||
up(lz/2+ps) {
|
||||
// Bottom Corners:
|
||||
right(lx/2) fwd(ps+ly/2)box_corner(orient=ORIENT_ZNEG_270, align=V_RIGHT);
|
||||
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);
|
||||
// Top Corners:
|
||||
right(lx/2) fwd(ps+ly/2) box_corner(orient=ORIENT_ZNEG_270, zfl=false, align=V_RIGHT);
|
||||
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);
|
||||
}
|
||||
up(lz/2+coff) { // Top Edges
|
||||
fwd(coff + ly/2) xspread(n=3, lx/3) box_edge(l=lx/3, hm=true, jup=true, jdown=true, flx=true, wx=false, orient=ORIENT_XNEG_180);
|
||||
@@ -248,8 +253,9 @@ if (PART == "full_box") {
|
||||
|
||||
xspread(n=6, l=70*6) %cyl(d=200, l=70, orient=ORIENT_X);
|
||||
}
|
||||
if (PART == "beamjoiner") beam_joiner(fl=false);
|
||||
include <inserts/inserts.scad>
|
||||
if (PART == "edge") box_edge(l=BOX_Y-2*PROFILE_SIZE, jup=true, jdown=true);
|
||||
if (PART == "beamjoiner") beam_joiner(fl=true);
|
||||
if (PART == "edge_side_foot") box_edge(l=BOX_Y-2*PROFILE_SIZE, flx=false, wx=true, jup=true, jdown=true);
|
||||
|
||||
if (PART == "rbfoot") rb_foot();
|
||||
|
||||
if (PART == "edge_test") box_edge(l=35, tubepass=true, jup=true, jdown=true, tn=1, flx=true, wx = false, orient=ORIENT_Y);
|
||||
|
||||
Reference in New Issue
Block a user