Fixed bug closing holes in cap

This commit is contained in:
2026-01-04 23:57:40 +01:00
parent 540d2c96b1
commit be249d2e14

View File

@@ -115,33 +115,34 @@ 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]) {
union() {
// Lip support
translate([0, 0, box_cut_height + 5]) {
intersection() {
difference() {
scale_ratio = 1 - i * 0.001;
scale([scale_ratio, scale_ratio, scale_ratio]) {
main_body();
}
main_body();
scale([0.95, 0.95, 0.95]) main_body();
}
cube([width*2, height*2, 0.5], true);
cube([width*2, height*2, box_cut_height], true);
}
}
// Chamfered 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();
}
cube([width*2, height*2, 0.5], true);
}
}
}
}