Ver código fonte

Change hole names to standard convention.

cixo 1 ano atrás
pai
commit
c9a5809955
5 arquivos alterados com 27 adições e 18 exclusões
  1. 10 10
      assets/hole.scad
  2. 12 4
      assets/wall.scad
  3. 2 2
      config/hole.scad
  4. 2 1
      config/wall.scad
  5. 1 1
      renders/wall.scad

+ 10 - 10
assets/hole.scad

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

+ 12 - 4
assets/wall.scad

@@ -47,18 +47,18 @@ module wall_mount_screws() {
 
 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_without_margin = width_without_screws_margin - hole_entrance * 2;
     width = width_without_margin - width_without_margin % wall_holes_space;
 
     for (count = [-width / 2 : wall_holes_space : width / 2]) {
         translate([count, 0]) {
-            hole();
+            hole_shape();
         }
     }
 }
 
 module wall_holes() {
-    hole_height = entrance_hole * 2 + holding_hole * 3;
+    hole_height = hole_entrance * 2 + hole_holding * 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;
@@ -77,9 +77,17 @@ module wall_with_mount_screw() {
     }
 }   
 
-module wall() {
+module wall_shape() {
     difference() {
         wall_with_mount_screw();
         wall_holes();
     }
 }
+
+module wall_object() {
+    color(wall_color) {
+        linear_extrude(height = wall_thickness) {
+            wall_shape();
+        }
+    }
+}

+ 2 - 2
config/hole.scad

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

+ 2 - 1
config/wall.scad

@@ -3,4 +3,5 @@ wall_width = 300;
 wall_height = 200;
 wall_rounding = 10;
 wall_mounting_screws = 13;
-
+wall_thickness = 3;
+wall_color = "gray";

+ 1 - 1
renders/wall.scad

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