$fn=64; // --- PARAMETERS --- // Base dimensions base_w = 70; base_d = 25; base_h = 10; // Door dimensions door_w = 30; door_h = 40; door_t = 6; // Frame dimensions frame_w = 12; frame_d = 14; // Cable routing dimensions cable_d = 6; // Main wire channel diameter sconce_cable_d = 4; // Smaller channel for LED sconce wiring module dungeon_door_passthrough() { difference() { // --- MAIN BODY --- union() { // 1. Base Plate translate([0, 0, base_h/2]) cube([base_w, base_d, base_h], center=true); // 2. Left Frame Pillar translate([-door_w/2 - frame_w/2, 0, base_h + door_h/2]) cube([frame_w, frame_d, door_h], center=true); // 3. Right Frame Pillar translate([door_w/2 + frame_w/2, 0, base_h + door_h/2]) cube([frame_w, frame_d, door_h], center=true); // 4. Frame Arch (Top) translate([0, 0, base_h + door_h]) rotate([90, 0, 0]) intersection() { cylinder(h=frame_d, d=door_w + 2*frame_w, center=true); translate([0, (door_w + 2*frame_w)/2, 0]) cube([door_w + 2*frame_w + 2, door_w + 2*frame_w + 2, frame_d + 2], center=true); } // 5. Door Lower Body translate([0, 0, base_h + door_h/2]) cube([door_w, door_t, door_h], center=true); // 6. Door Arch (Top) translate([0, 0, base_h + door_h]) rotate([90, 0, 0]) intersection() { cylinder(h=door_t, d=door_w, center=true); translate([0, door_w/2, 0]) cube([door_w + 2, door_w + 2, door_t + 2], center=true); } // 7. Door Details (Iron Bands) translate([0, 0, base_h + door_h * 0.25]) cube([door_w, door_t + 2, 3], center=true); translate([0, 0, base_h + door_h * 0.75]) cube([door_w, door_t + 2, 3], center=true); } // --- CABLE ROUTING CUTOUTS (PASSTHROUGHS) --- // Base X-axis passthrough (Left-to-Right routing) translate([0, 0, base_h/2]) rotate([0, 90, 0]) cylinder(h=base_w + 2, d=cable_d, center=true); // Base Y-axis passthrough (Front-to-Back routing) translate([0, 0, base_h/2]) rotate([90, 0, 0]) cylinder(h=base_d + 2, d=cable_d, center=true); // Base Z-axis passthrough (Bottom-to-Top right pillar for LED torch) translate([door_w/2 + frame_w/2, 0, -1]) cylinder(h=base_h + door_h * 0.8, d=sconce_cable_d); // Right pillar front exit hole (Torch/Sconce wire exit) translate([door_w/2 + frame_w/2, -frame_d/2 - 1, base_h + door_h * 0.75]) rotate([-90, 0, 0]) cylinder(h=frame_d + 2, d=sconce_cable_d); // Hollow routing hub at the center intersection to ease wire pulling translate([0, 0, base_h/2]) sphere(d=cable_d * 1.5); // Pillar routing hub intersection translate([door_w/2 + frame_w/2, 0, base_h/2]) sphere(d=cable_d * 1.2); } } // Render the object dungeon_door_passthrough();