include include include include include <../config/global.scad> include <../config/front.scad> function front_size() = [ front_motherboard_size.x + front_padding * 2, front_height + front_padding * 2 ]; module front_shape() { padding = front_padding; rounding = front_rounding; size = front_size(); width = size.x; height = size.y; module corner(vector) { translate(vector) { circle(r = rounding); } } module base_shape() { hull() { for (count = square_vector(width, height, rounding)) { corner(count); } } } module mounting_cutoff() { move_y = height / 2 - angle_depth / 2 + plywood_thickness / 2; move_x = width / 2 - angle_depth / 2 + plywood_thickness / 2; module right_cutoff() { translate([move_x, 0]) { rotate(90) { angle_cutoff(); } } } translate([0, move_y]) { angle_cutoff(); } right_cutoff(); mirror([1, 0]) { right_cutoff(); } } difference() { base_shape(); mounting_cutoff(); if (front_addon) { addon_cutoff(); } } } module front_object() { height = plywood_thickness; color("#AAEEFF") { render() { linear_extrude(height = height, center = true) { front_shape(); } } } }