$fn=64; // --- Parameters --- bridge_length = 160; // Total length of the bridge bridge_width = 50; // Total width of the bridge total_height = 60; // Total height from base to top of parapet arch_span = 100; // Width of the arch opening arch_height = 35; // Height of the arch opening channel_width = 30; // Width of the cable tray channel channel_depth = 15; // Depth of the cable tray channel stone_groove_depth = 1; // Depth of the decorative stone lines stone_groove_width = 1.5; // Width of the decorative stone lines block_height = 15; // Height of each stone block row block_width = 25; // Width of each stone block module stone_bridge_cable_tray() { difference() { // Main Solid Block translate([-bridge_length/2, -bridge_width/2, 0]) cube([bridge_length, bridge_width, total_height]); // 1. Central Arch Cutout translate([0, -bridge_width/2 - 1, 0]) { // Elliptical arch scale([arch_span/2, 1, arch_height]) rotate([-90, 0, 0]) cylinder(r=1, h=bridge_width + 2); // Clear out the area below the arch center to the floor translate([-arch_span/2, 0, -arch_height]) cube([arch_span, bridge_width + 2, arch_height]); } // 2. Top Cable Channel Cutout translate([-bridge_length/2 - 1, -channel_width/2, total_height - channel_depth]) cube([bridge_length + 2, channel_width, channel_depth + 1]); // 3. Decorative Stone Block Pattern // Horizontal grooves for(z = [block_height : block_height : total_height - 1]) { // Front face translate([-bridge_length/2 - 1, -bridge_width/2 - 0.1, z]) cube([bridge_length + 2, stone_groove_depth + 0.1, stone_groove_width]); // Back face translate([-bridge_length/2 - 1, bridge_width/2 - stone_groove_depth, z]) cube([bridge_length + 2, stone_groove_depth + 0.1, stone_groove_width]); } // Vertical staggered grooves (Brick bond pattern) for(z_step = [0 : block_height : total_height - 1]) { // Offset every other row offset = ((z_step / block_height) % 2 == 0) ? 0 : (block_width / 2); for(x = [-bridge_length/2 + offset : block_width : bridge_length/2]) { // Front face vertical cuts translate([x, -bridge_width/2 - 0.1, z_step]) cube([stone_groove_width, stone_groove_depth + 0.1, block_height + stone_groove_width]); // Back face vertical cuts translate([x, bridge_width/2 - stone_groove_depth, z_step]) cube([stone_groove_width, stone_groove_depth + 0.1, block_height + stone_groove_width]); } } } } // Render the model stone_bridge_cable_tray();