| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- 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();
- }
- }
- }
- }
|