// Builds a door with default measurements // Usage: door(open_rotation = 45) // The open_rotation parameter rotates the door in the z-plane. module door(open_rotation = 45) { frame_depth = 65; frame_outer_list_width = 45; frame_outer_receded_width = 15; door_width = 775; door_depth = 50; door_height = 2100; door_to_ground = 15; door_to_frame = 3; door_outline(); //door_list_receded(); door_door(); module door_outline() { difference() { cube([ door_width + 2 * door_to_frame + 2 * (frame_outer_list_width + frame_outer_receded_width), door_depth + 2 * frame_depth, door_to_ground + door_height + door_to_frame + frame_depth ]); translate([frame_outer_list_width, 0, 0]) door_list_receded(); } } module door_list_receded() { difference() { color("yellow") cube([ door_width + 2 * door_to_frame + 2 * frame_outer_receded_width, door_depth + 2 * frame_depth, door_to_ground + door_height + door_to_frame ]); } } module door_door() { translate([ frame_depth + door_to_frame, frame_depth, door_to_ground ]) rotate([0, 0, open_rotation]) cube([ door_width, door_depth, door_height ]); } }