Inset Tube connectors and added hinge mount holes
Added hinge mount holes, m3 insert. Inset tube connectors flush with face. Added Foot for Compatibility with the Repbox drybox mount
This commit is contained in:
67
box.scad
67
box.scad
@@ -8,7 +8,7 @@ include <./pc4m10.scad>
|
|||||||
|
|
||||||
/* [Part] */
|
/* [Part] */
|
||||||
|
|
||||||
PART = ""; // [corner, back_edge, all_corners, full_box, beamjoiner, profile]
|
PART = ""; // [corner, back_edge, all_corners, full_box, beamjoiner, profile, edge, rbfoot]
|
||||||
|
|
||||||
/* [Dimensions] */
|
/* [Dimensions] */
|
||||||
|
|
||||||
@@ -53,24 +53,6 @@ $fa= ($preview) ? $fa : render_fa;
|
|||||||
|
|
||||||
***/
|
***/
|
||||||
|
|
||||||
module dryboxNG(
|
|
||||||
ps = PROFILE_SIZE,
|
|
||||||
wl = WIN_LIP,
|
|
||||||
wt = WIN_THICK,
|
|
||||||
wtr = WIN_TRIM,
|
|
||||||
jh = JOINER_H,
|
|
||||||
jw = JOINER_W,
|
|
||||||
walls = [],
|
|
||||||
sides = [],
|
|
||||||
windows = EDGES_NONE
|
|
||||||
|
|
||||||
|
|
||||||
) {
|
|
||||||
cuboid([ps,ps,ps]);
|
|
||||||
}
|
|
||||||
|
|
||||||
//dryboxNG();
|
|
||||||
|
|
||||||
//profile();
|
//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) {
|
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) {
|
||||||
conv = (wx && wy && flx)
|
conv = (wx && wy && flx)
|
||||||
@@ -97,29 +79,58 @@ module profile(ps=PROFILE_SIZE, wl=WIN_LIP, wt=WIN_THICK, wtr=WIN_TRIM, fl=FLOOR
|
|||||||
polygon(points = gon, convexity=conv);
|
polygon(points = gon, convexity=conv);
|
||||||
}
|
}
|
||||||
|
|
||||||
module rb_foot() {
|
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);
|
||||||
|
|
||||||
|
fwd(bmax)up(fw-1)
|
||||||
|
yrot(90)linear_extrude(height=rl, center=true) polygon([[0,0],[0,bmax],[fw-1,bmax]]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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, tubepass=false, align=V_CENTER) {
|
module hinge_mount(bz=WIN_THICK, bl=10) {
|
||||||
|
zspread(l=40) {
|
||||||
|
zrot(-90)xrot(90)right(5) {
|
||||||
|
thread_insertM3(bl=8,bz=-5, $die=true);
|
||||||
|
%thread_insertM3(bl=8,bz=-5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
zrot(-90)xrot(90)left(5) {
|
||||||
|
thread_insertM3(bl=10,bz=-7, $die=true);
|
||||||
|
%thread_insertM3(bl=10,bz=-7);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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) {
|
||||||
joiner_off = ps/2 + wt - jb/sqrt(2);
|
joiner_off = ps/2 + wt - jb/sqrt(2);
|
||||||
jzoff = l/2-jw/2;
|
jzoff = l/2-jw/2;
|
||||||
|
psoff = ps/2 - wl - wt;
|
||||||
|
face_off = ((ps+psoff)/4);
|
||||||
orient_and_align([ps,ps,l], orient=orient, align=align, orig_orient=ORIENT_Z) left(ps/2) fwd(ps/2) {
|
orient_and_align([ps,ps,l], orient=orient, align=align, orig_orient=ORIENT_Z) left(ps/2) fwd(ps/2) {
|
||||||
difference() {
|
difference() {
|
||||||
linear_extrude(height=l, center=true)
|
linear_extrude(height=l, center=true)
|
||||||
profile(flx=flx, fly=true, wx=wx, wy=true);
|
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 (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 (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) right(6+2+wl/2)pc4M10_clear(orient=ORIENT_Y,align=V_BACK);
|
if (tubepass) zspread(l=l/2) 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 (tubepass) zspread(l=l/2) right(wtr+wt+wl/2)pc4M10(orient=ORIENT_Y,align=V_BACK);
|
if (tubepass) zspread(l=l/2) 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 (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 (jdown) down(l/2 - jw/2)back(joiner_off)right(joiner_off)zrot(45)xrot(180)boxjoiner(orient=ORIENT_Y_90, align=V_CENTER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module box_corner(ps = PROFILE_SIZE, l=0, zfl = true, zw = false, wt=WIN_THICK, align=V_CENTER, orient=ORIENT_Z) {
|
module box_corner(ps = PROFILE_SIZE, l=0, zfl = true, zw = false, wl=WIN_LIP, wt=WIN_THICK, align=V_CENTER, orient=ORIENT_Z) {
|
||||||
sz = 2*ps;
|
sz = 2*ps;
|
||||||
|
psoff = ps/2 - wl - wt;
|
||||||
|
coff = ps + psoff;
|
||||||
orient_and_align([sz,sz,sz], orient=orient, align=align) {
|
orient_and_align([sz,sz,sz], orient=orient, align=align) {
|
||||||
intersection() {
|
intersection() {
|
||||||
// Cap
|
// Cap
|
||||||
@@ -170,6 +181,7 @@ module boxjoiner_clear(inset=5, slop=.01, jh=JOINER_H, jw=JOINER_W, align=V_FRON
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (PART == "profile") {
|
if (PART == "profile") {
|
||||||
profile(flx=true);
|
profile(flx=true);
|
||||||
}
|
}
|
||||||
@@ -200,7 +212,7 @@ if (PART == "full_box") {
|
|||||||
left(ps+lx/2) fwd(ps+ly/2)box_corner(orient=ORIENT_ZNEG);
|
left(ps+lx/2) fwd(ps+ly/2)box_corner(orient=ORIENT_ZNEG);
|
||||||
}
|
}
|
||||||
up(lz/2+coff) { // Top Edges
|
up(lz/2+coff) { // Top Edges
|
||||||
fwd(coff + ly/2) box_edge(l=lx, jup=true, jdown=true, flx=true, wx=false, orient=ORIENT_XNEG_180);
|
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);
|
||||||
back(coff + ly/2) {
|
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);
|
xspread(n=3, lx/3)box_edge(l=lx/3, jup=true, jdown=true, flx=true, wx=false, tubepass=false, orient=ORIENT_X_180);
|
||||||
}
|
}
|
||||||
@@ -233,6 +245,11 @@ if (PART == "full_box") {
|
|||||||
left(ps+lx/2) back(ps+ly/2)box_corner(orient=ORIENT_Z_180);
|
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);
|
left(ps+lx/2) fwd(ps+ly/2)box_corner(orient=ORIENT_Z_270);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
xspread(n=6, l=70*6) %cyl(d=200, l=70, orient=ORIENT_X);
|
||||||
}
|
}
|
||||||
if (PART == "beamjoiner") beam_joiner(fl=false);
|
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 == "rbfoot") rb_foot();
|
||||||
|
|||||||
@@ -40,11 +40,11 @@ module pc4M10_inner(back_h=13, back_d = 12, orient=ORIENT_Z, align=V_CENTER) {
|
|||||||
down(5.80)cyl(d1=back_d,d2=SEAT_HOLE,h=back_h+.02, align=V_BOTTOM);
|
down(5.80)cyl(d1=back_d,d2=SEAT_HOLE,h=back_h+.02, align=V_BOTTOM);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
module pc4M10(cd = 12, h=18.8, orient=ORIENT_Z, align=V_CENTER) {
|
module pc4M10(cd = 12, h=14, orient=ORIENT_Z, align=V_CENTER) {
|
||||||
orient_and_align([12,12,18.8],orient=orient, align=align, orig_orient=ORIENT_ZNEG)
|
orient_and_align([12,12,h],orient=orient, align=align, orig_orient=ORIENT_ZNEG)
|
||||||
down(h/2)difference() {
|
down(h/2)difference() {
|
||||||
up(.01)cyl(d=cd,h=h, align=V_TOP);
|
up(.01)cyl(d=cd,h=h, align=V_TOP);
|
||||||
pc4M10_inner(align=V_TOP);
|
down(4.8)pc4M10_inner(align=V_TOP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user