Cap lip support

This commit is contained in:
2026-01-04 00:44:35 +01:00
parent a84ff8bb50
commit ba77c39d83
2 changed files with 54 additions and 41 deletions

View File

@@ -114,6 +114,57 @@ module box() {
}
}
// Upper cap lip
module lip() {
// Lip support
translate([0, 0, box_cut_height + 5]) {
intersection() {
difference() {
main_body();
scale([0.95, 0.95, 0.95]) main_body();
}
cube([width*2, height*2, box_cut_height], true);
}
}
// Chamfered lip
difference() {
for (i = [0:10]) {
translate([0, 0, box_cut_height - i * 0.5]) {
intersection() {
difference() {
scale_ratio = 1 - i * 0.001;
scale([scale_ratio, scale_ratio, scale_ratio]) {
main_body();
}
scale([0.95, 0.95, 0.95]) main_body();
}
cube([width*2, height*2, 0.5], true);
}
}
}
// Leave space for screws standoffs near curved edges
translate([width/2 - rounded_edge_diameter/2, -height/2, 0]) {
scale([1.2, 1.2, 1]) standoff();
}
translate([-width/2 + rounded_edge_diameter/2, height/2, 0]) {
scale([1.2, 1.2, 1]) standoff();
}
// Leave space for screws standoff near sharp edges
translate([-width/2 + standoff_diameter/2, -height/2, 0]) {
scale([1.2, 1.2, 1]) standoff();
}
translate([width/2 - standoff_diameter/2, height/2, 0]) {
scale([1.2, 1.2, 1]) standoff();
}
}
}
// Upper cap
module cap() {
difference() {
@@ -122,40 +173,8 @@ module cap() {
cube([width*2, height*2, depth], true);
}
}
// Lip
for (i = [0:10]) {
translate([0, 0, box_cut_height - i * 0.5]) {
intersection() {
difference() {
scale_ratio = 1 - i * 0.001;
scale([scale_ratio, scale_ratio, scale_ratio]) {
main_body();
}
scale([0.95, 0.95, 0.95]) main_body();
/*
// Clear screws standoffs near curved edges
translate([width/2 - rounded_edge_diameter/2, -height/2, 0]) {
standoff();
}
translate([-width/2 + rounded_edge_diameter/2, height/2, 0]) {
standoff();
}
// Clear screws standoff near sharp edges
translate([-width/2, -height/2, 0]) {
standoff();
}
translate([width/2, height/2, 0]) {
standoff();
}
*/
}
cube([width*2, height*2, 0.5], true);
}
}
}
lip();
}
//closed_box();
cap();
translate([0, -60, 0]) box();
translate([0, 60, 0]) rotate([180, 0, 0]) cap();