$fn = 64; // --- Parameters --- holder_width = 80; // Total width of the holder holder_depth = 45; // Total depth of the base holder_height = 25; // Maximum height corner_radius = 3; // Radius for rounded edges slot_width = 2.5; // Thickness of the card slot slot_depth = 15; // How deep the card sits in the holder slot_angle = 15; // Tilt angle (degrees) slot_margin = 8; // Margin on the sides of the slot module card_holder() { difference() { // Main Body: Extruded and rounded profile rotate([90, 0, 90]) linear_extrude(height=holder_width, center=true) offset(r=corner_radius) polygon([ [corner_radius, corner_radius], // Bottom front [holder_depth - corner_radius, corner_radius], // Bottom back [holder_depth - corner_radius, holder_height - corner_radius], // Top back [holder_depth * 0.55, holder_height - corner_radius], // Top flat edge [corner_radius, holder_height * 0.35] // Angled front lip ]); // Card Slot: Angled cutout translate([0, holder_depth * 0.75, holder_height]) rotate([-slot_angle, 0, 0]) translate([0, 0, -slot_depth/2 + 1]) hull() { // Left rounded edge of the slot translate([-(holder_width - slot_margin*2)/2 + slot_width/2, 0, 0]) cylinder(d=slot_width, h=slot_depth + 2, center=true); // Right rounded edge of the slot translate([(holder_width - slot_margin*2)/2 - slot_width/2, 0, 0]) cylinder(d=slot_width, h=slot_depth + 2, center=true); } } } // Render the object card_holder();