From 53b242440fba9cf797b7951f50d1add1f368ba3f Mon Sep 17 00:00:00 2001 From: Edward Kisiel Date: Mon, 14 Apr 2025 20:49:57 -0400 Subject: [PATCH] hd cableholder_spacer work, top cover adjustments, other changes --- lib/cable_holder.scad | 16 ++++++++++------ mod/case_bottom.scad | 6 +++--- mod/case_side.scad | 2 +- mod/case_top.scad | 15 +++++++++++++-- sbc_case_builder.scad | 16 ++++++++++++---- 5 files changed, 39 insertions(+), 16 deletions(-) diff --git a/lib/cable_holder.scad b/lib/cable_holder.scad index a2361ec..8ca9597 100644 --- a/lib/cable_holder.scad +++ b/lib/cable_holder.scad @@ -28,16 +28,20 @@ */ -module cableholder_spacer(size = [9.4,20,6]) { +module cableholder_spacer(length) { -// size = [9.4,16,6]; + size = [9.4,16,6]; + adj = .01; $fn = 90; translate([0,size[2]/2,-5]) rotate([90,0,0]) difference() { - translate([size[0]/2,size[0]/2,0]) rotate([0,0,90]) slot(size[0],size[1],size[2]); - #translate([-1,5,3]) rotate([0,90,0]) cylinder(d=3.2, h=12); - translate([-1,7.5,-1]) cube([2,20,9]); - translate([5,9.5,-1]) rotate([0,0,90]) slot(4.5,13,9); + union() { + translate([size[0]/2,size[0]/2,0]) rotate([0,0,90]) long_slot(size[0],size[1],size[2]); + translate([-length,5,3]) rotate([0,90,0]) cylinder(d=6, h=length+1); + } + #translate([-length-adj,5,3]) rotate([0,90,0]) cylinder(d=3.2, h=length+size[0]+adj); + translate([-1,8,-1]) cube([2,20,9]); + translate([5,9.5,-1]) rotate([0,0,90]) long_slot(4.5,11,9); translate([3,20,-1]) rotate([0,0,45]) cube([2,6,9]); } } diff --git a/mod/case_bottom.scad b/mod/case_bottom.scad index 6c8f04f..44f940e 100644 --- a/mod/case_bottom.scad +++ b/mod/case_bottom.scad @@ -512,13 +512,13 @@ echo(pcb_depth+case_offset_y-10); // bottom cover pattern if(bottom_cover_pattern != "solid") { if(bottom_cover_pattern == "hex_5mm") { - translate([1,0,-floorthick]) vent_hex((width)/3.75,(depth)/6,floorthick+4,5,1.5,"horizontal"); + translate([1,0,-floorthick]) vent_hex(width/3.75,depth/6,floorthick+4,5,1.5,"horizontal"); } if(bottom_cover_pattern == "hex_8mm") { - translate([1,2,-floorthick]) vent_hex((width)/5.5,(depth)/9.5,floorthick+4,8,1.5,"horizontal"); + translate([1,2,-floorthick]) vent_hex(width/5.5,depth/9.5,floorthick+4,8,1.5,"horizontal"); } if(bottom_cover_pattern == "linear_vertical") { - translate([0,-gap,-floorthick]) vent(wallthick,depth-2*wallthick-gap,floorthick+4,1,1,(width-2*wallthick-gap)/4,"horizontal"); + #translate([0,-gap,-floorthick]) vent(wallthick,depth-2*wallthick-gap,floorthick+4,1,1,(width-2*wallthick-gap)/4,"horizontal"); } if(bottom_cover_pattern == "linear_horizontal") { translate([-gap,-gap,-floorthick]) vent(width-2*wallthick-gap,wallthick,floorthick+4,1,(depth-2*wallthick-gap)/3,1,"horizontal"); diff --git a/mod/case_side.scad b/mod/case_side.scad index dd608f4..68a1fc2 100644 --- a/mod/case_side.scad +++ b/mod/case_side.scad @@ -268,7 +268,7 @@ module case_side(case_design, side) { // hd holes for bays for( i=[0:1:hd_bays-1]) { - translate([-gap,-(3*wallthick)-gap+hd_y_position,hd_z_position+(hd_space+27.1)*i]) + translate([-gap+adj,-(3*wallthick)-gap+hd_y_position,hd_z_position+(hd_space+27.1)*i]) rotate([0,0,0]) hd_holes(3.5, "portrait", "both", sidethick+2); } diff --git a/mod/case_top.scad b/mod/case_top.scad index ff3eed5..25849de 100644 --- a/mod/case_top.scad +++ b/mod/case_top.scad @@ -460,10 +460,21 @@ module case_top(case_design) { // top cover pattern if(top_cover_pattern != "solid") { if(top_cover_pattern == "hex_5mm") { - translate([1,0,case_z-(2*floorthick)]) vent_hex((width)/3.75,(depth)/6,floorthick+4,5,1.5,"horizontal"); + if(case_design == "panel_nas") { + translate([6,5,case_z-(2*floorthick)]) vent_hex((width-10)/3.75,(depth-10)/6,floorthick+4,5,1.5,"horizontal"); + } + else { + translate([1,0,case_z-(2*floorthick)]) vent_hex(width/3.75,depth/6,floorthick+4,5,1.5,"horizontal"); + } } if(top_cover_pattern == "hex_8mm") { - translate([1,2,case_z-(2*floorthick)]) vent_hex((width)/5.5,(depth)/9.5,floorthick+4,8,1.5,"horizontal"); + + if(case_design == "panel_nas") { + translate([2,5,case_z-(2*floorthick)]) vent_hex(width/5.5,depth/9.5,floorthick+4,8,1.5,"horizontal"); + } + else { + translate([1,2,case_z-(2*floorthick)]) vent_hex(width/5.5,depth/9.5,floorthick+4,8,1.5,"horizontal"); + } } if(top_cover_pattern == "linear_vertical") { translate([0,-gap,case_z-(2*floorthick)]) diff --git a/sbc_case_builder.scad b/sbc_case_builder.scad index 9ce23e9..e66633f 100644 --- a/sbc_case_builder.scad +++ b/sbc_case_builder.scad @@ -670,10 +670,18 @@ if (view == "model") { sbc(sbc_model, cooling, fan_size, gpio_opening, uart_opening, false); } for( i=[0:1:hd_bays-1]) { -// translate([-gap,-(3*wallthick)-gap+hd_y_position,hd_z_position+(hd_space+27.1)*i]) -// rotate([0,0,0]) hd35("portrait", [false,0,0,"default"]); - translate([-gap,-(3*wallthick)-gap+hd_y_position+101.6,hd_z_position+(hd_space+27.1)*i]) - rotate([0,0,0]) cableholder_spacer(); + translate([-gap,-(3*wallthick)-gap+hd_y_position,hd_z_position+(hd_space+27.1)*i]) + rotate([0,0,0]) hd35("portrait", [false,0,0,"default"]); + if(pcb_width > 100) { + translate([101.6-gap+wallthick+(width-2*(sidethick+gap)-101.6)-11.4,28.5-(3*wallthick)-gap+hd_y_position+101.6,hd_z_position+6+(hd_space+27.1)*i]) + rotate([0,0,0]) cableholder_spacer((width-2*(sidethick+gap)-101.6)-9.4); + + translate([101.6-gap+wallthick+(width-2*(sidethick+gap)-101.6)-11.4,-31-(3*wallthick)-gap+hd_y_position+101.6,hd_z_position+6+(hd_space+27.1)*i]) + rotate([0,0,0]) cableholder_spacer((width-2*(sidethick+gap)-101.6)-9.4); + + translate([101.6-gap+wallthick+(width-2*(sidethick+gap)-101.6)-11.4,-73-(3*wallthick)-gap+hd_y_position+101.6,hd_z_position+6+(hd_space+27.1)*i]) + rotate([0,0,0]) cableholder_spacer((width-2*(sidethick+gap)-101.6)-9.4); + } } } if(case_design == "stacked") {