$fn=64; // --- Parameters --- part_thickness = 20; // Uniform thickness of the part holder_inner_dia = 30; // Diameter of the brush handle holder_wall = 5; // Thickness of the holder walls holder_opening = 22; // Front opening to snap the brush in arm_length = 20; // Distance from wall plate to holder plate_height = 70; // Height of the wall plate plate_thick = 5; // Thickness of the wall plate screw_dia = 4.5; // Diameter of mounting screws screw_head_dia = 9; // Diameter of screw head countersink screw_dist = 46; // Distance between the two screw holes // --- Derived Variables --- holder_outer_dia = holder_inner_dia + (holder_wall * 2); ring_y = plate_thick + arm_length + holder_outer_dia/2 - 0.5; // Calculate offset for the front cut to achieve the exact opening width cut_y_offset = sqrt(pow(holder_inner_dia/2, 2) - pow(holder_opening/2, 2)); // Rotate to lay flat on the side for support-free 3D printing translate([0, 0, part_thickness/2]) rotate([0, 90, 0]) brush_holder(); module brush_holder() { difference() { union() { // Wall Plate (Pill shape) hull() { translate([0, plate_thick/2, plate_height/2 - part_thickness/2]) rotate([90, 0, 0]) cylinder(h=plate_thick, d=part_thickness, center=true); translate([0, plate_thick/2, -plate_height/2 + part_thickness/2]) rotate([90, 0, 0]) cylinder(h=plate_thick, d=part_thickness, center=true); } // Connecting Arm translate([0, plate_thick + arm_length/2, 0]) cube([part_thickness, arm_length + 1, part_thickness], center=true); // C-Ring Holder translate([0, ring_y, 0]) cylinder(h=part_thickness, d=holder_outer_dia, center=true); } // --- Subtractions --- // Holder Inner Cutout translate([0, ring_y, 0]) cylinder(h=part_thickness + 2, d=holder_inner_dia, center=true); // Holder Front Opening Cut translate([0, ring_y + cut_y_offset + holder_outer_dia/2, 0]) cube([holder_outer_dia + 10, holder_outer_dia, part_thickness + 2], center=true); // Screw Holes for (z = [screw_dist/2, -screw_dist/2]) { // Screw Shaft translate([0, -1, z]) rotate([-90, 0, 0]) cylinder(h=plate_thick + 2, d=screw_dia); // Screw Countersink translate([0, plate_thick + 0.01, z]) rotate([90, 0, 0]) cylinder(h=3, d1=screw_head_dia, d2=screw_dia); } } }