$fn = 64; // --- PARAMETERS --- // Phone Dimensions phone_width = 82; // Width of the phone slot (fits most phones with cases) phone_thickness = 16; // Depth of the phone slot stand_height = 70; // Overall height of the stand wall_thickness = 4; // Thickness of the structural walls // Hex Grid (HSW - Honeycomb Storage Wall) Parameters hex_flat_to_flat = 19.8; // Slightly undersized for clearance hex_depth = 8; // Depth of the hex peg hex_pitch = 40.98; // Standard horizontal spacing between hex centers // --- CALCULATED DIMENSIONS --- w = phone_width + (wall_thickness * 2); d = phone_thickness + (wall_thickness * 2); h = stand_height; // --- MAIN GEOMETRY --- union() { difference() { // Main Solid Body translate([-w/2, 0, 0]) cube([w, d, h]); // Phone Pocket Cutout translate([-phone_width/2, wall_thickness, wall_thickness]) cube([phone_width, phone_thickness, h + 1]); // Front Screen Visibility Cutout translate([-(phone_width - 24)/2, wall_thickness + phone_thickness - 0.1, wall_thickness + 20]) cube([phone_width - 24, wall_thickness + 0.2, h]); // Bottom Charging Cable Cutout translate([-20/2, wall_thickness - 0.1, -0.1]) cube([20, phone_thickness + 0.2, wall_thickness + 0.2]); // Thumb Swipe Chamfer (Front bottom lip) translate([0, d, wall_thickness + 20]) rotate([45, 0, 0]) cube([phone_width - 24, 20, 20], center=true); } // Left Hex Peg translate([-hex_pitch/2, 0, h - 20]) hex_peg(); // Right Hex Peg translate([hex_pitch/2, 0, h - 20]) hex_peg(); } // --- MODULES --- module hex_peg() { // Calculate circumscribed radius from flat-to-flat distance r_hex = (hex_flat_to_flat / 2) / cos(30); // Slight overlap with the main body to ensure a manifold (watertight) mesh translate([0, 0.1, 0]) rotate([90, 0, 0]) rotate([0, 0, 30]) cylinder(r=r_hex, h=hex_depth + 0.1, $fn=6); }