// Bendlink by Calirie Kate Plamenco is marked with CC0 1.0. // To view a copy of this license, visit https://creativecommons.org/publicdomain/zero/1.0/ // Parameters radius_outer = 4; radius_inner = 3; height = 10 / 2; distance = 8; distance2 = 16; bar_width = 1; // Width of the connecting bar bar_height = height; // Height of the connecting bar bar_length = 49; // Adjust length to fit the model (extend across all cylinders) // Module for Creating Outer Cylinders module create_outer_cylinders(radius, height, distance, distance2) { hull() { cylinder(h = height, r = radius, center = true); translate([0, distance, 0]) cylinder(h = height, r = radius, center = true); translate([0, -distance, 0]) cylinder(h = height, r = radius, center = true); translate([0, distance2, 0]) cylinder(h = height, r = radius, center = true); translate([0, -distance2, 0]) cylinder(h = height, r = radius, center = true); } } // Module for Subtracting Inner Cylinders module subtract_inner_cylinders(radius, height, distance, distance2) { cylinder(h = height, r = radius, center = true); translate([0, distance, 0]) cylinder(h = height, r = radius, center = true); translate([0, -distance, 0]) cylinder(h = height, r = radius, center = true); translate([0, distance2, 0]) cylinder(h = height, r = radius, center = true); translate([0, -distance2, 0]) cylinder(h = height, r = radius, center = true); } // Module for Connecting Bar along the X-axis module connecting_bar(length, width, height) { translate([27, 0, 0]) { cube([length, width, height], center = true); } } // Main Operation union() { // Perform the difference operation for the main structure difference() { create_outer_cylinders(radius_outer, height, distance, distance2); subtract_inner_cylinders(radius_inner, height, distance, distance2); } // Attach a straight connecting bar along the X-axis connecting_bar(bar_length, bar_width, bar_height); } // translate([70, 0, 0]) rotate([0, 0, 90]) union() { // Perform the difference operation for the main structure difference() { create_outer_cylinders(radius_outer, height, distance, distance2); subtract_inner_cylinders(radius_inner, height, distance, distance2); } }