$fn=64; // --- Parameters --- num_slots = 5; // Number of cable slots spacing = 15; // Distance between slots cable_dia = 6; // Diameter of the cable resting hole slot_opening = 3.5; // Width of the channel to snap the cable in depth = 25; // Front-to-back depth of the holder height = 15; // Overall height of the holder padding = 12; // Space on the left and right ends corner_radius = 4; // Radius of the rounded corners // Calculated total length length = (num_slots - 1) * spacing + (2 * padding); difference() { // Main body hull() { translate([corner_radius, corner_radius, 0]) cylinder(r=corner_radius, h=height); translate([length - corner_radius, corner_radius, 0]) cylinder(r=corner_radius, h=height); translate([corner_radius, depth - corner_radius, 0]) cylinder(r=corner_radius, h=height); translate([length - corner_radius, depth - corner_radius, 0]) cylinder(r=corner_radius, h=height); } // Cutouts for cables for (i = [0 : num_slots - 1]) { x_pos = padding + (i * spacing); // Main circular resting hole for the cable translate([x_pos, -1, height - 7]) rotate([-90, 0, 0]) cylinder(d=cable_dia, h=depth + 2); // Vertical channel to snap the cable into place translate([x_pos - (slot_opening / 2), -1, height - 7]) cube([slot_opening, depth + 2, 8]); // Flared opening at the top for easier cable insertion translate([x_pos, -1, height]) rotate([-90, 0, 0]) cylinder(d=slot_opening + 4, h=depth + 2); } }