|
|
@@ -4,6 +4,21 @@ include <../config/wall.scad>
|
|
|
include <thread.scad>
|
|
|
|
|
|
module bamboo_pot_object() {
|
|
|
+ module water_shape() {
|
|
|
+ outside_radius
|
|
|
+ = bamboo_pot_plant_entrance_diameter / 2
|
|
|
+ + bamboo_pot_thickness;
|
|
|
+
|
|
|
+ inside_radius
|
|
|
+ = outside_radius
|
|
|
+ - bamboo_pot_thickness;
|
|
|
+
|
|
|
+ difference() {
|
|
|
+ circle(r = outside_radius);
|
|
|
+ circle(r = inside_radius);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
module entrance_object() {
|
|
|
inside_radius
|
|
|
= bamboo_pot_plant_entrance_diameter / 2;
|
|
|
@@ -85,7 +100,60 @@ module bamboo_pot_object() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- module object() {
|
|
|
+ module bottom_hull_object() {
|
|
|
+ height
|
|
|
+ = bamboo_pot_hull_height;
|
|
|
+
|
|
|
+ hole_move_y
|
|
|
+ = thread_height / 2;
|
|
|
+
|
|
|
+ thickness
|
|
|
+ = 1 / $fn;
|
|
|
+
|
|
|
+ module start_object() {
|
|
|
+ translate([0, 0, -thickness]) {
|
|
|
+ linear_extrude(height = thickness) {
|
|
|
+ base_shape();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ module end_object() {
|
|
|
+ linear_extrude(height = thickness) {
|
|
|
+ translate([0, hole_move_y, 0]) {
|
|
|
+ water_shape();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ module base_object() {
|
|
|
+ hull() {
|
|
|
+ translate([0, 0, height / 2]) {
|
|
|
+ start_object();
|
|
|
+ }
|
|
|
+
|
|
|
+ translate([0, 0, -height / 2]) {
|
|
|
+ end_object();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ module water_hole_object() {
|
|
|
+ radius
|
|
|
+ = bamboo_pot_plant_entrance_diameter / 2;
|
|
|
+
|
|
|
+ translate([0, hole_move_y, 0]) {
|
|
|
+ cylinder(r = radius, h = height, center = true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ difference() {
|
|
|
+ base_object();
|
|
|
+ water_hole_object();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ module bamboo_object() {
|
|
|
height
|
|
|
= bamboo_pot_height
|
|
|
- bamboo_pot_thickness * 2;
|
|
|
@@ -119,10 +187,191 @@ module bamboo_pot_object() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ module object() {
|
|
|
+ move_bamboo
|
|
|
+ = bamboo_pot_hull_height / 2;
|
|
|
+
|
|
|
+ move_bottom_hull
|
|
|
+ = -bamboo_pot_height / 2;
|
|
|
+
|
|
|
+ translate([0, 0, move_bamboo]) {
|
|
|
+ bamboo_object();
|
|
|
+ }
|
|
|
+
|
|
|
+ translate([0, 0, move_bottom_hull]) {
|
|
|
+ bottom_hull_object();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
render() {
|
|
|
object();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- entrance_object();
|
|
|
+ module water_object() {
|
|
|
+ module base_object() {
|
|
|
+ rotate_extrude(angle = 180) {
|
|
|
+ move
|
|
|
+ = bamboo_pot_water_size / 2
|
|
|
+ + bamboo_pot_plant_entrance_diameter / 2
|
|
|
+ + bamboo_pot_thickness;
|
|
|
+
|
|
|
+ translate([move, 0]) {
|
|
|
+ water_shape();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ move_center_z
|
|
|
+ = bamboo_pot_water_size / 4
|
|
|
+ + bamboo_pot_plant_entrance_diameter / 2
|
|
|
+ + bamboo_pot_thickness;
|
|
|
+
|
|
|
+ translate([0, 0, move_center_z]) {
|
|
|
+ rotate([270, 0, 90]) {
|
|
|
+ base_object();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ module watering_object() {
|
|
|
+ module top_shape(inside = true) {
|
|
|
+ radius
|
|
|
+ = bamboo_pot_water_entrance / 2
|
|
|
+ + (inside ? 0 : bamboo_pot_thickness);
|
|
|
+
|
|
|
+ circle(r = radius);
|
|
|
+ }
|
|
|
+
|
|
|
+ move
|
|
|
+ = bamboo_pot_hull_height / 2;
|
|
|
+
|
|
|
+ thickness
|
|
|
+ = 1 / $fn;
|
|
|
+
|
|
|
+ module base_object() {
|
|
|
+ module bottom_object() {
|
|
|
+ linear_extrude(height = thickness) {
|
|
|
+ water_shape();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ module top_object() {
|
|
|
+ translate([0, 0, -thickness]) {
|
|
|
+ linear_extrude(height = thickness) {
|
|
|
+ top_shape(false);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ hull() {
|
|
|
+ translate([0, 0, move]) {
|
|
|
+ top_object();
|
|
|
+ }
|
|
|
+
|
|
|
+ translate([0, 0, -move]) {
|
|
|
+ bottom_object();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ module hole_object() {
|
|
|
+ module bottom_object() {
|
|
|
+ radius
|
|
|
+ = bamboo_pot_plant_entrance_diameter / 2;
|
|
|
+
|
|
|
+ cylinder(r = radius, h = thickness);
|
|
|
+ }
|
|
|
+
|
|
|
+ module top_object() {
|
|
|
+ translate([0, 0, -thickness]) {
|
|
|
+ linear_extrude(height = thickness) {
|
|
|
+ top_shape(true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ hull() {
|
|
|
+ translate([0, 0, move]) {
|
|
|
+ top_object();
|
|
|
+ }
|
|
|
+
|
|
|
+ translate([0, 0, -move]) {
|
|
|
+ bottom_object();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ difference() {
|
|
|
+ base_object();
|
|
|
+ hole_object();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ module water_level_set_object() {
|
|
|
+ height
|
|
|
+ = bamboo_pot_water_level;
|
|
|
+
|
|
|
+ linear_extrude(height = height, center = true) {
|
|
|
+ water_shape();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ module final_object() {
|
|
|
+ entrance_move_z
|
|
|
+ = bamboo_pot_water_size / 4
|
|
|
+ + bamboo_pot_plant_entrance_diameter / 2
|
|
|
+ + bamboo_pot_thickness;
|
|
|
+
|
|
|
+ entrance_move_y
|
|
|
+ = -bamboo_pot_plant_entrance_diameter / 2
|
|
|
+ - thread_height / 2
|
|
|
+ - bamboo_pot_thickness
|
|
|
+ - bamboo_pot_water_size / 2;
|
|
|
+
|
|
|
+ water_move_z
|
|
|
+ = -bamboo_pot_height / 2
|
|
|
+ - bamboo_pot_hull_height / 2;
|
|
|
+
|
|
|
+ water_level_set_move_y
|
|
|
+ = bamboo_pot_water_size / 2
|
|
|
+ + bamboo_pot_thickness
|
|
|
+ + bamboo_pot_plant_entrance_diameter / 2;
|
|
|
+
|
|
|
+ water_level_set_move_z
|
|
|
+ = bamboo_pot_water_level / 2
|
|
|
+ + entrance_move_z
|
|
|
+ - bamboo_pot_height / 2
|
|
|
+ - bamboo_pot_hull_height / 2;
|
|
|
+
|
|
|
+ watering_move_y
|
|
|
+ = water_level_set_move_y;
|
|
|
+
|
|
|
+ watering_move_z
|
|
|
+ = water_level_set_move_z
|
|
|
+ + bamboo_pot_water_level / 2
|
|
|
+ + bamboo_pot_hull_height / 2;
|
|
|
+
|
|
|
+ translate([0, entrance_move_y, entrance_move_z]) {
|
|
|
+ entrance_object();
|
|
|
+ }
|
|
|
+
|
|
|
+ translate([0, 0, water_move_z]) {
|
|
|
+ water_object();
|
|
|
+ }
|
|
|
+
|
|
|
+ translate([0, water_level_set_move_y, water_level_set_move_z]) {
|
|
|
+ water_level_set_object();
|
|
|
+ }
|
|
|
+
|
|
|
+ translate([0, watering_move_y, watering_move_z]) {
|
|
|
+ watering_object();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ color("#20B347") {
|
|
|
+ render() {
|
|
|
+ final_object();
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|