From 568aec9c351b1f58afb0475c2aeb7bca3ae4f241 Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Mon, 10 Aug 2026 19:42:13 +0200 Subject: [PATCH] n32: started really working on enclosure. --- avr/devices/n32/enclosure.scad | 139 ++++++++++++++++++++++----------- 1 file changed, 94 insertions(+), 45 deletions(-) diff --git a/avr/devices/n32/enclosure.scad b/avr/devices/n32/enclosure.scad index ecbd64c..879224a 100644 --- a/avr/devices/n32/enclosure.scad +++ b/avr/devices/n32/enclosure.scad @@ -2,7 +2,7 @@ $fn = 50; width = 45; length = 60; -height = 20; +height = 22; corner_radius = 2; wall_thickness = 1.5; @@ -20,15 +20,28 @@ hook_slit_height = 2.5; airslit_height = 1.75; -ridge_height = 16; +ridge_height = 14; ridge_width = 1; ridge_depth = 2.5; -netconn_width = 17; -netcomm_length = 6; -netcomm_height = 20; -netcomm_tolerance = .3; +lowridge_height = 4; +lowridge_width = 1; +lowridge_depth = 2.5; +netconn_width = 17; +netconn_length = 6; +netconn_height = 20; +netconn_tolerance = .3; + +powerconn_width = 10; +powerconn_height = 15; /* 12 */ +powerconn_length = 6; +powerconn_tolerance = .3; + +fanconn_width = 6; +fanconn_height = 5; +fanconn_length = 10; +fanconn_tolerance = 1; module posts(x, y, z, h, r){ @@ -68,63 +81,90 @@ union() { r=corner_radius); } - // lip inside box - *hull() { - posts( - x=(width/2 - corner_radius - lid_lip), - y=(length/2 - corner_radius - lid_lip), - z=(height - lid_thickness), - h=(lid_thickness + 1), - r=corner_radius); - } - // ventilation slits left 1 for(i = [(wall_thickness+post_height+3):(airslit_height*2):(height-5)]) { translate([(-width/2)-wall_thickness, (-length/4), i]) cube([10, length/5, airslit_height], center=true); } - - // ventilation slits top + + // ventilation slits left 2 for(i = [(wall_thickness+post_height+3):(airslit_height*2):(height-5)]) { - translate([0, -(length/2), i]) - cube([width/2, 10, airslit_height], center=true); + translate([(-width/2)-wall_thickness, (length/4), i]) + cube([10, length/5, airslit_height], center=true); } - + // ventilation slits right 1 for(i = [(wall_thickness+post_height+3):(airslit_height*2):(height-5)]) { translate([(width/2)-wall_thickness, (-length/4), i]) - cube([10, length/5, 1.75], center=true); + cube([10, length/5, airslit_height], center=true); } - + + // ventilation slits right 2 + for(i = [(wall_thickness+post_height+3):(airslit_height*2):(height-5)]) { + translate([(width/2)-wall_thickness, (length/4), i]) + cube([10, length/5, airslit_height], center=true); + } + + // ventilation slits top + for(i = [(wall_thickness+post_height+3):(airslit_height*2):(height-5)]) { + translate([-8, -(length/2), i]) + cube([18, 10, airslit_height], center=true); + } + + // network connector hole 1 - translate([(netconn_width-netcomm_tolerance)/2, + translate([(netconn_width-netconn_tolerance)/2, (length/2), wall_thickness+2+10]) - cube([netconn_width+netcomm_tolerance, - netcomm_length, - netcomm_height], + cube([netconn_width+netconn_tolerance, + netconn_length, + netconn_height], center=true); // network connector hole 2 - translate([-(netconn_width-netcomm_tolerance)/2, + translate([-(netconn_width-netconn_tolerance)/2, (length/2), wall_thickness+2+10]) - cube([netconn_width+netcomm_tolerance, - netcomm_length, - netcomm_height], + cube([netconn_width+netconn_tolerance, + netconn_length, + netconn_height], center=true); - // LED holes - translate([12, -16, -wall_thickness]) + // power connector hole + translate([9.75 /*(powerconn_width+powerconn_tolerance)/2*/, + -(length/2), + wall_thickness+4+(powerconn_height/2)]) + cube([powerconn_width+powerconn_tolerance, + powerconn_length, + powerconn_height+powerconn_tolerance*2], + center=true); + + + // LED hole + translate([12, -13, -wall_thickness]) cylinder(r = 5.5/2, h = 6); - translate([4.254, -16, -wall_thickness]) - cylinder(r = 5.5/2, h = 6); + // Switch hole + translate([-5.4, -13, -wall_thickness]) + cylinder(r = 4.5/2, h = 6); - translate([-3.484, -16, -wall_thickness]) - cylinder(r = 5.5/2, h = 6); + // Fan connector holes + translate([-16, -20]) + cube([fanconn_width+fanconn_tolerance*2, + fanconn_length+fanconn_tolerance*2, + fanconn_height+fanconn_tolerance*2], + center=true); + translate([-16, (-20)+(fanconn_length+fanconn_tolerance*2)]) + cube([fanconn_width+fanconn_tolerance*2, + fanconn_length+fanconn_tolerance*2, + fanconn_height+fanconn_tolerance*2], + center=true); + translate([-16, (-20)+(fanconn_length+fanconn_tolerance*2)*2]) + cube([fanconn_width+fanconn_tolerance*2, + fanconn_length+fanconn_tolerance*2, + fanconn_height+fanconn_tolerance*2], + center=true); - } // hooks upward facing side @@ -143,16 +183,25 @@ union() { translate([(width/2)-wall_thickness, 0, ridge_height/2+(height-ridge_height)]) cube([ridge_depth, ridge_width, ridge_height], center=true); - translate([-((width/2)-wall_thickness), - length/8, - ridge_height/2+(height-ridge_height)]) + translate([-((width/2)-wall_thickness), 0, ridge_height/2+(height-ridge_height)]) cube([ridge_depth, ridge_width, ridge_height], center=true); - translate([-((width/2)-wall_thickness), - -length/8, - ridge_height/2+(height-ridge_height)]) - cube([ridge_depth, ridge_width, ridge_height], center=true); + // low ridges to hold the pcb away from bottom + // right + translate([(width/2)-wall_thickness, -4, wall_thickness+lowridge_height/2]) + cube([lowridge_depth, lowridge_width, lowridge_height], center=true); + translate([(width/2)-wall_thickness, 4, wall_thickness+lowridge_height/2]) + cube([lowridge_depth, lowridge_width, lowridge_height], center=true); + translate([(width/2)-wall_thickness, (length/2)-5, wall_thickness+lowridge_height/2]) + cube([lowridge_depth, lowridge_width, lowridge_height], center=true); + translate([(width/2)-wall_thickness, (-length/2)+5, wall_thickness+lowridge_height/2]) + cube([lowridge_depth, lowridge_width, lowridge_height], center=true); + // left + translate([(-width/2)+wall_thickness, (length/2)-5, wall_thickness+lowridge_height/2]) + cube([lowridge_depth, lowridge_width, lowridge_height], center=true); + translate([(-width/2)+wall_thickness, (-length/2)+5, wall_thickness+lowridge_height/2]) + cube([lowridge_depth, lowridge_width, lowridge_height], center=true); }