include include include include include <../config/global.scad> include <../config/side.scad> function side_size() = [ side_motherboard_size.y + side_padding * 2, side_height + side_padding * 2 ]; module side_shape() { width = side_size().x; height = side_size().y; make_pattern = side_pattern; padding = side_padding; rounding = side_rounding; module corner(vector = [0, 0]) { translate(vector) { circle(r = rounding); } } module base_shape() { hull() { for (count = square_vector(width, height, rounding)) { corner(count); } } } module angle_hole() { top_move_y = height / 2 - angle_depth / 2 + plywood_thickness; right_move_x = -width / 2 + angle_depth / 2 - plywood_thickness; translate([0, top_move_y]) { angle_cutoff(top = false); } translate([right_move_x, 0]) { rotate(90) { angle_cutoff(top = true); } } } module final() { difference() { base_shape(); angle_hole(); if (make_pattern) { pattern(width, height); } } } render() { final(); } } module side_object() { height = plywood_thickness; color("#CCFFCC") { render() { linear_extrude(height = height, center = true) { side_shape(); } } } }