$fn = 64; // --- Parameters --- cable_diameter = 6.5; // Diameter of the cable to hold slot_width = 4.0; // Width of the snap-fit opening blade_length = 80; // Length of the sword blade blade_width = 24; // Width of the sword blade blade_thickness = 8; // Thickness of the blade guard_length = 8; // Length of the crossguard (along sword axis) guard_width = 45; // Width of the crossguard guard_thickness = 10; // Thickness of the crossguard handle_length = 35; // Length of the grip handle_width = 12; // Width of the grip handle_thickness = 8; // Thickness of the grip pommel_diameter = 18; // Diameter of the pommel at the base pommel_thickness = 10; // Thickness of the pommel // --- Modules --- module sword_base() { // Pommel translate([-handle_length, 0, 0]) cylinder(h=pommel_thickness, d=pommel_diameter); // Handle (penetrates guard slightly for a manifold union) translate([-handle_length, -handle_width/2, 0]) cube([handle_length, handle_width, handle_thickness]); // Crossguard translate([-guard_length/2, -guard_width/2, 0]) cube([guard_length, guard_width, guard_thickness]); } module blade_2d() { // Main rectangular section of the blade translate([guard_length/2, -blade_width/2]) square([blade_length - blade_width/2, blade_width]); // Pointy tip of the sword translate([guard_length/2 + blade_length - blade_width/2, -blade_width/2]) polygon([ [0, 0], [blade_width/2, blade_width/2], [0, blade_width] ]); } module clip_cutout_2d() { // Position the clip in the middle of the blade clip_x = guard_length/2 + blade_length * 0.45; clip_y = -3; // Offset downwards to leave a strong solid spine translate([clip_x, clip_y]) { // Main circular cutout for the cable circle(d=cable_diameter); // Slot leading to the top edge translate([-slot_width/2, 0]) square([slot_width, blade_width]); } // Flared entry at the top edge for easier cable insertion translate([clip_x, blade_width/2]) { polygon([ [-slot_width/2, -2], [slot_width/2, -2], [slot_width*1.5, 1], [-slot_width*1.5, 1] ]); } } // --- Main Assembly --- // Designed to print flat on the bed (Z=0) without supports union() { sword_base(); // Extrude the 2D blade profile with the subtracted clip geometry linear_extrude(height=blade_thickness) { difference() { blade_2d(); clip_cutout_2d(); } } }