Kaynağa Gözat

Add bottom side of the pot.

Cixo Develop 11 ay önce
ebeveyn
işleme
afe5488146
3 değiştirilmiş dosya ile 151 ekleme ve 0 silme
  1. 139 0
      assets/bottom.scad
  2. 8 0
      config/pot.scad
  3. 4 0
      renders/bottom.scad

+ 139 - 0
assets/bottom.scad

@@ -0,0 +1,139 @@
+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();
+            }
+        }
+    }
+}
+

+ 8 - 0
config/pot.scad

@@ -0,0 +1,8 @@
+single_pot_size = [30, 30, 100];
+wall_rounding = 4;
+pot_wall_thickness = 3;
+pot_count = 6;
+vent_hole_diameter = 10;
+stabilisator_size = 30;
+stabilisator_width = 140;
+bottom_color = "green";

+ 4 - 0
renders/bottom.scad

@@ -0,0 +1,4 @@
+include <../assets/bottom.scad>
+
+$fn = 100;
+bottom_object();