Files
3d-models/replacement-parts/elijah-black-shelf-supports.scad
2025-12-26 13:24:46 -06:00

83 lines
2.1 KiB
OpenSCAD

// all measurements in mm
$fn=128;
// Version History
// 1 - id=25.6, od1=31, od2=29, h=44, tabHeight=13, tabClearance=0.4
// 2 - id=27, od1=31, od2=29, h=44, tabHeight=13, tabClearance=0.1
// 3 - id=27, od1=31, od2=29, h=44, tabHeight=13, tabClearance=0
// 4 - id=26, od1=31, od2=29, h=44, tabHeight=13, tabClearance=0
// 5 - id=26, od1=31, od2=29, h=44, tabHeight=13, tabClearance=-0.1, angle in tab
version = "5";
id = 26;
od1 = 31;
od2 = 29;
h = 44;
tabClearance = -0.1;
tabHeight = 13;
module tab() {
translate([id/2 + 0.2, 0, -6.5]) rotate([0, 0, 7]) difference() {
// tab
translate([0, -0.01, 0]) cube([1.6, 4.01, tabHeight]);
// tab chamfers
union() {
translate([0 - 0.2, 2, 0]) rotate([-75, 0, 0]) cube([2, 4, 4]);
translate([0 - 0.2, 2, tabHeight]) mirror([0, 0, 1]) rotate([-75, 0, 0]) cube([2, 4, 4]);
}
}
}
module tabCutout() {
translate([-id/2 - 3, -5, -(tabHeight + tabClearance)/2]) cube([6, 5.01, tabHeight + tabClearance]);
}
module catchRing() {
translate([0, 0, 9]) difference() {
cylinder(h=0.8, d=od2, center = true);
translate([0, 0, -0.05]) cylinder(h=1, d=id - 0.8, center = true);
}
}
module mainCylinderBody() {
difference() {
union() {
difference() {
// outer cylinder
cylinder(h=h, d1=od1, d2=od2, center = true);
// cylinder bore and top chamfer
union() {
// inner bore
translate([0, 0, -0.01]) cylinder(h=h + 0.1, d=id, center = true);
// top chamfer
translate([0, 0, h/2-0.02]) difference() {
cylinder(h=2.2, d1=od1+3, d2=od2+3, center = true);
translate([0, 0, -0.01]) cylinder(h=2.24, d1=od2+0.1, d2=id-0.2, center = true);
}
}
}
catchRing();
}
// cutout half
translate([-(od2+4)/2, 0, -h/2 - 1]) cube([od1 + 4, od1, h + 2]);
}
}
difference() {
union() {
mainCylinderBody();
tab();
}
union() {
tabCutout();
translate([0, -0.2-id/2, 4-h/2]) rotate([90, 0, 180])
linear_extrude(0.8)
text(str("v", version), size=6, halign="center", valign="center", font="Iosevka");
}
}