| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 | 
							- include <../config/angler.scad>
 
- module angler_object() {
 
-     depth = angler_depth;
 
-     height = angler_height;
 
-     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;
 
-         move_y = angler_height / 2 - rounding;
 
-         hull() {
 
-             translate([-move_x, move_y]) {
 
-                 square(rounding * 2, center = true);
 
-             }
 
-             translate([move_x, move_y]) {
 
-                 circle(r = rounding);
 
-             }
 
-             translate([-move_x, -move_y]) {
 
-                 circle(r = rounding);
 
-             }
 
-         }
 
-     }
 
-     module outside_object() {
 
-         rotate([90, 0, 0]) {
 
-             linear_extrude(height = angler_thickness, center = true) {
 
-                 outside_shape();
 
-             }
 
-         }
 
-     }
 
-     module inside_shape() {
 
-         move_x = depth / 2 - rounding;
 
-         move_y = height / 2 - rounding;
 
-         hull() {
 
-             translate([-move_x, move_y]) {
 
-                 square(rounding * 2, center = true);
 
-             }
 
-             translate([move_x, move_y]) {
 
-                 circle(r = rounding);
 
-             }
 
-         }
 
-         hull() {
 
-             translate([-move_x, move_y]) {
 
-                 square(rounding * 2, center = true);
 
-             }
 
-             translate([-move_x, -move_y]) {
 
-                 circle(r = rounding);
 
-             }
 
-         }
 
-     }
 
-     module inside_object() {
 
-         rotate([90, 0, 0]) {
 
-             size = width - thickness * 2;
 
-             linear_extrude(height = size, center = true) {
 
-                 inside_shape();
 
-             }
 
-         }
 
-     }
 
-     
 
-     module base_object() {
 
-         move = width / 2 - thickness / 2;
 
-         inside_object();
 
-         translate([0, move, 0]) {
 
-             outside_object();
 
-         }
 
-         translate([0, -move, 0]) {
 
-             outside_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();
 
-     }
 
- }
 
 
  |