Forráskód Böngészése

Add hook for next items.

cixo 1 éve
szülő
commit
089d56b127
7 módosított fájl, 98 hozzáadás és 11 törlés
  1. 9 9
      assets/hole.scad
  2. 47 0
      assets/hook.scad
  3. 2 2
      config/hole.scad
  4. 7 0
      config/hook.scad
  5. 17 0
      manufacture/hook.2D.scad
  6. 12 0
      manufacture/hook.3D.scad
  7. 4 0
      renders/hook.scad

+ 9 - 9
assets/hole.scad

@@ -1,26 +1,26 @@
 include <../config/hole.scad>
 
 module hole_shape() {
-    full_height = hole_entrance * 2 + hole_holding * 2.5;
+    full_height = hole_entrance / 2 * 2 + hole_holding / 2 * 2.5;
 
     translate([0, -full_height / 2]) {
         hull() {
-            translate([0, hole_entrance]) {
-                circle(r = hole_entrance);
+            translate([0, hole_entrance / 2]) {
+                circle(r = hole_entrance / 2);
             }
 
-            translate([0, hole_entrance * 2 + hole_holding]) {
-                circle(r = hole_holding);
+            translate([0, hole_entrance + hole_holding / 2]) {
+                circle(r = hole_holding / 2);
             }
         }
 
         hull() {
-            translate([0, hole_entrance * 2 + hole_holding]) {
-                circle(r = hole_holding);
+            translate([0, hole_entrance + hole_holding / 2]) {
+                circle(r = hole_holding / 2);
             }
 
-            translate([0, hole_entrance * 2 + hole_holding * 1.5]) {
-                circle(r = hole_holding);
+            translate([0, hole_entrance + hole_holding / 2 * 1.5]) {
+                circle(r = hole_holding / 2);
             }
         }
     }

+ 47 - 0
assets/hook.scad

@@ -0,0 +1,47 @@
+include <../config/hook.scad>
+include <../config/hole.scad>
+include <../config/wall.scad>
+
+module hook_mounting_hole_shape() {
+    circle(r = hook_mounting_hole / 2);
+}
+
+module hook_entrance_shape() {
+    outside_radius = (hole_entrance - hook_entrance_margin) / 2;
+    
+    difference() {
+        circle(r = outside_radius);
+        hook_mounting_hole_shape();
+    }
+}
+
+module hook_entrance_object() {
+    linear_extrude(height = hook_entrance_height) {
+        hook_entrance_shape();
+    }
+}
+
+module hook_holding_shape() {
+    outside_radius = (hole_holding - hook_holding_margin) / 2;
+
+    difference() {
+        circle(r = outside_radius);
+        hook_mounting_hole_shape();
+    }
+}
+
+module hook_holding_object() {
+    linear_extrude(height = wall_thickness + hook_holding_height_margin) {
+        hook_holding_shape();
+    }
+}
+
+module hook_object() {
+    color(hook_color) {
+        hook_entrance_object();
+
+        translate([0, 0, hook_entrance_height]) {
+            hook_holding_object();
+        }
+    }
+}

+ 2 - 2
config/hole.scad

@@ -1,2 +1,2 @@
-hole_entrance = 6;
-hole_holding = 3;
+hole_entrance = 12;
+hole_holding = 6;

+ 7 - 0
config/hook.scad

@@ -0,0 +1,7 @@
+hook_mounting_hole = 3;
+hook_entrance_margin = 1;
+hook_entrance_height = 1.5;
+hook_holding_margin = 0.2;
+hook_holding_height_margin = 0.2;
+hook_color = "lightblue";
+hook_manufacture_count = 4;

+ 17 - 0
manufacture/hook.2D.scad

@@ -0,0 +1,17 @@
+include <../assets/hook.scad>
+
+$fn = 100;
+
+size = hole_entrance * 1.2;
+depth = hole_entrance * 1.2 / 2 + hole_holding  * 1.2 / 2;
+move_x = size * (hook_manufacture_count - 1) / 2;
+
+for (count = [-move_x : size : move_x]) {
+    translate([count, -depth / 2]) {
+        hook_entrance_shape();
+    }
+    
+    translate([count, depth / 2]) {
+        hook_holding_shape();
+    }
+}

+ 12 - 0
manufacture/hook.3D.scad

@@ -0,0 +1,12 @@
+include <../assets/hook.scad>
+
+$fn = 100;
+
+size = hole_entrance * 1.2;
+move_x = size * (hook_manufacture_count - 1) / 2;
+
+for (count = [-move_x : size : move_x]) {
+    translate([count, 0, 0]) {
+        hook_object();
+    }
+}

+ 4 - 0
renders/hook.scad

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