include <../config/pot.scad> function bottom_size() = [ (pot_wall_thickness + single_pot_size.x) * pot_count + pot_wall_thickness, single_pot_size.y + pot_wall_thickness * 2, single_pot_size.z + pot_wall_thickness ]; module bottom_object() { function bottom_size_no_rounding() = [ bottom_size().x - wall_rounding * 2, bottom_size().y - wall_rounding * 2 ]; function pot_size_no_rounding() = [ single_pot_size.x - wall_rounding * 2, single_pot_size.y - wall_rounding * 2 ]; module base_shape(minimal = true) { minkowski() { square(bottom_size_no_rounding(), center = true); circle(r = wall_rounding); } module stabilisator() { move = stabilisator_width / 2 - stabilisator_size / 2; hull() { translate([0, move]) { circle(r = stabilisator_size / 2); } translate([0, -move]) { circle(r = stabilisator_size / 2); } } } if (!minimal) { translate([bottom_size().x / -2, 0]) { translate([bottom_size().x / 3, 0]) { stabilisator(); } translate([bottom_size().x / 3 * 2, 0]) { stabilisator(); } } } } module pot_shape() { minkowski() { square(pot_size_no_rounding(), center = true); circle(r = wall_rounding); } } module pots_shape() { edge = bottom_size().x / 2 - single_pot_size.x / 2 - pot_wall_thickness; move = single_pot_size.x + pot_wall_thickness; for (count = [-edge : move : edge]) { translate([count, 0]) { pot_shape(); } } } module vent_hole_object() { module hole() { rotate([90, 0, 0]) { cylinder( r = vent_hole_diameter / 2, h = bottom_size().y, center = true ); } } translate([0, 0, single_pot_size.z / 2]) { hole(); } translate([0, 0, single_pot_size.z / 4 * 3]) { hole(); } } module vent_holes_object() { edge = bottom_size().x / 2 - single_pot_size.x / 2 - pot_wall_thickness; move = single_pot_size.x + pot_wall_thickness; for (count = [-edge : move : edge]) { translate([count, 0]) { vent_hole_object(); } } } module pots_object() { difference() { linear_extrude(height = single_pot_size.z) { difference() { base_shape(); pots_shape(); } } vent_holes_object(); } } module base_object() { linear_extrude(height = pot_wall_thickness) { base_shape(minimal = false); } } color(bottom_color) { render() { base_object(); translate([0, 0, pot_wall_thickness]) { pots_object(); } } } }