|
|
@@ -0,0 +1,128 @@
|
|
|
+include <../config/bamboo_pot.scad>
|
|
|
+include <../config/thread.scad>
|
|
|
+include <../config/wall.scad>
|
|
|
+include <thread.scad>
|
|
|
+
|
|
|
+module bamboo_pot_object() {
|
|
|
+ module entrance_object() {
|
|
|
+ inside_radius
|
|
|
+ = bamboo_pot_plant_entrance_diameter / 2;
|
|
|
+
|
|
|
+ outside_radius
|
|
|
+ = inside_radius
|
|
|
+ + bamboo_pot_thickness
|
|
|
+ + thread_height / 2;
|
|
|
+
|
|
|
+ flat_width
|
|
|
+ = thread_top_diameter;
|
|
|
+
|
|
|
+ module base_shape() {
|
|
|
+ move = flat_width / 2;
|
|
|
+ center_size = [flat_width, outside_radius * 2];
|
|
|
+
|
|
|
+ square(center_size, center = true);
|
|
|
+
|
|
|
+ translate([-move, 0]) {
|
|
|
+ circle(r = outside_radius);
|
|
|
+ }
|
|
|
+
|
|
|
+ translate([move, 0]) {
|
|
|
+ circle(r = outside_radius);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ module shape() {
|
|
|
+ move_center
|
|
|
+ = thread_height / 2;
|
|
|
+
|
|
|
+ difference() {
|
|
|
+ base_shape();
|
|
|
+
|
|
|
+ translate([0, move_center]) {
|
|
|
+ circle(r = inside_radius);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ module base_object() {
|
|
|
+ height
|
|
|
+ = bamboo_pot_height;
|
|
|
+
|
|
|
+ linear_extrude(height = height, center = true) {
|
|
|
+ shape();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ module mount_holes_object() {
|
|
|
+ module hole_object() {
|
|
|
+ height
|
|
|
+ = bamboo_pot_thickness;
|
|
|
+
|
|
|
+ move_y
|
|
|
+ = outside_radius
|
|
|
+ - height / 2;
|
|
|
+
|
|
|
+ radius
|
|
|
+ = bamboo_pot_mount_holes_diameter / 2;
|
|
|
+
|
|
|
+ translate([0, move_y, 0]) {
|
|
|
+ rotate([90, 0, 0]) {
|
|
|
+ cylinder(r = radius, h = height, center = true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ move_x
|
|
|
+ = flat_width / 2
|
|
|
+ - bamboo_pot_mount_holes_diameter;
|
|
|
+
|
|
|
+ translate([-move_x, 0, 0]) {
|
|
|
+ hole_object();
|
|
|
+ }
|
|
|
+
|
|
|
+ translate([move_x, 0, 0]) {
|
|
|
+ hole_object();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ module object() {
|
|
|
+ height
|
|
|
+ = bamboo_pot_height
|
|
|
+ - bamboo_pot_thickness * 2;
|
|
|
+
|
|
|
+ top
|
|
|
+ = height / 2
|
|
|
+ - thread_top_diameter / 2;
|
|
|
+
|
|
|
+ move_y
|
|
|
+ = thread_height / 2
|
|
|
+ - outside_radius;
|
|
|
+
|
|
|
+ mount_holes_z
|
|
|
+ = bamboo_pot_height / 2
|
|
|
+ - bamboo_pot_mount_holes_margin;
|
|
|
+
|
|
|
+ difference() {
|
|
|
+ base_object();
|
|
|
+
|
|
|
+ translate([0, 0, mount_holes_z]) {
|
|
|
+ mount_holes_object();
|
|
|
+ }
|
|
|
+
|
|
|
+ for (count = [0 : wall_holes_space : height]) {
|
|
|
+ translate([0, move_y, top - count]) {
|
|
|
+ rotate([270, 0, 0]) {
|
|
|
+ thread_object();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ render() {
|
|
|
+ object();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ entrance_object();
|
|
|
+}
|