$fn = 64; // --- Parametric Variables --- arch_width = 70; // Total width of the arch structure arch_depth = 30; // Depth (thickness) of the arch pillar_height = 30; // Height of the straight vertical pillars opening_width = 30; // Width of the passage for cables base_height = 5; // Height of the widened base plates // Calculated dimensions pillar_w = (arch_width - opening_width) / 2; module medieval_cable_arch() { union() { difference() { // --- Main Solid Geometry --- union() { // Vertical pillars translate([0, 0, pillar_height / 2]) cube([arch_width, arch_depth, pillar_height], center=true); // Top arch curve translate([0, 0, pillar_height]) rotate([90, 0, 0]) cylinder(d=arch_width, h=arch_depth, center=true); // Widened base plates for stability base_w = pillar_w + 4; translate([-(opening_width / 2 + base_w / 2), 0, base_height / 2]) cube([base_w, arch_depth + 8, base_height], center=true); translate([(opening_width / 2 + base_w / 2), 0, base_height / 2]) cube([base_w, arch_depth + 8, base_height], center=true); // Keystone detail at the top center translate([0, 0, pillar_height + arch_width / 2]) hull() { translate([0, 0, 2]) cube([16, arch_depth + 4, 4], center=true); translate([0, 0, -8]) cube([10, arch_depth + 4, 4], center=true); } } // --- Subtractions (Holes & Details) --- // Inner opening (straight vertical part) translate([0, 0, pillar_height / 2]) cube([opening_width, arch_depth + 10, pillar_height + 0.1], center=true); // Inner opening (curved arch part) translate([0, 0, pillar_height]) rotate([90, 0, 0]) cylinder(d=opening_width, h=arch_depth + 10, center=true); // Clean bottom cut to ensure flat printing surface translate([0, 0, -5]) cube([arch_width + 20, arch_depth + 20, 10], center=true); // Horizontal stone grooves on the pillars for (z = [base_height + 6 : 6 : pillar_height - 2]) { translate([0, 0, z]) cube([arch_width + 5, arch_depth + 5, 1.2], center=true); } // Radial stone grooves on the arch translate([0, 0, pillar_height]) { for (a = [15 : 15 : 165]) { // Skip 90 degrees to avoid cutting the keystone in half if (a != 90) { rotate([0, a, 0]) translate([25, 0, 0]) cube([22, arch_depth + 5, 1.2], center=true); } } } } // --- Additions (Pillar Caps) --- // Added outside the difference so their slight inner overhang is preserved cap_w = pillar_w + 4; translate([-(opening_width / 2 + pillar_w / 2), 0, pillar_height]) cube([cap_w, arch_depth + 4, 3], center=true); translate([(opening_width / 2 + pillar_w / 2), 0, pillar_height]) cube([cap_w, arch_depth + 4, 3], center=true); } } // Render the object medieval_cable_arch();