$fn = 64; // --- Parameters --- sill_thickness = 25; // Thickness of the window sill sill_depth = 40; // How deep the clamp slides onto the sill clamp_width = 30; // Width of the clamp wall_thickness = 6; // Thickness of the structural walls pole_diameter = 12.5; // Diameter of the PlantStack pole pole_socket_depth = 35; // Depth of the pole socket screw_hole_dia = 5.5; // Diameter for clamping screw (M5 clearance) nut_trap_dia = 9.5; // M5 nut across-corners diameter nut_trap_depth = 3.5; // Thickness of M5 nut module plantstack_adapter() { // Calculate the center of the pole socket to align flush with the back wall socket_x = (pole_diameter + 2 * wall_thickness) / 2; difference() { // Main Body union() { // C-Clamp profile cube([sill_depth + wall_thickness, clamp_width, sill_thickness + 2 * wall_thickness]); // Vertical Pole Socket translate([socket_x, clamp_width / 2, sill_thickness + 2 * wall_thickness]) cylinder(h = pole_socket_depth, d = pole_diameter + 2 * wall_thickness); } // Cutout for the window sill translate([wall_thickness, -1, wall_thickness]) cube([sill_depth + 2, clamp_width + 2, sill_thickness]); // Cutout for the PlantStack pole translate([socket_x, clamp_width / 2, sill_thickness + 2 * wall_thickness - 0.1]) cylinder(h = pole_socket_depth + 1, d = pole_diameter); // Drainage / Stop hole through the top jaw translate([socket_x, clamp_width / 2, sill_thickness + wall_thickness - 1]) cylinder(h = wall_thickness + 2, d = pole_diameter - 4); // Clamping screw hole (bottom jaw) translate([wall_thickness + sill_depth / 2, clamp_width / 2, -1]) cylinder(h = wall_thickness + 2, d = screw_hole_dia); // Nut trap for the clamping screw (recessed inside the bottom jaw) translate([wall_thickness + sill_depth / 2, clamp_width / 2, wall_thickness - nut_trap_depth]) cylinder(h = nut_trap_depth + 1, d = nut_trap_dia, $fn = 6); } } // Render the adapter plantstack_adapter();