Added Handle
This commit is contained in:
39
box.scad
39
box.scad
@@ -10,7 +10,7 @@ include <fdmouse.scad>
|
||||
|
||||
/* [Part] */
|
||||
|
||||
PART = ""; // [ all_corners, corner_top_rear, corner_top_front_l, corner_top_front_r, 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 ]
|
||||
PART = ""; // [ all_corners, corner_top_rear, corner_top_front_l, corner_top_front_r, 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_front, 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, handle ]
|
||||
|
||||
/* [Profile Dimensions] */
|
||||
|
||||
@@ -144,12 +144,13 @@ module hinge_mount(bz=WIN_THICK, inv=false, bl=10) {
|
||||
}
|
||||
}
|
||||
|
||||
module hinge(theta=90, show=true) {
|
||||
module hinge(theta=90, mx=1.8, my=5, mz=20, show=true) {
|
||||
x=7;
|
||||
py=20;
|
||||
d = .4 / sqrt(2);
|
||||
difference() {
|
||||
left(x/2)cuboid([x,20+2*d,50], fillet=2, edges=EDGES_X_ALL);
|
||||
zspread(n=2, l=(-1+py+mz/2)) back(5)left(x-.4-mx/2) cuboid([mx, my, mz+2]);
|
||||
hinge_mount($die=true);
|
||||
}
|
||||
left(5+d)back(py/2 + 5+2*d)zrot(theta){
|
||||
@@ -158,19 +159,21 @@ module hinge(theta=90, show=true) {
|
||||
right(5.3)fwd(9/4)cuboid([x,2*d+1+9/2,6], align=V_LEFT, chamfer=1, edges=EDGES_Y_RT+EDGE_BK_RT);
|
||||
}
|
||||
cyl(r=2, h=42);
|
||||
zspread(n=3, l=25 ) difference() {
|
||||
zspread(n=3, l=25 ) {difference() {
|
||||
union() {
|
||||
cyl(d=9, h=6, chamfer=.8);
|
||||
right(5+d)back(9/4)cuboid([x,2+9/2,6], align=V_LEFT, chamfer=1, edges=EDGES_Y_RT+EDGE_FR_RT);
|
||||
}
|
||||
cyl(r=2.2, h=6.2);
|
||||
}
|
||||
}
|
||||
difference() {
|
||||
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) {
|
||||
hinge_mount(bl=9, $die=true);
|
||||
if (show) %hinge_mount(bl=9,$die=false);
|
||||
}
|
||||
zspread(n=2, l=(-1+py+mz/2)) back(10)right(.4-mx/2) cuboid([mx, my, mz+2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -196,6 +199,20 @@ module rearMount(md=141.333, theta=90, show=true) {
|
||||
}
|
||||
}
|
||||
|
||||
module handle(d=15, l=110) {
|
||||
w=1.2;
|
||||
up((d+10)/2) {
|
||||
cyl(d=d, h=l+1, orient=ORIENT_X);
|
||||
xspread(n=2, l=l) difference() {
|
||||
hull() {
|
||||
cyl(d=d+10, h=8, orient=ORIENT_X, fillet=1);
|
||||
down((d+10-6)/2)fwd(10)cyl(d=6, h=8, orient=ORIENT_X, fillet=1);
|
||||
}
|
||||
down((d+10)/2)xrot(180)m3s_clear(bl=12, bz=-12);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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, my=false, align=V_CENTER) {
|
||||
jzoff = l/2-jw/2;
|
||||
inner_off = ps/2 + wt;
|
||||
@@ -439,6 +456,15 @@ if (PART == "edge_side_top") {
|
||||
}
|
||||
up((wt+wl)/sqrt(2))yrot(45)box_edge(l=ly, rbfoot=false, flx=false, wx=true, jup=true, jdown=true, cm=false, orient=ORIENT_Y);
|
||||
}
|
||||
if (PART == "edge_side_front") {
|
||||
if (Print_Ears) {
|
||||
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, iy=false, my=true, jup=true, jdown=true, cm=false, orient=ORIENT_Y);
|
||||
}
|
||||
if (PART == "edge_top_front") {
|
||||
//r = $t *90 - 45;
|
||||
r=-45;
|
||||
@@ -531,13 +557,18 @@ if (PART == "edge_test")
|
||||
|
||||
if (PART == "hinge") {
|
||||
r = $t *90;
|
||||
hinge(theta=r);
|
||||
// r = 135; // max
|
||||
yrot(90)hinge(theta=r);
|
||||
}
|
||||
|
||||
if (PART == "rear_mount") {
|
||||
up(7) yrot(-90) rearMount();
|
||||
}
|
||||
|
||||
if (PART == "handle") {
|
||||
handle();
|
||||
}
|
||||
|
||||
if (PART == "new_joiner") {
|
||||
new_joiner();
|
||||
//#new_joiner_clear();
|
||||
|
||||
Reference in New Issue
Block a user