From e6308f9f946ec1cb8c3164bf422dad688fe59c38 Mon Sep 17 00:00:00 2001 From: Daniele Verducci Date: Sat, 6 Dec 2025 12:28:45 +0100 Subject: [PATCH] Added internal flange --- enclosure/fabula_enclosure.scad | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/enclosure/fabula_enclosure.scad b/enclosure/fabula_enclosure.scad index 9274b6c..9c665d3 100644 --- a/enclosure/fabula_enclosure.scad +++ b/enclosure/fabula_enclosure.scad @@ -9,6 +9,7 @@ screw_diameter = 3; // Internal global variables rounded_edge_diameter = height; box_cut_height = 10; +flange_height = 3; standoff_diameter=screw_diameter*3; // Screw standoff @@ -55,15 +56,16 @@ module main_body() { // Closed Box module closed_box() { - // Hollow box difference() { union() { + // Hollow box difference() { main_body(); scale([0.95, 0.95, 0.95]) { main_body(); } } + // Screws standoffs near curved edges translate([width/2 - rounded_edge_diameter/2, -height/2 + standoff_diameter/2, 0]) { standoff(); @@ -109,13 +111,40 @@ module box() { // Upper cap module cap() { - // TODO: Flangia interna che non interferisca con gli standoff difference() { closed_box(); translate([0, 0, - box_cut_height]) { cube([width*2, height*2, depth], true); } } + // Lip + translate([0, 0, box_cut_height - 1]) { + intersection() { + difference() { + scale([0.95, 0.95, 0.95]) { + main_body(); + } + scale([0.92, 0.92, 0.92]) { + main_body(); + } + // Clear screws standoffs near curved edges + translate([width/2 - rounded_edge_diameter/2, -height/2 + standoff_diameter/2, 0]) { + standoff(); + } + translate([-width/2 + rounded_edge_diameter/2, height/2 - standoff_diameter/2, 0]) { + standoff(); + } + // Clear screws standoff near sharp edges + translate([-width/2 + standoff_diameter/2, -height/2 + standoff_diameter/2, 0]) { + standoff(); + } + translate([width/2 - standoff_diameter/2, height/2 - standoff_diameter/2, 0]) { + standoff(); + } + } + cube([width*2, height*2, 3], true); + } + } } closed_box();