Created
January 28, 2022 00:29
-
-
Save GravisZro/dbb93bae9c246ad53f091a157f92aa50 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| board_thickness = 0.75; | |
| box_width = 44; | |
| box_depth = 5.5; | |
| cab_depth = 11.25; | |
| cab_height = 72.5; | |
| cab_spacing = 1; | |
| cab_indent = 2.0625; | |
| module build_box(width, height, depth) | |
| { | |
| board_width = height - 2 * board_thickness; | |
| back_length = width - 2 * board_thickness; | |
| top_offset = board_thickness + board_width; | |
| back_offset = depth - board_thickness; | |
| // bottom | |
| color( "green", 0.5 ) | |
| cube([width, depth, board_thickness],false); | |
| // top | |
| color( "purple", 0.5 ) | |
| translate([0, 0, top_offset]) | |
| cube([width, depth, board_thickness],false); | |
| color( "yellow", 0.5 ) | |
| { | |
| // left side | |
| translate([0, 0, board_thickness]) | |
| cube([board_thickness, depth, board_width],false); | |
| // right side | |
| translate([width - board_thickness, 0, board_thickness]) | |
| cube([board_thickness, depth, board_width],false); | |
| } | |
| // back | |
| color( "blue", 0.5 ) | |
| translate([board_thickness, back_offset, board_thickness]) | |
| cube([back_length, board_thickness, board_width],false); | |
| } | |
| translate([0, 0, cab_height]) | |
| { | |
| color( "red", 0.5 ) | |
| { | |
| translate([0, 0, -cab_height]) | |
| cube([board_thickness, cab_depth, cab_height],false); | |
| translate([box_width + board_thickness, 0, -cab_height]) | |
| cube([board_thickness, cab_depth, cab_height],false); | |
| } | |
| echo ("offset: ", 0 - (10.75 + cab_spacing)); | |
| translate([board_thickness, cab_indent, 0 - (10.75 + cab_spacing)]) | |
| rotate([-10,0,0]) | |
| build_box(box_width, 10.75, box_depth); | |
| echo ("offset: ", 0 - (10.75 + cab_spacing) - (10.75 + cab_spacing)); | |
| translate([board_thickness, cab_indent, 0 - (10.75 + cab_spacing) - (10.75 + cab_spacing)]) | |
| rotate([-10,0,0]) | |
| build_box(box_width, 10.75, box_depth); | |
| echo ("offset: ", 0 - (10.75 + cab_spacing) - (10.75 + cab_spacing) - (8.75 + cab_spacing)); | |
| translate([board_thickness, cab_indent, 0 - (10.75 + cab_spacing) - (10.75 + cab_spacing) - (8.75 + cab_spacing)]) | |
| rotate([-10,0,0]) | |
| build_box(box_width, 8.75, box_depth); | |
| echo ("offset: ", 0 - (10.75 + cab_spacing) - (10.75 + cab_spacing) - (8.75 + cab_spacing) - (8.75 + cab_spacing)); | |
| translate([board_thickness, cab_indent, 0 - (10.75 + cab_spacing) - (10.75 + cab_spacing) - (8.75 + cab_spacing) - (8.75 + cab_spacing)]) | |
| rotate([-10,0,0]) | |
| build_box(box_width, 8.75, box_depth); | |
| echo ("offset: ", 0 - (10.75 + cab_spacing) - (10.75 + cab_spacing) - (8.75 + cab_spacing) - (8.75 + cab_spacing) - (7 + cab_spacing)); | |
| translate([board_thickness, cab_indent, 0 - (10.75 + cab_spacing) - (10.75 + cab_spacing) - (8.75 + cab_spacing) - (8.75 + cab_spacing) - (7 + cab_spacing)]) | |
| rotate([-10,0,0]) | |
| build_box(box_width, 7, box_depth); | |
| echo ("offset: ", 0 - (10.75 + cab_spacing) - (10.75 + cab_spacing) - (8.75 + cab_spacing) - (8.75 + cab_spacing) - (7 + cab_spacing) - (7 + cab_spacing)); | |
| translate([board_thickness, cab_indent, 0 - (10.75 + cab_spacing) - (10.75 + cab_spacing) - (8.75 + cab_spacing) - (8.75 + cab_spacing) - (7 + cab_spacing) - (7 + cab_spacing)]) | |
| rotate([-10,0,0]) | |
| build_box(box_width, 7, box_depth); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment