2025-02-03 16:45:08 -05:00
|
|
|
/* */
|
|
|
|
|
include <BOSL/constants.scad>
|
|
|
|
|
include <BOSL/shapes.scad>
|
|
|
|
|
include <BOSL/transforms.scad>
|
|
|
|
|
include <inserts/inserts.scad>
|
|
|
|
|
|
|
|
|
|
/* [Params] */
|
|
|
|
|
platfoot_x = 50.44;
|
|
|
|
|
platfoot_y = 25.42;
|
2026-05-13 00:30:39 -04:00
|
|
|
platmid_x = 40.12;
|
2025-02-03 16:45:08 -05:00
|
|
|
headpost_x = 38.08;
|
|
|
|
|
headpost_y = 38.08;
|
2026-05-13 00:30:39 -04:00
|
|
|
footcrossyz = 38.08;
|
|
|
|
|
headcross_yz = 25.00;
|
2025-02-03 16:45:08 -05:00
|
|
|
footboard_y=19;
|
|
|
|
|
footboard_z=130;
|
2026-05-13 00:30:39 -04:00
|
|
|
LegOff = 19;
|
|
|
|
|
LegGap=4;
|
2026-05-13 22:50:16 -04:00
|
|
|
headcrossgasket=13;
|
|
|
|
|
cornergasket=5;
|
2025-02-03 16:45:08 -05:00
|
|
|
|
|
|
|
|
/* [Render Options] */
|
2026-05-13 22:50:16 -04:00
|
|
|
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, head_cross_gasket, corner_gasket ]
|
2026-05-13 00:30:39 -04:00
|
|
|
model = "none"; // ["none", "corner_leg", "center_leg"]
|
|
|
|
|
plate = false;
|
|
|
|
|
mate = false;
|
2026-05-13 12:47:10 -04:00
|
|
|
render_fs=.8;
|
2025-02-03 16:45:08 -05:00
|
|
|
render_fn=0;
|
2026-05-13 12:47:10 -04:00
|
|
|
render_fa=3;
|
2025-02-03 16:45:08 -05:00
|
|
|
|
|
|
|
|
// Set Render Options
|
|
|
|
|
$fs= ($preview) ? $fs : render_fs;
|
|
|
|
|
$fn= ($preview) ? $fn : render_fn;
|
|
|
|
|
$fa= ($preview) ? $fa : render_fa;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
module platfoot(x=platfoot_x, y=platfoot_y, z=260, align=V_FRONT) {
|
|
|
|
|
cuboid([x,y,z], align=align);
|
|
|
|
|
}
|
2026-05-13 22:50:16 -04:00
|
|
|
|
2025-02-03 16:45:08 -05:00
|
|
|
module footboard(x=100, y=footboard_y, z=footboard_z, align=V_BACK+V_BOTTOM) {
|
|
|
|
|
cuboid([x,y,z], align=align);
|
|
|
|
|
}
|
2026-05-13 22:50:16 -04:00
|
|
|
|
2025-02-03 16:45:08 -05:00
|
|
|
module headpost(x=headpost_x, y=headpost_y, z=260, align=V_FRONT) {
|
|
|
|
|
cuboid([x,y,z], align=align);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
module screw_channel() {
|
2026-05-13 00:30:39 -04:00
|
|
|
//back(19.2)cyl(d=6, h=10, orient=ORIENT_Y,align=V_FRONT);
|
|
|
|
|
//back(9)cyl(d=3.5, h=100, orient=ORIENT_Y, align=V_FRONT);
|
2026-05-13 16:30:25 -04:00
|
|
|
fwd(80)rotate([-90,180,0])m4s_clear(bl=100, drop=false);
|
2025-02-03 16:45:08 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
module head_rear() {
|
2026-05-13 16:30:25 -04:00
|
|
|
blockz=headcross_yz+2*10;
|
2025-02-03 16:45:08 -05:00
|
|
|
difference() {
|
2026-05-13 16:30:25 -04:00
|
|
|
union() {
|
|
|
|
|
left(19/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);
|
|
|
|
|
fwd(10)up(blockz/2)right(40-4)rotate([90,0,-45])rotate_extrude(angle=360) left(18) circle(d=10);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//%footboard();
|
2025-02-03 16:45:08 -05:00
|
|
|
headpost(y=2*headpost_y);
|
2026-05-13 16:30:25 -04:00
|
|
|
left(44)up(blockz/2)cuboid([50, 150,25]); // crossbar
|
2025-02-03 16:45:08 -05:00
|
|
|
// Screw Holes
|
2026-05-13 00:30:39 -04:00
|
|
|
rx = 5 + headpost_x/2;
|
2026-05-13 16:30:25 -04:00
|
|
|
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();
|
2025-02-03 16:45:08 -05:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
module head_front() {
|
2026-05-13 16:30:25 -04:00
|
|
|
blockz=headcross_yz + 2*10;
|
2025-02-03 16:45:08 -05:00
|
|
|
difference() {
|
2026-05-13 16:30:25 -04:00
|
|
|
right(19/2-4)cuboid([
|
|
|
|
|
platfoot_x+16+LegOff,
|
|
|
|
|
platfoot_y+footboard_y,
|
|
|
|
|
blockz ], fillet=3, edges=EDGES_FRONT+EDGES_Y_ALL, align=V_FRONT+V_TOP);
|
2025-02-03 16:45:08 -05:00
|
|
|
back(.01)platfoot();
|
|
|
|
|
// Screw Holes
|
2026-05-13 16:30:25 -04:00
|
|
|
rx= platfoot_y + (16+LegOff)/2;
|
2026-05-13 00:30:39 -04:00
|
|
|
bz = -40;
|
|
|
|
|
bl = 58 - bz;
|
2026-05-13 16:30:25 -04:00
|
|
|
up(blockz/2)zspread(n=3, l=blockz-10)
|
|
|
|
|
right(rx) rotate([-90,0,0]) rotate([0,0,180]) m4s_clear(bl=bl, bz=bz, drop=true, sh=0);
|
|
|
|
|
left(31)up(blockz-5) rotate([-90,0,0]) rotate([0,0,180]) m4s_clear(bl=bl, bz=bz, drop=true, sh=0);
|
|
|
|
|
left(31)up(5) rotate([-90,0,0]) rotate([0,0,180]) m4s_clear(bl=bl, bz=bz, drop=true, sh=0);
|
2025-02-03 16:45:08 -05:00
|
|
|
}
|
|
|
|
|
}
|
2026-05-13 00:30:39 -04:00
|
|
|
|
2026-05-13 22:50:16 -04:00
|
|
|
module corner_gasket(yd=cornergasket) {
|
|
|
|
|
blockz=headcross_yz+2*10;
|
|
|
|
|
difference() {
|
|
|
|
|
left(19/2+4) cuboid([
|
|
|
|
|
platfoot_x+16+LegOff,
|
|
|
|
|
5,
|
|
|
|
|
blockz], fillet=2
|
|
|
|
|
);
|
|
|
|
|
rx = 5 + headpost_x/2;
|
|
|
|
|
right(rx)zspread(n=3, l=blockz-10) screw_channel();
|
|
|
|
|
left(50)zspread(n=2, l=blockz-10) screw_channel();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-13 12:46:10 -04:00
|
|
|
module foot_front() {
|
|
|
|
|
blockz= footcrossyz + 2*10; // 95;
|
|
|
|
|
difference() {
|
|
|
|
|
right(19/2-4)cuboid([platfoot_x+16+LegOff,platfoot_y+footboard_y,blockz], fillet=3, edges=EDGES_FRONT+EDGES_Y_ALL, align=V_FRONT+V_TOP);
|
|
|
|
|
back(.01)platfoot();
|
|
|
|
|
// Screw Holes
|
|
|
|
|
rx= 5 + headpost_x/2;
|
|
|
|
|
bz = -40;
|
|
|
|
|
bl = 58 - bz;
|
|
|
|
|
up(blockz/2)zspread(n=3, l=blockz-10)
|
|
|
|
|
right(rx+LegOff) rotate([-90,0,0]) rotate([0,0,180]) m4s_clear(bl=bl, bz=bz, drop=true, sh=0);
|
|
|
|
|
up(blockz/2)left(30) zspread(n=2, l=blockz-10) rotate([-90,0,0]) rotate([0,0,180]) m4s_clear(bl=bl, bz=bz, drop=true, sh=0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
module foot_rear() {
|
|
|
|
|
z = footcrossyz + 2*10;
|
|
|
|
|
difference() {
|
|
|
|
|
union() {
|
|
|
|
|
left(19/2+4)back(footboard_y) cuboid([platfoot_x+16+19,headpost_y+footboard_y, z], fillet=3, edges=EDGES_BACK+EDGES_Y_ALL, align=V_FRONT+V_TOP);
|
|
|
|
|
fwd(10)up(z/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(z/2)cuboid([50, 150, footcrossyz]); // crossbar
|
|
|
|
|
// Screw Holes
|
2026-05-13 22:50:16 -04:00
|
|
|
//rx = 5 + headpost_x/2;
|
|
|
|
|
rx= platfoot_y + (16+LegOff)/2;
|
2026-05-13 12:46:10 -04:00
|
|
|
right(rx)up(z-5) screw_channel();
|
|
|
|
|
right(rx)up(z/2) screw_channel();
|
|
|
|
|
right(rx)up(5) screw_channel();
|
|
|
|
|
left(50)up(z-5) screw_channel();
|
|
|
|
|
left(50)up(5) screw_channel();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-13 22:50:16 -04:00
|
|
|
module head_cross_gasket(y=headcrossgasket) {
|
|
|
|
|
difference() {
|
|
|
|
|
cuboid([platmid_x+20, y, 42], fillet=3,align=V_BACK);
|
|
|
|
|
xspread(n=2, l=platmid_x+10) zspread(n=2, l=33) fwd(1) rotate([90,0,0]) m4s_clear(bl=66, bz=-34, drop=false, sh=0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-05-13 00:30:39 -04:00
|
|
|
module head_cross_rear() {
|
|
|
|
|
difference() {
|
2026-05-13 00:56:22 -04:00
|
|
|
cuboid([platmid_x+20, 25+10, 42], fillet=3,align=V_BACK);
|
2026-05-13 00:30:39 -04:00
|
|
|
back(50/2)cuboid([platmid_x, 50 , 70], align=V_FRONT);
|
2026-05-13 16:30:25 -04:00
|
|
|
xspread(n=2, l=platmid_x+10) zspread(n=2, l=33) rotate([90,0,0]) m4s_clear(bl=66, bz=-34, drop=true, sh=0);
|
2026-05-13 00:30:39 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
module head_cross_front() {
|
|
|
|
|
difference() {
|
2026-05-13 00:56:22 -04:00
|
|
|
cuboid([platmid_x+20, 25+10, 42], fillet=3, align=V_FRONT);
|
2026-05-13 00:30:39 -04:00
|
|
|
back(25)cuboid([71, 50 , 25], align=V_FRONT);
|
2026-05-13 00:56:22 -04:00
|
|
|
xspread(n=2, l=platmid_x+10) zspread(n=2, l=33) rotate([90,0,0]) m4s_clear(bl=65, bz=-33, drop=false, sh=.20);
|
2026-05-13 00:30:39 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
module foot_cross_front() {
|
|
|
|
|
z = footcrossyz + 2*10;
|
|
|
|
|
difference() {
|
|
|
|
|
cuboid([platmid_x+20, footcrossyz+10, z], fillet=3, align=V_FRONT);
|
|
|
|
|
fwd(footcrossyz)cuboid([71, 50 , footcrossyz], align=V_BACK);
|
|
|
|
|
back(0)xspread(n=2, l=platmid_x+10) zspread(n=2, l=z-10) rotate([90,0,0]) rotate([0,0,0]) m4s_clear(bl=65, bz=-20, drop=false, sh=.20);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
module foot_cross_rear() {
|
|
|
|
|
z = footcrossyz + 2*10;
|
|
|
|
|
difference() {
|
|
|
|
|
cuboid([platmid_x+20, 25+10, z], fillet=3,align=V_BACK);
|
|
|
|
|
back(50/2)cuboid([platmid_x, 50 , 70], align=V_FRONT);
|
|
|
|
|
back(0)xspread(n=2, l=platmid_x+10) zspread(n=2, l=z-10) rotate([90,0,0]) m4s_clear(bl=67, bz=-22, drop=false, sh=0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
module head_cross_bar(l=100, align=V_FRONT) {
|
|
|
|
|
cuboid([l,headcross_yz, headcross_yz], align=align);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
module head_plat_mid(l=100, align=V_BACK) {
|
|
|
|
|
cuboid([platmid_x, platfoot_y, l], align=align);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (part == "head_cross_front") {
|
|
|
|
|
rot = (plate) ? 90 : 0;
|
2026-05-13 16:30:25 -04:00
|
|
|
zt = plate ? headcross_yz + 10 : 0;
|
|
|
|
|
up(zt) rotate([rot,0,0]) {
|
|
|
|
|
head_cross_front();
|
|
|
|
|
if (mate) { %head_cross_rear(); }
|
|
|
|
|
}
|
2026-05-13 00:30:39 -04:00
|
|
|
} else if (part == "foot_cross_front") {
|
|
|
|
|
rot = (plate) ? 90 : 0;
|
2026-05-13 16:30:25 -04:00
|
|
|
zt = plate ? footcrossyz +10 : 0;
|
|
|
|
|
up(zt) rotate([rot,0,0]) {
|
|
|
|
|
foot_cross_front();
|
|
|
|
|
if (mate) { %foot_cross_rear(); }
|
|
|
|
|
}
|
2026-05-13 00:30:39 -04:00
|
|
|
} else if (part == "foot_cross_rear") {
|
|
|
|
|
rot = (plate) ? -90 : 0;
|
2026-05-13 16:30:25 -04:00
|
|
|
zt = plate ? platfoot_y+10 : 0;
|
|
|
|
|
up(zt) rotate([rot,0,0]) {
|
|
|
|
|
foot_cross_rear();
|
|
|
|
|
if (mate) { %foot_cross_front(); }
|
|
|
|
|
}
|
|
|
|
|
} else if (part == "head_cross_rear") {
|
|
|
|
|
rot = (plate) ? 0 : 0;
|
|
|
|
|
zt = plate ? headcross_yz/2 + 10 : 0;
|
|
|
|
|
up(zt) rotate([rot,0,0]) {
|
|
|
|
|
head_cross_rear();
|
|
|
|
|
if (mate) { %head_cross_front(); }
|
|
|
|
|
}
|
2026-05-13 00:30:39 -04:00
|
|
|
} else if (part == "head_corner_front") {
|
|
|
|
|
tx = (plate) ? 0 : -19;
|
|
|
|
|
ty = (plate) ? 0 : -headpost_y-4;
|
|
|
|
|
translate([tx, ty, 0])
|
|
|
|
|
head_front();
|
2026-05-13 16:30:25 -04:00
|
|
|
if (mate) right(19)back(38)%head_rear();
|
2026-05-13 00:30:39 -04:00
|
|
|
} else if (part == "head_corner_rear") {
|
|
|
|
|
rot = plate ? -90 : 0;
|
2026-05-13 16:30:25 -04:00
|
|
|
upoff = plate ? footboard_y : 0;
|
|
|
|
|
up(upoff) xrot(rot) {
|
|
|
|
|
head_rear();
|
|
|
|
|
if (mate) fwd(38) left(19)%head_front();
|
|
|
|
|
}
|
2026-05-13 12:46:10 -04:00
|
|
|
} else if (part == "foot_corner_front") {
|
2026-05-13 16:30:25 -04:00
|
|
|
rot = plate ? 0 : 0;
|
2026-05-13 12:46:10 -04:00
|
|
|
xrot(rot)
|
|
|
|
|
foot_front();
|
|
|
|
|
} else if (part == "foot_corner_rear") {
|
|
|
|
|
rot = plate ? -90 : 0;
|
2026-05-13 16:30:25 -04:00
|
|
|
zt = plate ? footboard_y : 0;
|
|
|
|
|
up(zt) xrot(rot) {
|
|
|
|
|
foot_rear();
|
|
|
|
|
if (mate) { fwd(headpost_x) left(19) %foot_front(); }
|
|
|
|
|
}
|
2026-05-13 00:30:39 -04:00
|
|
|
} else if (part == "both") {
|
|
|
|
|
fwd(platfoot_y+LegGap+13) left(LegOff)head_front();
|
|
|
|
|
head_rear();
|
2026-05-13 22:50:16 -04:00
|
|
|
} else if (part == "head_cross_gasket") {
|
|
|
|
|
rot = plate ? 90 : 0;
|
|
|
|
|
xrot(rot)
|
|
|
|
|
head_cross_gasket();
|
|
|
|
|
} else if (part == "corner_gasket") {
|
|
|
|
|
blockz=headcross_yz + 2*10;
|
|
|
|
|
rot = plate ? 90 : 0;
|
|
|
|
|
xrot(rot) {
|
|
|
|
|
corner_gasket();
|
|
|
|
|
if (mate) { down(blockz/2)fwd(headpost_x) left(19) %head_front(); }
|
|
|
|
|
}
|
2026-05-13 00:30:39 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (model == "corner_leg") {
|
|
|
|
|
%footboard();
|
|
|
|
|
%headpost();
|
|
|
|
|
%left(LegOff)fwd(headpost_y+LegGap)platfoot();
|
|
|
|
|
} else if (model == "center_leg") {
|
|
|
|
|
%head_cross_bar();
|
|
|
|
|
%head_plat_mid();
|
|
|
|
|
}
|
|
|
|
|
//left(19)fwd(headpost_y+4)
|
|
|
|
|
//head_front();
|
2025-02-03 16:45:08 -05:00
|
|
|
//head_rear();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-05-13 00:30:39 -04:00
|
|
|
//left(19)fwd(headpost_y+4)head_front();
|
|
|
|
|
//back(2) rotate([-90,0,0])
|
|
|
|
|
//back(20)head_rear();
|
|
|
|
|
//%platfoot();
|
|
|
|
|
//%cuboid([150, 25,25], align=V_BACK); // crossbar
|
|
|
|
|
|