$fn = 64; // --- Parameters --- // Universal adjustable clamp for power strips // Uses 1x M5 bolt (min 12mm length) and 1x M5 hex nut for adjustment. // Mounts to surface using 2x countersunk wood/machine screws. base_length = 110; clamp_width = 35; base_height = 9; jaw_height = 35; wall_thickness = 5; slider_width = 18; slot_travel = 60; // --- Main Assembly --- main_base(); translate([0, clamp_width + 10, 0]) sliding_jaw(); // --- Modules --- module main_base() { translate([0, clamp_width/2, 0]) { difference() { union() { // Main plate translate([0, -clamp_width/2, 0]) cube([base_length, clamp_width, base_height]); // Fixed jaw translate([0, -clamp_width/2, 0]) cube([wall_thickness, clamp_width, jaw_height + base_height]); // Fixed jaw gusset for strength translate([wall_thickness - 0.01, -slider_width/2, base_height - 0.01]) hull() { cube([12, slider_width, 0.02]); cube([0.02, slider_width, 15]); } } // Slider channel translate([wall_thickness, -slider_width/2, base_height - 5]) cube([base_length, slider_width, 6]); // Adjustment slot for M5 bolt translate([wall_thickness + 15, 0, -1]) hull() { cylinder(h=base_height+2, d=5.5); translate([slot_travel, 0, 0]) cylinder(h=base_height+2, d=5.5); } // Recess for M5 bolt head (bottom) translate([wall_thickness + 15, 0, -1]) hull() { cylinder(h=4, d=10.5); translate([slot_travel, 0, 0]) cylinder(h=4, d=10.5); } // Velcro/Zip-tie strap slot for universal height securing translate([-1, -10, jaw_height + base_height - 8]) cube([wall_thickness+2, 20, 3]); // Mounting holes (Countersunk for flat head screws) translate([15, 11, -1]) { cylinder(h=base_height+2, d=4.5); translate([0, 0, base_height - 1.5]) cylinder(h=3.5, d1=4.5, d2=9); } translate([base_length - 15, -11, -1]) { cylinder(h=base_height+2, d=4.5); translate([0, 0, base_height - 1.5]) cylinder(h=3.5, d1=4.5, d2=9); } } } } module sliding_jaw() { translate([0, clamp_width/2, 0]) { difference() { union() { // Slider base translate([0, -slider_width/2, 0]) cube([40, slider_width, 5]); // Sliding jaw vertical translate([40 - wall_thickness, -clamp_width/2, 5]) cube([wall_thickness, clamp_width, jaw_height]); // Sliding jaw gusset for strength translate([40 - wall_thickness - 12 + 0.01, -slider_width/2, 5 - 0.01]) hull() { cube([12, slider_width, 0.02]); translate([12 - 0.02, 0, 0]) cube([0.02, slider_width, 15]); } } // Hole for M5 bolt translate([15, 0, -1]) cylinder(h=8, d=5.5); // Hex nut recess (top of slider base, traps nut under power strip) translate([15, 0, 1.2]) cylinder(h=4.5, d=9.2, $fn=6); // Velcro/Zip-tie strap slot for universal height securing translate([40 - wall_thickness - 1, -10, 5 + jaw_height - 8]) cube([wall_thickness+2, 20, 3]); } } }