Added internal flange

This commit is contained in:
2025-12-06 12:28:45 +01:00
parent ffd9afc2b4
commit e6308f9f94

View File

@@ -9,6 +9,7 @@ screw_diameter = 3;
// Internal global variables // Internal global variables
rounded_edge_diameter = height; rounded_edge_diameter = height;
box_cut_height = 10; box_cut_height = 10;
flange_height = 3;
standoff_diameter=screw_diameter*3; standoff_diameter=screw_diameter*3;
// Screw standoff // Screw standoff
@@ -55,15 +56,16 @@ module main_body() {
// Closed Box // Closed Box
module closed_box() { module closed_box() {
// Hollow box
difference() { difference() {
union() { union() {
// Hollow box
difference() { difference() {
main_body(); main_body();
scale([0.95, 0.95, 0.95]) { scale([0.95, 0.95, 0.95]) {
main_body(); main_body();
} }
} }
// Screws standoffs near curved edges // Screws standoffs near curved edges
translate([width/2 - rounded_edge_diameter/2, -height/2 + standoff_diameter/2, 0]) { translate([width/2 - rounded_edge_diameter/2, -height/2 + standoff_diameter/2, 0]) {
standoff(); standoff();
@@ -109,13 +111,40 @@ module box() {
// Upper cap // Upper cap
module cap() { module cap() {
// TODO: Flangia interna che non interferisca con gli standoff
difference() { difference() {
closed_box(); closed_box();
translate([0, 0, - box_cut_height]) { translate([0, 0, - box_cut_height]) {
cube([width*2, height*2, depth], true); 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(); closed_box();