$fn = 64; // --- Parameters --- stand_width = 80; // Overall width of the stand stand_height = 50; // Total height of the backplate shelf_depth = 18; // Depth for the phone lip_height = 12; // Height of the front retaining lip thickness = 4; // Wall thickness hsw_spacing = 40.88; // Standard distance between HSW hex centers plug_flat = 19.8; // Flat-to-flat distance of the hex plug (slightly undersized for fit) plug_depth = 8.0; // Depth of the hex plug into the wall eps = 0.01; // Small overlap for manifold geometry // Calculated positions shelf_z = -35; // Z position of the shelf's top surface rib_height = stand_height + shelf_z - thickness; // Height of the support ribs // --- Main Assembly --- union() { // Backplate translate([-stand_width/2, 0, -stand_height]) cube([stand_width, thickness, stand_height]); // Shelf translate([-stand_width/2, thickness - eps, shelf_z - thickness]) cube([stand_width, shelf_depth + eps, thickness]); // Front Lip translate([-stand_width/2, thickness + shelf_depth - eps, shelf_z - thickness]) cube([stand_width, thickness, lip_height + thickness]); // Support Ribs (Left and Right) translate([-stand_width/2 + 10, thickness - eps, shelf_z - thickness]) rib(); translate([stand_width/2 - 10 - thickness, thickness - eps, shelf_z - thickness]) rib(); // Left HSW Plug translate([-hsw_spacing/2, eps, -15]) rotate([90, 0, 0]) hsw_plug(); // Right HSW Plug translate([hsw_spacing/2, eps, -15]) rotate([90, 0, 0]) hsw_plug(); } // --- Modules --- // Generates a standard Honeycomb Storage Wall (HSW) plug module hsw_plug() { r1 = plug_flat / sqrt(3); r2 = (plug_flat - 0.5) / sqrt(3); // Slight taper for easier insertion // Rotate 30 degrees to align flats vertically per HSW standard rotate([0, 0, 30]) cylinder(h=plug_depth + eps, r1=r1, r2=r2, $fn=6); } // Generates a triangular support gusset for the shelf module rib() { hull() { // Top flat section under the shelf cube([thickness, shelf_depth + eps, eps]); // Back flat section against the backplate translate([0, 0, -rib_height]) cube([thickness, eps, rib_height]); } }