From 0ec230e81aa22fee740da3124a2209081eb46325 Mon Sep 17 00:00:00 2001 From: Wyatt Draggoo Date: Tue, 18 Nov 2025 11:59:09 -0800 Subject: [PATCH 1/3] Add configurable case_thickness parameter Replaced hardcoded values of 6 and 12 accordingly throughout --- 10InchRackGenerator.scad | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/10InchRackGenerator.scad b/10InchRackGenerator.scad index c84297a..7087d99 100644 --- a/10InchRackGenerator.scad +++ b/10InchRackGenerator.scad @@ -6,6 +6,7 @@ switch_width = 135.0; switch_depth = 135.0; switch_height = 28.30; +case_thickness = 6; // Thickness of case walls 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 +21,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 +76,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) { @@ -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 +} From 2d21b673ae12cf9f3117389adbb8917302637af5 Mon Sep 17 00:00:00 2001 From: Wyatt Draggoo Date: Tue, 18 Nov 2025 12:08:15 -0800 Subject: [PATCH 2/3] Changed the local hole_diameter to a more descriptive global wire_diameter option at the top of the file. --- 10InchRackGenerator.scad | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/10InchRackGenerator.scad b/10InchRackGenerator.scad index 7087d99..56acdef 100644 --- a/10InchRackGenerator.scad +++ b/10InchRackGenerator.scad @@ -7,6 +7,7 @@ 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] @@ -157,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); } } } From f6e9e767aec1dc485923d833d596eec43c693715 Mon Sep 17 00:00:00 2001 From: Wyatt Draggoo Date: Tue, 18 Nov 2025 12:23:03 -0800 Subject: [PATCH 3/3] Moved the zip_tie_hole_width to the top for easier user configuration. --- 10InchRackGenerator.scad | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/10InchRackGenerator.scad b/10InchRackGenerator.scad index 56acdef..387a858 100644 --- a/10InchRackGenerator.scad +++ b/10InchRackGenerator.scad @@ -8,6 +8,7 @@ switch_height = 28.30; case_thickness = 6; // Thickness of case walls wire_diameter = 7; // Diameter of power wire holes +zip_tie_hole_width = 1.5; // Width of zip tie slots 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] @@ -29,7 +30,6 @@ module switch_mount(switch_width, switch_height, switch_depth) { tolerance = 0.42; zip_tie_hole_count = 8; - zip_tie_hole_width = 1.5; zip_tie_hole_length = 5; zip_tie_indent_depth = 2; zip_tie_cutout_depth = 7;