diff --git a/10InchRackGenerator.scad b/10InchRackGenerator.scad index c84297a..56acdef 100644 --- a/10InchRackGenerator.scad +++ b/10InchRackGenerator.scad @@ -6,6 +6,8 @@ switch_width = 135.0; switch_depth = 135.0; switch_height = 28.30; +case_thickness = 6; // Thickness of case walls +wire_diameter = 7; // Diameter of power wire holes front_wire_holes = false; // [true:Show front wire holes, false:Hide front wire holes] air_holes = true; // [true:Show air holes, false:Hide air holes] @@ -20,7 +22,7 @@ height = 44.45 * rack_height; module switch_mount(switch_width, switch_height, switch_depth) { //6 inch racks (mounts=152.4mm; rails=15.875mm; usable space=120.65mm) //10 inch racks (mounts=254.0mm; rails=15.875mm; usable space=221.5mm) - chassis_width = min(switch_width + 12, (rack_width == 152.4) ? 120.65 : 221.5); + chassis_width = min(switch_width + (2 * case_thickness), (rack_width == 152.4) ? 120.65 : 221.5); front_thickness = 3.0; corner_radius = 4.0; chassis_edge_radius = 2.0; @@ -75,7 +77,7 @@ module switch_mount(switch_width, switch_height, switch_depth) { // Create the main body as a separate module module main_body() { side_margin = (rack_width - chassis_width) / 2; - chassis_height = switch_height + 12; + chassis_height = switch_height + (2 * case_thickness); union() { // Front panel linear_extrude(height = front_thickness) { @@ -156,18 +158,17 @@ module switch_mount(switch_width, switch_height, switch_depth) { } } - // Power wire cutouts: 5mm diameter holes at top and bottom rack hole positions + // Power wire cutouts: configurable diameter holes at top and bottom rack hole positions module power_wire_cutouts() { hole_spacing_x = switch_width; // match rack holes - hole_diameter = 7; - hole_left_x = (rack_width - hole_spacing_x) / 2 - (hole_diameter /5); - hole_right_x = (rack_width + hole_spacing_x) / 2 + (hole_diameter /5); + hole_left_x = (rack_width - hole_spacing_x) / 2 - (wire_diameter /5); + hole_right_x = (rack_width + hole_spacing_x) / 2 + (wire_diameter /5); // Midplane of switch opening mid_y = (height - switch_height) / 2 + switch_height / 2; for (side_x = [hole_left_x, hole_right_x]) { translate([side_x, mid_y, 0]) { linear_extrude(height = chassis_depth_main) { - circle(d=hole_diameter); + circle(d=wire_diameter); } } } @@ -185,7 +186,7 @@ module switch_mount(switch_width, switch_height, switch_depth) { // Zip tie indents (top and bottom) x_pos = (rack_width - switch_width)/2; - chassis_height = switch_height + 12; + chassis_height = switch_height + (2 * case_thickness); // Bottom indent translate([x_pos, (height - chassis_height)/2, switch_depth]) { cube([switch_width, zip_tie_indent_depth, zip_tie_cutout_depth]); @@ -247,7 +248,7 @@ module switch_mount(switch_width, switch_height, switch_depth) { // SIDE FACE HOLES (X-axis through left and right sides) // Calculate chassis dimensions - chassis_width = min(switch_width + 12, (rack_width == 152.4) ? 120.65 : 221.5); + chassis_width = min(switch_width + (2 * case_thickness), (rack_width == 152.4) ? 120.65 : 221.5); side_margin = (rack_width - chassis_width) / 2; // Calculate available space within switch height @@ -323,4 +324,4 @@ if (print_orientation) { rotate([-90,0,0]) translate([0, -height/2, -switch_depth/2]) switch_mount(switch_width, switch_height, switch_depth); -} \ No newline at end of file +}