// this file: // https://dataswamp.org/~incal/metal-shelf/metal-shelf.scad // // data: // https://www.color-name.com/wood.color // plywood wood_clr = "#ba8c63"; plywood = 2.5; // upright upr_x = 4.4; upr_y = 4.4; upr_z = 245.5; upr = [upr_x, upr_y, upr_z]; // shelf shf_x = 25.5; shf_y = 90.0; shf_z = plywood; shf = [shf_x, shf_y, shf_z]; // console con_x = plywood; con_y = 7.7; con_z = 4.5; con = [con_x, con_y, con_z]; color(wood_clr) { // rear uprights translate([0, 0, 0]) cube(upr, false); translate([0, shf_y - upr_y/2, 0]) cube(upr, false); translate([0, 2*shf_y - upr_y/2, 0]) cube(upr, false); translate([0, 3*shf_y - upr_y, 0]) cube(upr, false); // front uprights front = upr_x + shf_x; translate([front, 0, 0]) cube(upr, false); translate([front, shf_y - upr_y/2, 0]) cube(upr, false); translate([front, 2*shf_y - upr_y/2, 0]) cube(upr, false); translate([front, 3*shf_y - upr_y, 0]) cube(upr, false); /* shelves */ parts = 7; // bottom (1) bot = upr_z/parts; translate([upr_x, 0, bot]) cube(shf, false); translate([upr_x, shf_y, bot]) cube(shf, false); translate([upr_x, 2*shf_y, bot]) cube(shf, false); // smallest (4) small = (parts - 2)*bot; translate([upr_x, 0, small]) cube(shf, false); translate([upr_x, shf_y, small]) cube(shf, false); translate([upr_x, 2*shf_y, small]) cube(shf, false); // top (5) top = (parts - 1)*bot; translate([upr_x, 0, top]) cube(shf, false); translate([upr_x, shf_y, top]) cube(shf, false); translate([upr_x, 2*shf_y, top]) cube(shf, false); // second biggest (2) sec = bot + (small - bot)*(3/5); translate([upr_x, 0, sec]) cube(shf, false); translate([upr_x, shf_y, sec]) cube(shf, false); translate([upr_x, 2*shf_y, sec]) cube(shf, false); }