Refactor head corner
Centered Z
This commit is contained in:
33
bracket.scad
33
bracket.scad
@@ -23,12 +23,13 @@ ring=true;
|
||||
|
||||
/* [Render Options] */
|
||||
part=""; // [ none, head_corner_rear, head_corner_front, foot_corner_front, foot_corner_rear, head_cross_front, head_cross_rear, foot_cross_front, foot_cross_rear, foot_cross_spacer, head_cross_gasket, corner_gasket, head_corner_test ]
|
||||
model = "none"; // ["none", "corner_leg", "center_leg"]
|
||||
plate = false;
|
||||
mate = false;
|
||||
render_fs=.8;
|
||||
render_fn=0;
|
||||
render_fa=3;
|
||||
model = "none"; // ["none", "corner_leg", "center_leg"]
|
||||
plate = false;
|
||||
mate = false;
|
||||
explode = false;
|
||||
render_fs = .8;
|
||||
render_fn = 0;
|
||||
render_fa = 3;
|
||||
|
||||
// Set Render Options
|
||||
$fs= ($preview) ? $fs : render_fs;
|
||||
@@ -59,20 +60,17 @@ module head_rear(ring=ring) {
|
||||
left(LegOff/2+4)back(footboard_y) cuboid([
|
||||
platfoot_x+16+LegOff,
|
||||
headpost_y+footboard_y,
|
||||
blockz], fillet=3, edges=EDGES_BACK+EDGES_Y_ALL, align=V_FRONT+V_TOP);
|
||||
if (ring) { fwd(10)up(blockz/2)right(40-4)rotate([90,0,-45])rotate_extrude(angle=360) left(18) circle(d=10); }
|
||||
blockz], fillet=3, edges=EDGES_BACK+EDGES_Y_ALL, align=V_FRONT);
|
||||
if (ring) { fwd(10)up(0*blockz/2)right(40-4)rotate([90,0,-45])rotate_extrude(angle=360) left(18) circle(d=10); }
|
||||
|
||||
}
|
||||
//%footboard();
|
||||
headpost(y=2*headpost_y);
|
||||
left(44)up(blockz/2)cuboid([50, 150,headcross_yz]); // crossbar
|
||||
left(44)up(0*blockz/2)cuboid([50, 150,headcross_yz]); // crossbar
|
||||
// Screw Holes
|
||||
rx = 5 + headpost_x/2;
|
||||
right(rx)up(blockz-5) screw_channel();
|
||||
right(rx)up(blockz/2) screw_channel();
|
||||
right(rx)up(5) screw_channel();
|
||||
left(50)up(blockz-5) screw_channel();
|
||||
left(50)up(5) screw_channel();
|
||||
right(rx)zspread(n=3, l=blockz-10) screw_channel();
|
||||
left(50)zspread(n=2, l=blockz-10) screw_channel();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,13 +81,13 @@ module head_front() {
|
||||
platfoot_x+16+LegOff,
|
||||
platfoot_y+footboard_y,
|
||||
blockz ], fillet=3,
|
||||
edges=EDGES_FRONT+EDGES_Y_ALL, align=V_FRONT+V_TOP);
|
||||
edges=EDGES_FRONT+EDGES_Y_ALL, align=V_FRONT);
|
||||
back(.01) platfoot();
|
||||
// Screw Holes
|
||||
rx= platfoot_y + (16+LegOff)/2;
|
||||
bz = -40;
|
||||
bl = 58 - bz;
|
||||
up(blockz/2) {
|
||||
up(0*blockz/2) {
|
||||
zspread(n=3, l=blockz-10) right(rx) rotate([-90,180,0]) m4s_clear(bl=bl, bz=bz, drop=true, sh=0);
|
||||
zspread(n=2, l=blockz-10) left(50-LegOff) rotate([-90,180,0]) m4s_clear(bl=bl, bz=bz, drop=true, sh=0);
|
||||
}
|
||||
@@ -248,9 +246,10 @@ if (part == "head_cross_front") {
|
||||
} else if (part == "head_corner_rear") {
|
||||
rot = plate ? -90 : 0;
|
||||
upoff = plate ? footboard_y : 0;
|
||||
yoff = explode ? 10 : 0;
|
||||
up(upoff) xrot(rot) {
|
||||
head_rear();
|
||||
if (mate) fwd(38) left(LegOff)%head_front();
|
||||
if (mate) fwd(38+yoff) left(LegOff)%head_front();
|
||||
}
|
||||
} else if (part == "foot_corner_front") {
|
||||
rot = plate ? 0 : 0;
|
||||
|
||||
Reference in New Issue
Block a user