$fn = 64; // --- Parameters --- card_width = 66; // 63mm standard + 3mm for clearance/sleeves card_length = 91; // 88mm standard + 3mm for clearance/sleeves tray_height = 30; // Overall height of the tray wall_thickness = 2.5; // Thickness of the outer walls base_thickness = 2; // Thickness of the bottom base stack_lip_height = 3; // Height of the interlocking bottom lip tolerance = 0.5; // Clearance for stackability // Calculated outer dimensions outer_w = card_width + (wall_thickness * 2); outer_l = card_length + (wall_thickness * 2); module modular_card_tray() { difference() { union() { // Main outer body translate([0, 0, 0]) linear_extrude(tray_height) square([outer_w, outer_l], center=true); // Bottom stacking lip (male interlocking part) // Extends slightly into the main body for a manifold union translate([0, 0, -stack_lip_height]) linear_extrude(stack_lip_height + 0.01) square([card_width - tolerance, card_length - tolerance], center=true); } // Inner card cavity translate([0, 0, base_thickness]) linear_extrude(tray_height + 1) square([card_width, card_length], center=true); // Angled side cutouts for easy card retrieval (Long sides) hull() { translate([0, 0, tray_height + 1]) cube([outer_w + 2, card_length * 0.85, 0.1], center=true); translate([0, 0, base_thickness + 5]) cube([outer_w + 2, card_length * 0.35, 0.1], center=true); } // Angled thumb cutouts (Short sides) hull() { translate([0, 0, tray_height + 1]) cube([card_width * 0.6, outer_l + 2, 0.1], center=true); translate([0, 0, base_thickness + 12]) cube([card_width * 0.25, outer_l + 2, 0.1], center=true); } } } // Render the model modular_card_tray();