Przeglądaj źródła

Add connector holes and module.

Cixo Develop 1 rok temu
rodzic
commit
47ec62f605
2 zmienionych plików z 52 dodań i 3 usunięć
  1. 50 3
      assets/platform.scad
  2. 2 0
      renders/platform.scad

+ 50 - 3
assets/platform.scad

@@ -16,6 +16,27 @@ function platform_side_width()
     = platform_height
     - corner_radius * 2;
 
+function platform_connector_holes() = [
+    0,
+    platform_depth / 2 - corner_radius,
+    platform_depth / 4 - corner_radius,
+    -platform_depth / 4 - corner_radius
+];
+
+function platform_connector_space() 
+    = thread_top_diameter
+    + platform_thickness;
+
+module platform_connector_hole(move_x, move_y, thickness = 0) { 
+    translate([move_x, move_y]) {
+        if (thickness == 0) {
+            circle(r = thread_screw / 2);
+        } else {
+            cylinder(r = thread_screw / 2, h = thickness, center = true);
+        }
+    }
+}
+
 module platform_side_holes(thread = false) {
     move_x
     = platform_side_width() / 2
@@ -51,7 +72,7 @@ module platform_side_holes(thread = false) {
         thread_screw_hole(move_x, move_top_y); 
         thread_screw_hole(0, move_top_y);
         thread_screw_hole(move_x, move_bottom_y); 
-        thread_screw_hole(-move_x, move_bottom_y); 
+        thread_screw_hole(-move_x, move_bottom_y);
     }
 
 }
@@ -294,9 +315,22 @@ module platform_top_shape() {
     = platform_full_support_depth() / 2
     - platform_depth / 2;
 
+    module connector_holes() {
+        for (count = platform_connector_holes()) {
+            move
+            = count
+            - platform_connector_space();
+
+            platform_connector_hole(move_x, move);
+            platform_connector_hole(-move_x, move);
+        }
+    }
+
     difference() {
         base_shape();
 
+        connector_holes();
+
         translate([0, holes_y]) {
             platform_top_holes();
         }
@@ -339,14 +373,22 @@ module platform_side_shape() {
         }
     }
 
-    holes_y
+    support_holes_y
     = platform_full_support_depth() / 2
     - platform_depth / 2;
 
+    module connector_holes() {
+        for (count = platform_connector_holes()) {
+            platform_connector_hole(move_x, count);
+        }
+    }
+
     difference() {
         base_shape();
 
-        translate([0, holes_y]) {
+        connector_holes();
+
+        translate([0, support_holes_y]) {
             platform_side_holes();
         }
     }
@@ -363,3 +405,8 @@ module platform_side_object() {
         }
     }
 }
+
+module platform_connector() {
+    size = platform_connector_space();
+    cube(size, center = true);
+}

+ 2 - 0
renders/platform.scad

@@ -37,3 +37,5 @@ translate([-side_position_x, 0, side_position_z]) {
         platform_side_object();
     }
 }
+
+platform_connector();