소스 검색

Add angler and start working on it.

cixo 1 년 전
부모
커밋
35a0f3cc27
6개의 변경된 파일95개의 추가작업 그리고 134개의 파일을 삭제
  1. 87 0
      assets/angler.scad
  2. 0 121
      assets/lucky_bamboo_pot.scad
  3. 4 0
      config/angler.scad
  4. 0 9
      config/lucky_bamboo_pot.scad
  5. 4 0
      renders/angler.scad
  6. 0 4
      renders/lucky_bamboo_pot.scad

+ 87 - 0
assets/angler.scad

@@ -0,0 +1,87 @@
+include <../config/angler.scad>
+
+module angler_object() {
+    depth = angler_depth;
+    height = angler_height;
+    width = angler_width;
+    thickness = angler_thickness;
+    rounding = thickness / 2;
+
+    module outside_shape() {
+        move_x = angler_depth / 2 - rounding;
+        move_y = angler_height / 2 - rounding;
+
+        hull() {
+            translate([-move_x, move_y]) {
+                square(rounding * 2, center = true);
+            }
+
+            translate([move_x, move_y]) {
+                circle(r = rounding);
+            }
+
+            translate([-move_x, -move_y]) {
+                circle(r = rounding);
+            }
+        }
+    }
+
+    module outside_object() {
+        rotate([90, 0, 0]) {
+            linear_extrude(height = angler_thickness, center = true) {
+                outside_shape();
+            }
+        }
+    }
+
+    module inside_shape() {
+        move_x = depth / 2 - rounding;
+        move_y = height / 2 - rounding;
+
+        hull() {
+            translate([-move_x, move_y]) {
+                square(rounding * 2, center = true);
+            }
+
+            translate([move_x, move_y]) {
+                circle(r = rounding);
+            }
+        }
+
+        hull() {
+            translate([-move_x, move_y]) {
+                square(rounding * 2, center = true);
+            }
+
+            translate([-move_x, -move_y]) {
+                circle(r = rounding);
+            }
+        }
+    }
+
+    module inside_object() {
+        rotate([90, 0, 0]) {
+            size = width - thickness * 2;
+
+            linear_extrude(height = size, center = true) {
+                inside_shape();
+            }
+        }
+    }
+    
+    module base_object() {
+        move = width / 2 - thickness / 2;
+
+        inside_object();
+
+        translate([0, move, 0]) {
+            outside_object();
+        }
+
+        translate([0, -move, 0]) {
+            outside_object();
+        }
+    }
+
+    base_object();
+}

+ 0 - 121
assets/lucky_bamboo_pot.scad

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

+ 4 - 0
config/angler.scad

@@ -0,0 +1,4 @@
+angler_depth = 50;
+angler_height = 50;
+angler_thickness = 5;
+angler_width = 50;

+ 0 - 9
config/lucky_bamboo_pot.scad

@@ -1,9 +0,0 @@
-lucky_bamboo_pot_top_depth = 50;
-lucky_bamboo_pot_top_width = 300;
-lucky_bamboo_pot_mounting_hole_diameter = 3;
-lucky_bamboo_pot_top_thickness = 3;
-lucky_bamboo_pot_bamboo_diameter = 12;
-lucky_bamboo_pot_top_color = "yellow";
-lucky_bamboo_pot_height = 100;
-lucky_bamboo_pot_wall_margin = 20;
-lucky_bamboo_pot_handle_rounding = 5;

+ 4 - 0
renders/angler.scad

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

+ 0 - 4
renders/lucky_bamboo_pot.scad

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