$fn = 64; // --- Parameters --- cable_diameter = 6.0; // Diameter of the cables to hold snap_fit_width = 4.5; // Width of the slot opening (slightly smaller than cable for snap-fit) led_diameter = 38.0; // Diameter for standard LED tea light led_depth = 18.0; // Depth of the LED cavity base_radius = 42.0; // Overall radius of the base // --- Main Assembly --- difference() { // Solid Body union() { // Faceted base (rotated to align flat faces with slots) rotate([0, 0, 30]) cylinder(h=15, r1=base_radius, r2=base_radius-3, $fn=6); // Crystal formation crystal_cluster(); } // Subtractions cable_slots(); led_cavity(); // Clean bottom cut to ensure flat printing surface translate([0, 0, -50]) cube([100, 100, 100], center=true); } // --- Modules --- // Generates a single crystal with a hexagonal profile and pointed tip module crystal(r, h, tip_h) { // Main hexagonal prism cylinder(h=h, r=r, $fn=6); // Tapered point translate([0, 0, h]) cylinder(h=tip_h, r1=r, r2=0, $fn=6); } // Generates the clustered formation of crystals module crystal_cluster() { // Central tall crystal crystal(22, 80, 35); // Medium surrounding crystals for(i = [0 : 120 : 359]) { rotate([0, 0, i]) translate([18, 0, 0]) rotate([0, 12, 0]) crystal(16, 55, 25); } // Small filler crystals for(i = [60 : 120 : 359]) { rotate([0, 0, i]) translate([22, 0, 0]) rotate([0, 22, 0]) crystal(12, 35, 18); } } // Generates the horizontal snap-fit channels for organizing cables module cable_slots() { // 6 slots around the perimeter, aligned with the hex base faces for(i = [0 : 60 : 359]) { rotate([0, 0, i]) translate([base_radius - 8, 0, 8]) // Position slightly inside the outer face rotate([90, 0, 0]) union() { // Main cylindrical cable channel cylinder(h=base_radius*2, d=cable_diameter, center=true); // Outer rectangular opening for snapping the cable in translate([10, 0, 0]) cube([20, snap_fit_width, base_radius*2], center=true); } } } // Generates the hollow interior for an LED light to shine through module led_cavity() { // Bottom cylindrical opening for the LED tea light translate([0, 0, -1]) cylinder(h=led_depth + 1, d=led_diameter); // Hollow out the center crystal (tapered to a point for support-free 3D printing) translate([0, 0, led_depth - 1]) cylinder(h=85, r1=led_diameter/2 - 2, r2=0, $fn=6); // Hollow out the medium side crystals for better light diffusion for(i = [0 : 120 : 359]) { rotate([0, 0, i]) translate([18, 0, led_depth - 2]) rotate([0, 12, 0]) cylinder(h=60, r1=10, r2=0, $fn=6); } }