| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- include <geometry.scad>
- include <../config/lucky_bamboo_pot.scad>
- module lucky_bamboo_pot_top_base_shape() {
- half_depth = lucky_bamboo_pot_top_depth / 2;
- move_x = lucky_bamboo_pot_top_width / 2 - lucky_bamboo_pot_top_depth / 2;
- hull() {
- translate([-move_x, 0]) {
- rotate(90) {
- circle(r = half_depth);
- }
- }
- translate([move_x, 0]) {
- rotate(270) {
- circle(r = half_depth);
- }
- }
- }
- }
- module lucky_bamboo_pot_top_mounting_hole_shape() {
- circle(r = lucky_bamboo_pot_mounting_hole_diameter / 2);
- }
- module lucky_bamboo_pot_bamboo_holes_shape() {
- size = lucky_bamboo_pot_bamboo_diameter * 3;
- full_width = lucky_bamboo_pot_top_width - lucky_bamboo_pot_top_depth * 2;
- top_width = full_width - full_width % size;
- bottom_width = top_width - size;
- move_y = lucky_bamboo_pot_top_depth / 4;
- for (count = [-top_width / 2 : size : top_width / 2]) {
- translate([count, move_y]) {
- circle(r = lucky_bamboo_pot_bamboo_diameter / 2);
- }
- }
- for (count = [-bottom_width / 2 : size : bottom_width / 2]) {
- translate([count, -move_y]) {
- circle(r = lucky_bamboo_pot_bamboo_diameter / 2);
- }
- }
- }
- module lucky_bamboo_pot_top_shape() {
- move_x = lucky_bamboo_pot_top_width / 2 - lucky_bamboo_pot_top_depth / 2;
- move_y = lucky_bamboo_pot_top_depth / 4;
- difference() {
- lucky_bamboo_pot_top_base_shape();
-
- translate([move_x, move_y]) {
- lucky_bamboo_pot_top_mounting_hole_shape();
- }
- translate([-move_x, move_y]) {
- lucky_bamboo_pot_top_mounting_hole_shape();
- }
- translate([move_x, -move_y]) {
- lucky_bamboo_pot_top_mounting_hole_shape();
- }
- translate([-move_x, -move_y]) {
- lucky_bamboo_pot_top_mounting_hole_shape();
- }
- lucky_bamboo_pot_bamboo_holes_shape();
- }
- }
- module lucky_bamboo_pot_top_object() {
- color(lucky_bamboo_pot_top_color) {
- linear_extrude(height = lucky_bamboo_pot_top_thickness) {
- lucky_bamboo_pot_top_shape();
- }
- }
- }
- module lucky_bamboo_pot_handle_base_shape() {
- height = lucky_bamboo_pot_height;
- depth = lucky_bamboo_pot_top_depth + lucky_bamboo_pot_wall_margin;
- move_x = depth / 2;
- move_y = height / 2;
- rounding = lucky_bamboo_pot_handle_rounding;
- hull() {
- translate([move_x - rounding, move_y - rounding]) {
- circle(r = rounding);
- }
- translate([rounding - move_x, move_y - rounding]) {
- square(rounding * 2, center = true);
- }
- translate([rounding - move_x, rounding]) {
- square(rounding * 2, center = true);
- }
- }
- hull() {
- translate([move_x - rounding, rounding - move_y]) {
- circle(r = rounding);
- }
- translate([rounding - move_x, rounding - move_y]) {
- square(rounding * 2, center = true);
- }
- translate([rounding - move_x, -rounding]) {
- square(rounding * 2, center = true);
- }
- }
- }
- module lucky_bamboo_pot_object() {
- //lucky_bamboo_pot_top_object();
- lucky_bamboo_pot_handle_base_shape();
- }
|