$fn = 128; // --- PARAMETERS --- t = 5; // Total thickness of the model tol = 0.4; // Clearance tolerance for print-in-place joints pin_r1 = 2.5; // Maximum radius of the hinge pin (middle) pin_r2 = 1.5; // Minimum radius of the hinge pin (top/bottom) // --- MODULES --- // Male part of the print-in-place joint (Captive double-cone pin) module male_pin() { // Bottom cone cylinder(r1=pin_r2, r2=pin_r1, h=t/2 + 0.01); // Top cone translate([0, 0, t/2]) cylinder(r1=pin_r1, r2=pin_r2, h=t/2); // Neck connecting to the segment body translate([-4, -1.5, 0]) cube([4.01, 3, t]); } // Female part of the print-in-place joint (Socket and swing wedge) module female_socket() { // Bottom cone hole translate([0, 0, -0.01]) cylinder(r1=pin_r2+tol, r2=pin_r1+tol, h=t/2 + 0.02); // Top cone hole translate([0, 0, t/2]) cylinder(r1=pin_r1+tol, r2=pin_r2+tol, h=t/2 + 0.02); // Wedge cutout to allow the next segment to swing translate([0, 0, -1]) linear_extrude(t + 2) polygon([[0,0], [-20, 20*tan(45)], [-20, -20*tan(45)]]); } // Wing and crest profile for the main body module wing_and_crest() { // Swept back majestic wing polygon([ [12, 7], [20, 25], [10, 45], [-5, 55], [0, 40], [-12, 45], [-2, 28], [-15, 30], [0, 15], [2, 5] ]); // Head crest polygon([ [36, 1.5], [30, 10], [37, 5], [34, 12], [40, 4] ]); } // Feather detail cutouts for the wings module wing_cutouts() { translate([14, 20, -1]) rotate([0, 0, 60]) scale([3, 0.5, 1]) cylinder(r=3, h=t+2); translate([5, 35, -1]) rotate([0, 0, 75]) scale([4, 0.5, 1]) cylinder(r=3, h=t+2); translate([-5, 45, -1]) rotate([0, 0, 80]) scale([3, 0.5, 1]) cylinder(r=2, h=t+2); } // --- MAIN BODY --- module phoenix_body() { difference() { linear_extrude(t) { // Main torso (wraps around the first joint at x=0) polygon([ [-6, 5], [0, 5.5], [15, 8], [30, 4], [38, 2], [44, 0], [38, -2], [30, -4], [15, -8], [0, -5.5], [-6, -5] ]); wing_and_crest(); mirror([0, 1, 0]) wing_and_crest(); } // First joint socket female_socket(); // Eye cutouts translate([37, 2, -1]) cylinder(r=1, h=t+2); translate([37, -2, -1]) cylinder(r=1, h=t+2); // Wing details wing_cutouts(); mirror([0, 1, 0]) wing_cutouts(); } } // --- TAIL SEGMENTS --- module tail1() { difference() { union() { male_pin(); // Connects to body at x=0 linear_extrude(t) { // Tail body 1 polygon([ [-3.9, 3.5], [-12, 6], [-20, 5], [-26, 4], [-26, -4], [-20, -5], [-12, -6], [-3.9, -3.5] ]); // Feather flares polygon([[-8, 4], [-14, 12], [-12, 5]]); polygon([[-8, -4], [-14, -12], [-12, -5]]); } } // Socket for Tail 2 translate([-20, 0, 0]) female_socket(); } } module tail2() { difference() { union() { translate([-20, 0, 0]) male_pin(); // Connects to Tail 1 at x=-20 linear_extrude(t) { // Tail body 2 polygon([ [-23.9, 3.5], [-32, 5], [-40, 4.5], [-46, 3.5], [-46, -3.5], [-40, -4.5], [-32, -5], [-23.9, -3.5] ]); // Feather flares polygon([[-28, 4], [-36, 10], [-34, 4]]); polygon([[-28, -4], [-36, -10], [-34, -4]]); } } // Socket for Tail 3 translate([-40, 0, 0]) female_socket(); } } module tail3() { union() { translate([-40, 0, 0]) male_pin(); // Connects to Tail 2 at x=-40 linear_extrude(t) { // Final flowing tail tip polygon([ [-43.9, 3.5], [-52, 4], [-70, 0], [-52, -4], [-43.9, -3.5] ]); // Feather flares polygon([[-48, 3], [-58, 8], [-54, 3]]); polygon([[-48, -3], [-58, -8], [-54, -3]]); } } } // --- ASSEMBLY --- phoenix_body(); tail1(); tail2(); tail3();