$fn = 64; // --- Parameters --- cable_dia = 6.5; // Diameter of the cable (standard USB/power) cable_gap = 3.5; // Opening width to snap cable in num_slots = 4; // Number of cable slots slot_spacing = 16; // Distance between slots blade_length = 95; blade_width = 26; blade_thickness = 12; guard_width = 46; guard_length = 12; guard_thickness = 14; grip_length = 30; grip_dia = 14; pommel_dia = 18; // --- Modules --- module sword_base() { // Blade (Diamond cross-section) hull() { // Center ridge (thick) translate([0, 0, 0]) cube([0.1, 2, blade_thickness], center=true); translate([blade_length-25, 0, 0]) cube([0.1, 2, blade_thickness], center=true); // Edges (thin) translate([0, 0, 0]) cube([0.1, blade_width, 2], center=true); translate([blade_length-25, 0, 0]) cube([0.1, blade_width, 2], center=true); // Tip translate([blade_length, 0, 0]) cube([0.1, 2, 2], center=true); } // Crossguard hull() { translate([0, 0, 0]) cube([guard_length, guard_width, 4], center=true); translate([0, 0, 0]) cube([guard_length/2, guard_width, guard_thickness], center=true); translate([0, guard_width/2 - 3, 0]) sphere(d=guard_thickness*0.8); translate([0, -guard_width/2 + 3, 0]) sphere(d=guard_thickness*0.8); } // Grip (Extended slightly to ensure manifold overlap) translate([-guard_length/2 - grip_length/2, 0, 0]) rotate([0, 90, 0]) cylinder(h=grip_length + 2, d=grip_dia, center=true); // Pommel translate([-guard_length/2 - grip_length, 0, 0]) scale([1, 1.2, 1]) sphere(d=pommel_dia); } module cable_clips() { for(i = [1 : num_slots]) { x_pos = 12 + (i-1) * slot_spacing; y_pos = blade_width/2 - 2.5; translate([x_pos, y_pos, 0]) { // Main cable retaining hole cylinder(h=blade_thickness + 10, d=cable_dia, center=true); // Flared opening for snap-fit insertion hull() { translate([0, 2, 0]) cube([cable_gap, 0.1, blade_thickness + 10], center=true); translate([0, 10, 0]) cube([cable_gap + 2.5, 0.1, blade_thickness + 10], center=true); } } } } // --- Main Assembly --- difference() { // 1. Base sword shape sword_base(); // 2. Flatten the bottom perfectly for 3D printing desk adhesion translate([0, 0, -50]) cube([300, 150, 100], center=true); // 3. Subtract the cable holding slots cable_clips(); // 4. Decorative fuller (blood groove) on the blade translate([15, 0, blade_thickness/2]) rotate([0, 90, 0]) cylinder(h=blade_length-45, d=blade_thickness * 0.35); // 5. Decorative recessed diamond in the crossguard translate([0, 0, guard_thickness/2]) rotate([0, 0, 45]) cube([8, 8, 8], center=true); }