Browse Source

Add holes to anger.

cixo 1 year ago
parent
commit
15a4e8a451
5 changed files with 84 additions and 1 deletions
  1. 47 1
      assets/angler.scad
  2. 3 0
      config/angler.scad
  3. 15 0
      make/make.2D.sh
  4. 15 0
      make/make.3D.sh
  5. 4 0
      manufacture/angler.3D.scad

+ 47 - 1
assets/angler.scad

@@ -6,6 +6,9 @@ module angler_object() {
     width = angler_width;
     thickness = angler_thickness;
     rounding = thickness / 2;
+    hole = angler_hole;
+    holes_count = angler_holes_count;
+    hole_margin = angler_hole_margin;
 
     module outside_shape() {
         move_x = angler_depth / 2 - rounding;
@@ -83,5 +86,48 @@ module angler_object() {
         }
     }
 
-    base_object();
+    module holes_object() {
+        move_x_top = thickness - hole / 2 + hole_margin - depth / 2;
+        move_x_bottom = depth / 2 - hole / 2 - hole_margin;
+        move_z_top = height / 2 - thickness - hole / 2 - hole_margin;
+        move_z_bottom = hole / 2 + hole_margin - height / 2;
+        normal_width = width - thickness * 2 - hole - hole_margin * 2;
+        move_y = normal_width / 2;
+        space = normal_width / (holes_count - 1);
+
+        for (count = [-move_y : space : move_y]) {
+            translate([move_x_top, count, 0]) {
+                cylinder(r = hole / 2, h = height, center = true); 
+            }
+
+            translate([move_x_bottom, count, 0]) {
+                cylinder(r = hole / 2, h = height, center = true); 
+            }
+            
+            translate([0, count, move_z_top]) {
+                rotate([0, 90, 0]) {
+                    cylinder(r = hole / 2, h = height, center = true); 
+                }
+            }
+
+            translate([0, count, move_z_bottom]) {
+                rotate([0, 90, 0]) {
+                    cylinder(r = hole / 2, h = height, center = true); 
+                }
+            }
+        }
+    }
+
+    module final_object() {
+        render() {
+            difference() {
+                base_object();
+                holes_object();
+            }
+        }
+    }
+
+    color("#005500") {
+        final_object();
+    }
 }

+ 3 - 0
config/angler.scad

@@ -2,3 +2,6 @@ angler_depth = 50;
 angler_height = 50;
 angler_thickness = 5;
 angler_width = 50;
+angler_hole = 3;
+angler_holes_count = 2;
+angler_hole_margin = 7;

+ 15 - 0
make/make.2D.sh

@@ -0,0 +1,15 @@
+#!/bin/bash
+
+script=$(dirname $0)
+manufacture=$script/../manufacture/
+build=$script/../build.2D/
+
+rm -rf $build
+mkdir $build
+
+for count in $(ls $manufacture/*.2D.scad); do
+    input=$(basename $count .2D.scad)
+    output=$build/$input.dxf
+
+    openscad $count -o $output 
+done

+ 15 - 0
make/make.3D.sh

@@ -0,0 +1,15 @@
+#!/bin/bash
+
+script=$(dirname $0)
+manufacture=$script/../manufacture/
+build=$script/../build.3D/
+
+rm -rf $build
+mkdir $build
+
+for count in $(ls $manufacture/*.3D.scad); do
+    input=$(basename $count .3D.scad)
+    output=$build/$input.stl
+
+    openscad $count -o $output 
+done

+ 4 - 0
manufacture/angler.3D.scad

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