Jelajahi Sumber

Start working on pot.

Cixo 1 tahun lalu
induk
melakukan
c19a3a7056
3 mengubah file dengan 47 tambahan dan 0 penghapusan
  1. 40 0
      assets/pot.scad
  2. 3 0
      config/pot.scad
  3. 4 0
      renders/pot.scad

+ 40 - 0
assets/pot.scad

@@ -0,0 +1,40 @@
+include <../config/pot.scad>
+include <../config/thread.scad>
+
+module pot_object() {
+    module base_object(outsize) {
+        move_z = pot_height / 2 - pot_size / 2;
+        move_x = thread_diameter / 2 + pot_thickness / 2;
+        size = outsize / 2;
+        
+        hull() {
+            translate([move_x, 0, -move_z]) {
+                sphere(r = size);
+            }
+
+            translate([move_x, 0, move_z]) {
+                cylinder(r = size, h = size * 2, center = true);
+            }
+
+            translate([-move_x, 0, -move_z]) {
+                sphere(r = size);
+            }
+
+            translate([-move_x, 0, move_z]) {
+                cylinder(r = size, h = size * 2, center = true);
+            }
+        }
+    }
+
+    render() {
+        difference() {
+            thickness = thread_height + pot_thickness * 2;
+
+            base_object(pot_size + thickness);
+            
+            translate([0, thread_height / 2, thickness / 2]) {
+                base_object(pot_size);
+            }
+        }
+    }
+}

+ 3 - 0
config/pot.scad

@@ -0,0 +1,3 @@
+pot_size = 50;
+pot_height = 100;
+pot_thickness = 3;

+ 4 - 0
renders/pot.scad

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