Browse Source

Add first version of the mounting hole shape and base wall.

Cixo 1 year ago
parent
commit
b017dbde2a
6 changed files with 128 additions and 0 deletions
  1. 27 0
      assets/hole.scad
  2. 85 0
      assets/wall.scad
  3. 2 0
      config/hole.scad
  4. 6 0
      config/wall.scad
  5. 4 0
      renders/hole.scad
  6. 4 0
      renders/wall.scad

+ 27 - 0
assets/hole.scad

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

+ 85 - 0
assets/wall.scad

@@ -0,0 +1,85 @@
+include <hole.scad>
+include <../config/wall.scad>
+
+module wall_base_shape() {
+    move_x = wall_width / 2 - wall_rounding;
+    move_y = wall_height / 2 - wall_rounding;
+    
+    hull() {
+        translate([move_x, move_y]) {
+            circle(r = wall_rounding);
+        }
+
+        translate([move_x, -move_y]) {
+            circle(r = wall_rounding);
+        }
+
+        translate([-move_x, -move_y]) {
+            circle(r = wall_rounding);
+        }
+
+        translate([-move_x, move_y]) {
+            circle(r = wall_rounding);
+        }
+    }
+}
+
+module wall_mount_screws() {
+    move_x = wall_width / 2 - wall_mounting_screws;
+    move_y = wall_height / 2 - wall_mounting_screws;
+
+    translate([move_x, move_y]) {
+        circle(r = wall_mounting_screws / 2); 
+    }
+
+    translate([move_x, -move_y]) {
+        circle(r = wall_mounting_screws / 2); 
+    }
+
+    translate([-move_x, -move_y]) {
+        circle(r = wall_mounting_screws / 2); 
+    }
+
+    translate([-move_x, move_y]) {
+        circle(r = wall_mounting_screws / 2); 
+    }
+}
+
+module wall_holes_on_x() {
+    width_without_screws_margin = wall_width - wall_mounting_screws * 3;
+    width_without_margin = width_without_screws_margin - entrance_hole * 2;
+    width = width_without_margin - width_without_margin % wall_holes_space;
+
+    for (count = [-width / 2 : wall_holes_space : width / 2]) {
+        translate([count, 0]) {
+            hole();
+        }
+    }
+}
+
+module wall_holes() {
+    hole_height = entrance_hole * 2 + holding_hole * 3;
+    height_without_screws_margin = wall_height - wall_mounting_screws * 3;
+    height_without_margin = height_without_screws_margin - hole_height;
+    height = height_without_margin - height_without_margin % wall_holes_space;
+
+    for (count = [-height / 2 : wall_holes_space : height / 2]) {
+        translate([0, count]) {
+            wall_holes_on_x();
+        }
+    }
+}
+
+module wall_with_mount_screw() {
+    difference() {
+        wall_base_shape();
+        wall_mount_screws();
+    }
+}   
+
+module wall() {
+    difference() {
+        wall_with_mount_screw();
+        wall_holes();
+    }
+}

+ 2 - 0
config/hole.scad

@@ -0,0 +1,2 @@
+entrance_hole = 6;
+holding_hole = 3;

+ 6 - 0
config/wall.scad

@@ -0,0 +1,6 @@
+wall_holes_space = 40;
+wall_width = 300;
+wall_height = 200;
+wall_rounding = 10;
+wall_mounting_screws = 13;
+

+ 4 - 0
renders/hole.scad

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

+ 4 - 0
renders/wall.scad

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