1
0
mirror of https://github.com/pgrondek/SixInchRack.git synced 2024-11-22 20:13:42 +00:00
SixInchRack/RackCabinets/SMSLSA50/case.scad

204 lines
6.0 KiB
OpenSCAD
Raw Permalink Normal View History

include<../sixinch_library.scad>
2019-06-24 19:24:08 +00:00
debug = false;
if (debug) {
$fn = 16;
color("red") {
sa50();
}
}
//////////////////////////////////////////////////
// PASTE ALL OF: sixinch_library.scad IN HERE //
// Thingiverse can only accept one file. //
//////////////////////////////////////////////////
2019-06-24 19:24:08 +00:00
sa50_length = 117.5;
2019-07-05 16:47:51 +00:00
sa50_height = 39;
2019-06-30 20:21:48 +00:00
sa50_width = 88;
2019-06-25 20:47:00 +00:00
Part = "a"; // [a:All, b:FrontPlate, b2:FrontPlate2, c:Cabinet, d:Lid, e:BackPlate, f:Handles]
Units = 5;
2019-06-24 19:24:08 +00:00
Depth = sa50_length;
xoffset = (width - sa50_width) / 2;
yoffset = ((Units * unit) - sa50_height) / 2;
round_holes = [[xoffset + 12, yoffset + 14, 10],
[xoffset + 12, yoffset + 28, 10],
[xoffset + 35.5, yoffset + 10, 13],
[xoffset + 35.5, yoffset + 26, 13],
[xoffset + 54, yoffset + 10, 13],
[xoffset+ 54, yoffset + 26, 13],
[xoffset + 73, yoffset + 13.5, 7]];
go();
module go(){
rotate([90,0,-90]){
if(Part=="a"){
2019-06-24 19:24:08 +00:00
lower() {
frontplate(Units,[],[],[],[Units/2],[45],[45]);
}
upper() {
frontplate(Units,[],[],[],[Units/2],[45],[45]);
}
cabinet_supported () {
cabinet(Depth,Units,[45],[],[Units/2]);
}
lid_supported () {
lid(Depth,Units,[45],[45]);
}
back_plate(Units, Depth, [45], [45], [Units/2], [], round_holes);
handle(Units,false);
}else if(Part=="b"){
lower() {
frontplate(Units,[],[],[],[Units/2],[45],[45]);
}
}else if(Part=="b2"){
upper() {
frontplate(Units,[],[],[],[Units/2],[45],[45]);
}
}else if(Part=="c"){
2019-06-24 19:24:08 +00:00
cabinet_supported () {
cabinet(Depth,Units,[45],[],[Units/2]);
}
}else if(Part=="d"){
2019-06-24 19:24:08 +00:00
lid_supported () {
lid(Depth,Units,[45],[45]);
}
}else if(Part=="e"){
2019-06-24 19:24:08 +00:00
back_plate(Units, Depth, [45], [45], [Units/2], [], round_holes);
/* translate([-sa50_length, -sa50_width - ((sixinch - sa50_width) / 2), ((Units * unit) - sa50_height) / 2]) { */
/* cube([10, 10, 10]); */
/* } */
}else if(Part=="f"){
handle(Units,true);
}
}
}
module lower () {
difference() {
children();
2019-06-24 19:24:08 +00:00
rotate([0, 90, 90]){
sa50();
}
rotate([0, 90, 90]){
2019-07-05 16:48:31 +00:00
translate([0, 0, -sa50_height]) {
2019-06-24 19:24:08 +00:00
sa50();
}
}
}
}
module upper () {
2019-06-24 19:24:08 +00:00
intersection() {
children();
rotate([0, 90, 90]){
2019-07-05 16:48:31 +00:00
translate([0, 0, -sa50_height]) {
2019-06-24 19:24:08 +00:00
sa50();
}
}
}
rotate([-90,90,0]) {
translate([-6, -(width - sa50_width + 10), 2]) {
2019-07-05 16:49:19 +00:00
cube([3, 8, 12]);
2019-06-24 19:24:08 +00:00
}
translate([-6, - width - 10, 2]) {
2019-07-05 16:49:19 +00:00
cube([3, 8, 12]);
2019-06-24 19:24:08 +00:00
}
}
}
module lid_supported () {
children();
difference () {
union () {
translate([(sixinch - sa50_width) / 2 , (Units * unit), (sa50_length / 2) + 20]) {
rotate([90, 0, 0]) {
cylinder(h=20, r=5);
}
}
translate([((sixinch - sa50_width) / 2) + sa50_width, (Units * unit), (sa50_length / 2) + 20]) {
rotate([90, 0, 0]) {
cylinder(h=20, r=5);
}
}
}
rotate([0, 90, 90]){
sa50();
}
}
}
module cabinet_supported () {
children();
difference () {
union () {
2019-06-30 20:23:28 +00:00
translate([(sixinch - sa50_width) / 2, 25, (sa50_length / 2) - 45]) {
2019-06-24 19:24:08 +00:00
rotate([90, 0, 0]) {
2019-06-30 20:23:28 +00:00
cylinder(h=25, r=5);
2019-06-24 19:24:08 +00:00
}
}
2019-06-30 20:23:28 +00:00
translate([((sixinch - sa50_width) / 2) + sa50_width, 25, (sa50_length / 2) - 45]) {
2019-06-24 19:24:08 +00:00
rotate([90, 0, 0]) {
2019-06-30 20:23:28 +00:00
cylinder(h=25, r=5);
2019-06-24 19:24:08 +00:00
}
}
2019-06-30 20:23:28 +00:00
translate([(sixinch - sa50_width) / 2, 25, (sa50_length / 2)]) {
2019-06-24 19:24:08 +00:00
rotate([90, 0, 0]) {
2019-06-30 20:23:28 +00:00
cylinder(h=25, r=5);
2019-06-24 19:24:08 +00:00
}
}
2019-06-30 20:23:28 +00:00
translate([((sixinch - sa50_width) / 2) + sa50_width, 25, (sa50_length / 2)]) {
2019-06-24 19:24:08 +00:00
rotate([90, 0, 0]) {
2019-06-30 20:23:28 +00:00
cylinder(h=25, r=5);
2019-06-24 19:24:08 +00:00
}
}
difference () {
2019-06-30 20:23:28 +00:00
translate([((sixinch - sa50_width) / 2) + 5 + 10, 20, sa50_length - 12 - 5]) {
2019-06-24 19:24:08 +00:00
rotate([90, 0, 0]) {
cylinder(h=20, r=5 + 2);
}
}
2019-06-30 20:23:28 +00:00
translate([((sixinch - sa50_width) / 2) + 5 + 10, 20, sa50_length - 12]) {
2019-06-25 20:47:00 +00:00
rotate([90, 0, 0]) {
cylinder(h=8, r=5.5);
2019-06-24 19:24:08 +00:00
}
}
}
difference () {
2019-06-30 20:22:51 +00:00
translate([((sixinch - sa50_width) / 2) + sa50_width - 5 - 10, 20, sa50_length - 12 - 5]) {
2019-06-24 19:24:08 +00:00
rotate([90, 0, 0]) {
cylinder(h=20, r=5 + 2);
}
}
2019-06-30 20:22:51 +00:00
translate([((sixinch - sa50_width) / 2) + sa50_width - 5 - 10, 20, sa50_length - 12]) {
2019-06-25 20:47:00 +00:00
rotate([90, 0, 0]) {
cylinder(h=8, r=5.5);
2019-06-24 19:24:08 +00:00
}
}
}
}
rotate([0, 90, 90]){
sa50();
}
}
}
module sa50 () {
rotate([0,0,0]) {
translate([-sa50_length, -sa50_width - ((sixinch - sa50_width) / 2), ((Units * unit) - sa50_height) / 2]) {
cube([sa50_length, sa50_width, sa50_height ]);
}
}
}