Bladeren bron

Final release shelf.

cixo 1 jaar geleden
bovenliggende
commit
7cd88e71ff
8 gewijzigde bestanden met toevoegingen van 325 en 17 verwijderingen
  1. 226 13
      assets/shelf.scad
  2. 33 0
      assets/thread.scad
  3. 13 3
      config/shelf.scad
  4. 5 0
      config/thread.scad
  5. 5 0
      manufacture/shelf.2D.scad
  6. 11 0
      manufacture/shelf.3D.scad
  7. 27 1
      renders/shelf.scad
  8. 5 0
      renders/thread.scad

+ 226 - 13
assets/shelf.scad

@@ -1,6 +1,15 @@
 include <../config/shelf.scad>
+include <../config/wall.scad>
+include <thread.scad>
 
-module shelf_angle() {
+function shelf_mounting_width() = shelf_angle_depth - shelf_rounding * 2;
+
+function shelf_mounting_holes() = [
+    shelf_mounting_width() / 4,
+    shelf_mounting_width() / 4 * 3
+];
+
+module shelf_angle_object() {
     module base_shape() {
         move_x = shelf_angle_depth / 2 - shelf_rounding;
         move_y = shelf_angle_height / 2 - shelf_rounding;
@@ -66,10 +75,10 @@ module shelf_angle() {
         }   
 
         module indentation() {
-            width = shelf_angle_depth - shelf_angle_thickness;
+            width = shelf_angle_depth - shelf_rounding * 2;
             height = shelf_thickness;
 
-            translate([shelf_angle_thickness / 2, 0]) {
+            translate([shelf_rounding, 0]) {
                 square([width, height], center = true);
             }
         }
@@ -81,20 +90,224 @@ module shelf_angle() {
             }
         }
 
-        base_size = min(shelf_angle_height / 2, shelf_angle_depth);
-        size = base_size - shelf_rounding * 2;
-        
-        corner_move_x = size / 2
-        - shelf_angle_depth / 2
-        + shelf_rounding * 2;
+        test_height = shelf_angle_height / 2 - shelf_rounding * 3;
+        test_depth = shelf_angle_depth - shelf_rounding * 3;
+        size = min(test_height, test_depth);
+        corner_move_x = size / 2 - shelf_angle_depth / 2 + shelf_rounding * 2;
+        corner_move_y = size / 2 + shelf_rounding * 2;
 
-        corner_move_y = size / 2
-        - shelf_angle_height / 2;
+        translate([corner_move_x, corner_move_y]) {
+            reverse_corner(size, 0);
+        }
 
         translate([corner_move_x, -corner_move_y]) {
-            reverse_corner(size, 0);
+            reverse_corner(size, 3);
+        }
+    }
+
+    module base_object() {
+        linear_extrude(height = shelf_angle_thickness, center = true) {
+            base_shape();
         }
     }
 
-    base_shape();
+    module wall_thread(move_y = 0, split) {
+        move_x = (split ? 0 : shelf_rounding * 2)
+        - shelf_angle_depth / 2
+        - thread_height / 2 * (split ? -1 : 1);
+
+        render() {
+            translate([move_x, move_y, 0]) {
+                rotate([0, split ? 90 : 270, 0]) {
+                    thread_object();
+
+                    translate([0, 0, -thread_height / 2]) {
+                        rotate([0, 180, 0]) {
+                            radius = thread_top_diameter / 2;
+                            height = shelf_angle_depth;
+
+                            cylinder(r = radius, h = height);
+                        }
+                    }
+                }
+            }
+
+            translate([0, move_y, 0]) {
+                rotate([0, 90, 0]) {
+                    thread_screw_object(shelf_angle_depth * 2);
+                }
+            }
+        }
+    }
+
+    module mount_thread(move_x) {
+        move_y = shelf_thickness / 2 + thread_height / 2 + 1;
+
+        translate([move_x, move_y, 0]) {
+            rotate([90, 0, 0]) {
+                render() {
+                    thread_object();
+                    thread_screw_object(shelf_angle_height * 2);
+
+                    rotate([0, 180, 0]) {
+                        radius = thread_top_diameter / 2;
+                        height = shelf_angle_height;
+
+                        translate([0, 0, thread_height / 2]) {
+                            cylinder(r = radius, h = height);
+                        }
+                    }
+
+                    screw_height = thread_height / 2
+                    + shelf_thickness
+                    + shelf_rounding;
+
+                    translate([0, 0, screw_height]) {
+                        cylinder(r = thread_screw, h = shelf_angle_height);
+                    }
+                }
+            }
+        }
+    }
+
+    module final_object() {
+        render() {
+            difference() {
+                base_object();
+               
+                correction = shelf_angle_height % wall_holes_space;
+                move = (shelf_angle_height - correction) / 2;
+                
+                for (count = [-move : wall_holes_space : move]) {
+                    wall_thread(count, count == 0);
+                }
+
+                for (count = shelf_mounting_holes()) {
+                    correction = shelf_rounding * 2 - shelf_angle_depth / 2;
+                    mount_thread(count + correction);
+                }
+            }
+        }
+    }
+
+    color("#005555") {
+        render() {
+            final_object();
+        }
+    }
+}
+
+module shelf_shape() {
+    module base_shape() {
+        move_x = shelf_width / 2 - shelf_rounding;
+        move_y = shelf_depth / 2 - shelf_rounding;
+
+        module corner(move) {
+            translate(move) {
+                circle(r = shelf_rounding);
+            }
+        }
+
+        render() {
+            hull() {
+                corner([move_x, move_y]);
+                corner([-move_x, move_y]);
+                corner([move_x, -move_y]);
+                corner([-move_x, -move_y]);
+            }
+        }
+    }
+
+    module mounting_holes() {
+        base_move = shelf_width - shelf_width % wall_holes_space;
+        move = base_move / 2;
+        indentation_y = shelf_depth / 2;
+
+        for (count_x = [-move : wall_holes_space : move]) {
+
+            translate([count_x, -indentation_y]) {
+                size = [shelf_angle_thickness, shelf_rounding * 4];
+                square(size, center = true);
+            }
+
+            for (count_y = shelf_mounting_holes()) {
+                holes_y = count_y 
+                - shelf_depth / 2 
+                + shelf_rounding * 2;
+                
+                translate([count_x, holes_y]) {
+                    circle(r = thread_screw / 2);
+                }
+            }
+        }
+    }
+   
+    module inside_holes() {
+        move_x = (shelf_width - shelf_width % shelf_inside_holes_space) / 2;
+        move_y = (shelf_depth - shelf_depth % shelf_inside_holes_space) / 2;
+
+        for (count_x = [-move_x : shelf_inside_holes_space : move_x]) {
+            for (count_y = [-move_y : shelf_inside_holes_space : move_y]) {
+                translate([count_x, count_y]) {
+                    circle(r = shelf_inside_hole / 2);
+                }
+            }
+        }
+    }
+
+    module vesa_holes() {
+        translate(shelf_vesa_holes_move) {
+            move_x = shelf_vesa_holes_width / 2;
+            move_y = shelf_vesa_holes_depth / 2;
+
+            translate([move_x, move_y]) {
+                circle(r = shelf_vesa_hole / 2);
+            }
+
+            translate([-move_x, move_y]) {
+                circle(r = shelf_vesa_hole / 2);
+            }
+
+            translate([move_x, -move_y]) {
+                circle(r = shelf_vesa_hole / 2);
+            }
+
+            translate([-move_x, -move_y]) {
+                circle(r = shelf_vesa_hole / 2);
+            }
+        }
+    }
+
+    module final_shape() {
+        difference() {
+            base_shape();
+            mounting_holes();
+            
+            if (shelf_vesa_holes_enable) {
+                vesa_holes();
+            }
+
+            if (shelf_inside_holes_enable) {
+                inside_holes();
+            }
+        }
+    }
+
+    render() {
+        final_shape();
+    }
+}
+
+module shelf_object() {
+    module base() {
+        linear_extrude(height = shelf_thickness, center = true) {
+            shelf_shape();
+        }
+    }
+
+    color("#AAAAAA") {
+        render() {
+            base();
+        }
+    }
 }

+ 33 - 0
assets/thread.scad

@@ -0,0 +1,33 @@
+include <../config/thread.scad>
+
+module thread_object(screw = false) {
+    module base_object() {
+        translate([0, 0, -thread_height / 2]) {
+            cylinder(r = thread_diameter / 2, h = thread_height);
+            cylinder(r = thread_top_diameter / 2, h = thread_top_height);
+        }
+    }
+
+    module screw() {
+        cylinder(r = thread_screw / 2, h = thread_height, center = true);
+    }
+
+    module final_object() {
+        if (!screw) {
+            base_object();
+        } else {
+            difference() {
+                base_object();
+                screw();
+            }
+        }
+    }
+
+    render() {
+        final_object();
+    }
+}
+
+module thread_screw_object(height = 5) {
+    cylinder(r = thread_screw / 2, h = height, center = true);
+}

+ 13 - 3
config/shelf.scad

@@ -1,5 +1,15 @@
-shelf_rounding = 5;
+shelf_rounding = 6;
+shelf_width = 230;
+shelf_depth = 190;
+shelf_thickness = 3;
 shelf_angle_depth = 50;
-shelf_angle_height = 90;
+shelf_angle_height = 60;
 shelf_angle_thickness = 10;
-shelf_thickness = 3;
+shelf_vesa_holes_enable = true;
+shelf_vesa_hole = 4;
+shelf_vesa_holes_width = 75;
+shelf_vesa_holes_depth = 75;
+shelf_vesa_holes_move = [0, 50];
+shelf_inside_holes_enable = true;
+shelf_inside_hole = 3;
+shelf_inside_holes_space = 20;

+ 5 - 0
config/thread.scad

@@ -0,0 +1,5 @@
+thread_screw = 3;
+thread_height = 9;
+thread_diameter = 5;
+thread_top_height = 1;
+thread_top_diameter = 8;

+ 5 - 0
manufacture/shelf.2D.scad

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

+ 11 - 0
manufacture/shelf.3D.scad

@@ -0,0 +1,11 @@
+include <../assets/shelf.scad>
+
+$fn = 100;
+
+translate([shelf_angle_depth / 1.5, 0, 0]) {
+    shelf_angle_object();
+}
+
+translate([-shelf_angle_depth / 1.5, 0, 0]) {
+    shelf_angle_object();
+}

+ 27 - 1
renders/shelf.scad

@@ -1,3 +1,29 @@
 include <../assets/shelf.scad>
 
-shelf_angle();
+$fn = 100;
+
+angle_move_x = (
+    shelf_width 
+    - shelf_width 
+    % wall_holes_space
+) / 2;
+
+angle_move_y = -(
+    shelf_depth / 2
+    - shelf_angle_depth / 2
+);
+
+translate([angle_move_x, angle_move_y, 0]) {
+    rotate([90, 0, 90]) {
+        shelf_angle_object();
+    }
+}
+
+translate([-angle_move_x, angle_move_y, 0]) {
+    rotate([90, 0, 90]) {
+        shelf_angle_object();
+    }
+}
+
+
+shelf_object();

+ 5 - 0
renders/thread.scad

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