From ba77c39d83b462257dde04f1519fe41c06f5f0a2 Mon Sep 17 00:00:00 2001 From: Daniele Verducci Date: Sun, 4 Jan 2026 00:44:35 +0100 Subject: [PATCH] Cap lip support --- enclosure/fabula_enclosure.scad | 89 ++++++++++++++++++++------------- enclosure/main.scad | 6 --- 2 files changed, 54 insertions(+), 41 deletions(-) delete mode 100644 enclosure/main.scad diff --git a/enclosure/fabula_enclosure.scad b/enclosure/fabula_enclosure.scad index 64fe089..4bf0392 100644 --- a/enclosure/fabula_enclosure.scad +++ b/enclosure/fabula_enclosure.scad @@ -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(); diff --git a/enclosure/main.scad b/enclosure/main.scad deleted file mode 100644 index 6bd8a78..0000000 --- a/enclosure/main.scad +++ /dev/null @@ -1,6 +0,0 @@ -use -$fn=32; - - -translate([0, -60, 0]) box(); -translate([0, 60, 0]) rotate([180, 0, 0]) cap(); \ No newline at end of file