From be249d2e14396967409114e5a5ef77543f862c7d Mon Sep 17 00:00:00 2001 From: Daniele Verducci Date: Sun, 4 Jan 2026 23:57:40 +0100 Subject: [PATCH] Fixed bug closing holes in cap --- enclosure/box.scad | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/enclosure/box.scad b/enclosure/box.scad index ba952f6..2b66438 100644 --- a/enclosure/box.scad +++ b/enclosure/box.scad @@ -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); + } } } }