Bladeren bron

Add new module to stay clean with cable near to desktop.

cixo 1 jaar geleden
bovenliggende
commit
8df78d889b
4 gewijzigde bestanden met toevoegingen van 165 en 0 verwijderingen
  1. 148 0
      assets/cable_hanger.scad
  2. 7 0
      config/cable_hanger.scad
  3. 5 0
      manufacture/cable_hanger.3D.scad
  4. 5 0
      renders/cable_hanger.scad

+ 148 - 0
assets/cable_hanger.scad

@@ -0,0 +1,148 @@
+include <../config/cable_hanger.scad>
+include <../config/thread.scad>
+include <../config/wall.scad>
+include <thread.scad>
+
+module cable_hanger_object() {
+    module base_shape() {
+        depth = thread_height 
+        + cable_hanger_base_thickness 
+        + cable_hanger_depth;
+
+        rounding = cable_hanger_rounding;
+        move_y = depth / 2 - rounding;
+        move_x = cable_hanger_width / 2 - rounding;
+
+        hull() {
+            translate([move_x, move_y]) {
+                circle(r = rounding);
+            }
+
+            translate([-move_x, move_y]) {
+                circle(r = rounding);
+            }
+
+            translate([move_x, -move_y]) {
+                square(rounding * 2, center = true);
+            }
+
+            translate([-move_x, -move_y]) {
+                square(rounding * 2, center = true);
+            }
+        }
+    }
+
+    module cable_hanger_shape() {
+        inside = cable_hanger_inside_hole;
+        outside = cable_hanger_outside_hole;
+        depth = cable_hanger_depth;
+
+        move_top = depth / 2;
+        move_bottom = inside / 2 - depth / 2;
+
+        render() {
+            difference() {
+                hull() {
+                    translate([0, move_top]) {
+                        circle(r = outside / 2);
+                    }
+
+                    translate([0, move_bottom]) {
+                        circle(r = inside / 2);
+                    }
+                }
+                
+                translate([0, move_top + outside / 2]) {
+                    square(outside, center = true);
+                }
+            }
+        }
+    }
+   
+    module final_shape() {
+        module single_cable_shape(move_x) {
+            depth = cable_hanger_depth;
+            size = depth + cable_hanger_base_thickness + thread_height;
+            move_y = size / 2 - depth / 2;
+
+            translate([move_x, move_y]) {
+                cable_hanger_shape();
+            }
+        }
+
+        module all_cables_shape() {
+            base_width = cable_hanger_width 
+            - cable_hanger_outside_hole
+            - cable_hanger_rounding * 2;
+
+            space = cable_hanger_space
+            + cable_hanger_outside_hole;
+
+            width = base_width 
+            - base_width % space;
+
+            move = width / 2;
+
+            for (count = [-move : space : move]) {
+                single_cable_shape(count);
+            }
+        }
+
+        render() {
+            difference() {
+                base_shape();
+                all_cables_shape();
+            }
+        }
+    }
+    
+    module base_object() {
+        thickness = thread_top_diameter
+        + cable_hanger_base_thickness * 2;
+
+        linear_extrude(height = thickness, center = true) {
+            final_shape();
+        }
+    }
+
+    module final_object() {
+        module thread(move_x) {
+            move_y = thread_height / 2
+            - cable_hanger_depth / 2
+            - cable_hanger_base_thickness / 2
+            - thread_height / 2;
+
+            translate([move_x, move_y, 0]) {
+                rotate([270, 0, 0]) {
+                    thread_object();
+                }
+            }
+        }
+
+        module threads() {
+            base_width = cable_hanger_width 
+            - thread_top_diameter
+            - cable_hanger_base_thickness;
+
+            width = base_width
+            - base_width % wall_holes_space;
+
+            move = width / 2;
+
+            for (count = [-move : wall_holes_space : move]) {
+                thread(count);
+            }
+        }
+
+        color("#3dea15") {
+            render() {
+                difference() {
+                    base_object();
+                    threads();
+                }
+            }
+        }
+    }   
+
+    final_object();
+}

+ 7 - 0
config/cable_hanger.scad

@@ -0,0 +1,7 @@
+cable_hanger_depth = 15;
+cable_hanger_base_thickness = 2;
+cable_hanger_rounding = 5;
+cable_hanger_width = 50;
+cable_hanger_inside_hole = 2;
+cable_hanger_outside_hole = 5;
+cable_hanger_space = 3;

+ 5 - 0
manufacture/cable_hanger.3D.scad

@@ -0,0 +1,5 @@
+include <../assets/cable_hanger.scad>
+
+$fn = 100;
+
+cable_hanger_object();

+ 5 - 0
renders/cable_hanger.scad

@@ -0,0 +1,5 @@
+include <../assets/cable_hanger.scad>
+
+$fn = 100;
+
+cable_hanger_object();