$fn = 64; // --- Parametric Variables --- trellis_width = 120; trellis_height = 220; thickness = 4; bar_width = 6; grid_spacing = 25; peg_length = 35; tie_outer_dia = 12; tie_inner_dia = 6; module trellis() { difference() { union() { // Main Outer Frame difference() { cube([trellis_width, trellis_height, thickness]); // Inner Cutout (leaves a thick top header for stacking slots) translate([bar_width, bar_width, -1]) cube([ trellis_width - 2*bar_width, trellis_height - 2*bar_width - peg_length, thickness + 2 ]); } // Sturdy Diagonal Lattice intersection() { // Bounding box to keep lattice neatly inside the frame translate([bar_width, bar_width, 0]) cube([ trellis_width - 2*bar_width, trellis_height - 2*bar_width - peg_length, thickness ]); union() { for (i = [-trellis_height : grid_spacing : trellis_width + trellis_height]) { // Right-leaning bars translate([i, 0, 0]) rotate([0, 0, 45]) translate([-bar_width/2, -trellis_height, 0]) cube([bar_width, trellis_height*3, thickness]); // Left-leaning bars translate([i, 0, 0]) rotate([0, 0, -45]) translate([-bar_width/2, -trellis_height, 0]) cube([bar_width, trellis_height*3, thickness]); } } } // Horizontal Stabilizer Bars for (y = [(trellis_height - peg_length)*0.33, (trellis_height - peg_length)*0.66]) { translate([0, y, 0]) cube([trellis_width, bar_width, thickness]); } // Bottom Stacking Pegs (Inserts into pot rings or another trellis) peg_w = bar_width * 1.5; spacing = trellis_width * 0.6; for (x = [trellis_width/2 - spacing/2, trellis_width/2 + spacing/2]) { translate([x - peg_w/2, -peg_length, 0]) { // Main peg body cube([peg_w, peg_length, thickness]); // Snap-fit retention bumps translate([-1.5, peg_length * 0.4, 0]) cube([peg_w + 3, 4, thickness]); } } // Integrated Tie Points (Loops on the outer edges) for (y = [trellis_height*0.2, trellis_height*0.45, trellis_height*0.7]) { // Left tie point translate([0, y, 0]) difference() { cylinder(d=tie_outer_dia, h=thickness); translate([0, 0, -1]) cylinder(d=tie_inner_dia, h=thickness+2); } // Right tie point translate([trellis_width, y, 0]) difference() { cylinder(d=tie_outer_dia, h=thickness); translate([0, 0, -1]) cylinder(d=tie_inner_dia, h=thickness+2); } } } // Top Slots for Stacking Extended Height Panels peg_w = bar_width * 1.5; spacing = trellis_width * 0.6; clearance = 0.8; // Generous clearance for easy fit after printing for (x = [trellis_width/2 - spacing/2, trellis_width/2 + spacing/2]) { translate([x - peg_w/2 - clearance/2, trellis_height - peg_length, -1]) { // Main slot cutout cube([peg_w + clearance, peg_length + 2, thickness + 2]); // Snap-fit bump cutout translate([-2, peg_length * 0.4 - 1, 0]) cube([peg_w + clearance + 4, 4 + 2, thickness + 2]); } } } } // Render the object trellis();