Project multi box
From MakeICT Wiki
Revision as of 19:09, 27 December 2016 by James Lancaster (talk | contribs) (Prototype for the multi-area box)
//Sides=2*3*5*7*11*13*17; (Each number corresponds to a side, 2= top, 5 = bottom, and 13,17 are the sides) Sides=3*7; thickness_top=2.4; //Used for side 2 thickness_side=2.3; thickness_bottom=1; //used for side 5 outer=30; slot_thickness=1; side_thickness=2; bottom_slot_thickness = -2; //Use negatives for NO lip. Also, check to make sure it gets to the inner box! inner=outer-side_thickness*2+0.1; difference(){ cube([outer,outer,outer]); translate([side_thickness,side_thickness,side_thickness]) { cube([inner,inner,inner]); } if (Sides % 2 != 0) { translate([slot_thickness,slot_thickness,outer-thickness_top-side_thickness]){ cube([outer-slot_thickness*2,outer-slot_thickness*1+0.01,thickness_top]); } translate([side_thickness,side_thickness,outer-thickness_top-side_thickness-0.001]){ cube([outer-side_thickness*2,outer-side_thickness*2,thickness_top+2+0.02]); } } if (Sides % 5 != 0) { if (bottom_slot_thickness >= 0){ translate([slot_thickness,slot_thickness,thickness_bottom]){ cube([outer-slot_thickness*2,outer-slot_thickness*1+0.01,thickness_bottom]); } translate([side_thickness,side_thickness,0]){ cube([outer-side_thickness*2,outer-side_thickness*2,thickness_bottom]); } } else { translate([slot_thickness,slot_thickness,-0.02]){ cube([outer-slot_thickness*2,outer-slot_thickness*2,thickness_bottom-bottom_slot_thickness+0.02]); } } } if (Sides %3 != 0) { translate([0,outer+0.01,0]) { rotate([90,0,0]) { translate([slot_thickness,slot_thickness,side_thickness]){ cube([outer-slot_thickness*2,outer-slot_thickness*1+0.01,thickness_bottom]); } translate([side_thickness,side_thickness,0]){ cube([outer-side_thickness*2,outer-side_thickness*2,thickness_bottom+2]); } } } } if (Sides %7 != 0) { translate([0,outer-0.01,0]) { rotate([90,0,0]) { translate([slot_thickness,slot_thickness,outer-thickness_top-side_thickness]){ cube([outer-slot_thickness*2,outer-slot_thickness*1,thickness_top]); } translate([side_thickness,side_thickness,outer-thickness_top-side_thickness]){ cube([outer-side_thickness*2,outer-side_thickness*2,thickness_top+2]); } } } } }