include <../config/hinge.scad> module hinge_object() { module mount_shape() { height = hinge_height; width = hinge_screw + hinge_walls * 2; radius = width / 2; move_y = height / 2; module mount_base() { hull() { translate([0, move_y]) { circle(r = radius); } translate([0, -move_y]) { circle(r = radius); } } } module mount_holes() { space = height / (hinge_screws_count - 1); for (count = [-move_y : space : move_y]) { translate([0, count]) { circle(r = hinge_screw / 2); } } } difference() { mount_base(); mount_holes(); } } module mount_object() { linear_extrude(height = hinge_thickness, center = true) { mount_shape(); } } mount_object(); }