more rack bay work, fixes and code cleanup
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
NAME: case_rack
|
NAME: case_rack
|
||||||
DESCRIPTION: creates a U1-U4 rack case
|
DESCRIPTION: creates a 1u-2u rack case
|
||||||
TODO: none
|
TODO: none
|
||||||
|
|
||||||
USAGE: case_rack(case_design,side)
|
USAGE: case_rack(case_design,side)
|
||||||
@@ -177,6 +177,7 @@ if(side == "bottom") {
|
|||||||
cylinder(d=4*2/sqrt(3), h=2);
|
cylinder(d=4*2/sqrt(3), h=2);
|
||||||
|
|
||||||
for(r = [0:len(rack_bay_sbc)-1]) {
|
for(r = [0:len(rack_bay_sbc)-1]) {
|
||||||
|
if(rack_bay_sbc[r] != "empty") {
|
||||||
s = search([rack_bay_sbc[r]],sbc_data);
|
s = search([rack_bay_sbc[r]],sbc_data);
|
||||||
pcb_id = sbc_data[s[0]][4];
|
pcb_id = sbc_data[s[0]][4];
|
||||||
pcb_width = sbc_data[s[0]][10][0];
|
pcb_width = sbc_data[s[0]][10][0];
|
||||||
@@ -190,6 +191,7 @@ if(side == "bottom") {
|
|||||||
pcb_loc_x = rack_bay_rotation[r] == 90 ? rack_bay_xyz_loc[r][0] + pcb_width : rack_bay_rotation[r] == 180 ? rack_bay_xyz_loc[r][0] + pcb_width : rack_bay_xyz_loc[r][0];
|
pcb_loc_x = rack_bay_rotation[r] == 90 ? rack_bay_xyz_loc[r][0] + pcb_width : rack_bay_rotation[r] == 180 ? rack_bay_xyz_loc[r][0] + pcb_width : rack_bay_xyz_loc[r][0];
|
||||||
pcb_loc_y = rack_bay_rotation[r] == 270 ? rack_bay_xyz_loc[r][1]+pcb_width : rack_bay_rotation[r] == 180 ? rack_bay_xyz_loc[r][1]+pcb_depth : rack_bay_xyz_loc[r][1];
|
pcb_loc_y = rack_bay_rotation[r] == 270 ? rack_bay_xyz_loc[r][1]+pcb_width : rack_bay_rotation[r] == 180 ? rack_bay_xyz_loc[r][1]+pcb_depth : rack_bay_xyz_loc[r][1];
|
||||||
pcb_loc_z = rack_bay_xyz_loc[r][2];
|
pcb_loc_z = rack_bay_xyz_loc[r][2];
|
||||||
|
|
||||||
translate([pcb_loc_x,pcb_loc_y,pcb_loc_z]) rotate([0,0,rack_bay_rotation[r]]) union() {
|
translate([pcb_loc_x,pcb_loc_y,pcb_loc_z]) rotate([0,0,rack_bay_rotation[r]]) union() {
|
||||||
// pcb standoff holes
|
// pcb standoff holes
|
||||||
if(sbc_bottom_standoffs == true && rack_bay_sbc[r] != "empty") {
|
if(sbc_bottom_standoffs == true && rack_bay_sbc[r] != "empty") {
|
||||||
@@ -276,7 +278,9 @@ if(side == "bottom") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} }
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// extended standoff holes
|
// extended standoff holes
|
||||||
if(ext_bottom_standoffs == true) {
|
if(ext_bottom_standoffs == true) {
|
||||||
// right-rear standoff
|
// right-rear standoff
|
||||||
@@ -345,6 +349,7 @@ if(side == "bottom") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(r = [0:len(rack_bay_sbc)-1]) {
|
for(r = [0:len(rack_bay_sbc)-1]) {
|
||||||
|
if(rack_bay_sbc[r] != "empty") {
|
||||||
s = search([rack_bay_sbc[r]],sbc_data);
|
s = search([rack_bay_sbc[r]],sbc_data);
|
||||||
pcb_id = sbc_data[s[0]][4];
|
pcb_id = sbc_data[s[0]][4];
|
||||||
pcb_width = sbc_data[s[0]][10][0];
|
pcb_width = sbc_data[s[0]][10][0];
|
||||||
@@ -358,9 +363,10 @@ if(side == "bottom") {
|
|||||||
pcb_loc_x = rack_bay_rotation[r] == 90 ? rack_bay_xyz_loc[r][0] + pcb_width : rack_bay_rotation[r] == 180 ? rack_bay_xyz_loc[r][0] + pcb_width : rack_bay_xyz_loc[r][0];
|
pcb_loc_x = rack_bay_rotation[r] == 90 ? rack_bay_xyz_loc[r][0] + pcb_width : rack_bay_rotation[r] == 180 ? rack_bay_xyz_loc[r][0] + pcb_width : rack_bay_xyz_loc[r][0];
|
||||||
pcb_loc_y = rack_bay_rotation[r] == 270 ? rack_bay_xyz_loc[r][1]+pcb_width : rack_bay_rotation[r] == 180 ? rack_bay_xyz_loc[r][1]+pcb_depth : rack_bay_xyz_loc[r][1];
|
pcb_loc_y = rack_bay_rotation[r] == 270 ? rack_bay_xyz_loc[r][1]+pcb_width : rack_bay_rotation[r] == 180 ? rack_bay_xyz_loc[r][1]+pcb_depth : rack_bay_xyz_loc[r][1];
|
||||||
pcb_loc_z = rack_bay_xyz_loc[r][2];
|
pcb_loc_z = rack_bay_xyz_loc[r][2];
|
||||||
|
|
||||||
translate([pcb_loc_x,pcb_loc_y,pcb_loc_z]) rotate([0,0,rack_bay_rotation[r]]) union() {
|
translate([pcb_loc_x,pcb_loc_y,pcb_loc_z]) rotate([0,0,rack_bay_rotation[r]]) union() {
|
||||||
// primary pcb standoffs
|
// primary pcb standoffs
|
||||||
if(sbc_bottom_standoffs == true && rack_bay_sbc[r] != "empty") {
|
if(sbc_bottom_standoffs == true) {
|
||||||
for (i=[1:11:len(sbc_data[s[0]])-2]) {
|
for (i=[1:11:len(sbc_data[s[0]])-2]) {
|
||||||
class = sbc_data[s[0]][i+1];
|
class = sbc_data[s[0]][i+1];
|
||||||
type = sbc_data[s[0]][i+2];
|
type = sbc_data[s[0]][i+2];
|
||||||
@@ -550,7 +556,9 @@ if(side == "bottom") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} }
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// extended standoffs
|
// extended standoffs
|
||||||
if(ext_bottom_standoffs == true) {
|
if(ext_bottom_standoffs == true) {
|
||||||
// extended right-rear standoff
|
// extended right-rear standoff
|
||||||
@@ -722,6 +730,7 @@ if(side == "bottom") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(i = [0:len(rack_bay_sbc)-1]) {
|
for(i = [0:len(rack_bay_sbc)-1]) {
|
||||||
|
if(rack_bay_sbc[i] != "empty") {
|
||||||
s = search([rack_bay_sbc[i]],sbc_data);
|
s = search([rack_bay_sbc[i]],sbc_data);
|
||||||
pcb_id = sbc_data[s[0]][4];
|
pcb_id = sbc_data[s[0]][4];
|
||||||
pcb_width = sbc_data[s[0]][10][0];
|
pcb_width = sbc_data[s[0]][10][0];
|
||||||
@@ -747,7 +756,7 @@ if(side == "bottom") {
|
|||||||
translate([pcb_loc_x ,pcb_loc_y,bottom_height-pcb_z+pcb_loc_z-adj]) rotate([0,0,rack_bay_rotation[i]])
|
translate([pcb_loc_x ,pcb_loc_y,bottom_height-pcb_z+pcb_loc_z-adj]) rotate([0,0,rack_bay_rotation[i]])
|
||||||
sbc(rack_bay_sbc[i], cooling, fan_size, gpio_opening, uart_opening, true);
|
sbc(rack_bay_sbc[i], cooling, fan_size, gpio_opening, uart_opening, true);
|
||||||
}
|
}
|
||||||
// indents
|
/* // indents
|
||||||
if(indents == true) {
|
if(indents == true) {
|
||||||
for (i=[1:11:len(sbc_data[s[0]])-2]) {
|
for (i=[1:11:len(sbc_data[s[0]])-2]) {
|
||||||
class = sbc_data[s[0]][i+1];
|
class = sbc_data[s[0]][i+1];
|
||||||
@@ -773,9 +782,11 @@ if(side == "bottom") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
// case divide
|
// case divide
|
||||||
translate([150-gap-wallthick,-gap-wallthick,-adj]) cube([rack_asm_gap,depth,case_z+2*adj]);
|
translate([150-gap-wallthick,-gap-wallthick-1,-adj]) cube([rack_asm_gap,depth+2,case_z+2*adj]);
|
||||||
translate([300-gap-wallthick,-gap-wallthick,-adj]) cube([rack_asm_gap,depth,case_z+2*adj]);
|
translate([300-gap-wallthick,-gap-wallthick-1,-adj]) cube([rack_asm_gap,depth+2,case_z+2*adj]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// clean fillets
|
// clean fillets
|
||||||
if(case_design == "shell") {
|
if(case_design == "shell") {
|
||||||
|
|||||||
@@ -11081,7 +11081,7 @@
|
|||||||
"rack_bay6_rear_conduit": "true",
|
"rack_bay6_rear_conduit": "true",
|
||||||
"rack_bay6_rear_fan": "true",
|
"rack_bay6_rear_fan": "true",
|
||||||
"rack_bay6_rotation": "270",
|
"rack_bay6_rotation": "270",
|
||||||
"rack_bay6_xyz_loc": "[385, 0, 0]",
|
"rack_bay6_xyz_loc": "[383, 0, 0]",
|
||||||
"rack_size": "1u",
|
"rack_size": "1u",
|
||||||
"rack_width": "19",
|
"rack_width": "19",
|
||||||
"raise_top": "0",
|
"raise_top": "0",
|
||||||
@@ -11097,7 +11097,7 @@
|
|||||||
"sbc_information": "false",
|
"sbc_information": "false",
|
||||||
"sbc_model": "c4",
|
"sbc_model": "c4",
|
||||||
"sbc_off": "false",
|
"sbc_off": "false",
|
||||||
"sbc_top_standoffs": "true",
|
"sbc_top_standoffs": "false",
|
||||||
"section_part": "false",
|
"section_part": "false",
|
||||||
"sidethick": "5",
|
"sidethick": "5",
|
||||||
"standard_motherboard_thickness": "0",
|
"standard_motherboard_thickness": "0",
|
||||||
@@ -11129,7 +11129,7 @@
|
|||||||
"top_standoff_support_height": "4",
|
"top_standoff_support_height": "4",
|
||||||
"top_standoff_support_size": "10",
|
"top_standoff_support_size": "10",
|
||||||
"top_standoff_type": "blind",
|
"top_standoff_type": "blind",
|
||||||
"uart_opening": "default",
|
"uart_opening": "none",
|
||||||
"view": "model",
|
"view": "model",
|
||||||
"wallthick": "3"
|
"wallthick": "3"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,7 +123,6 @@ Rack_Bay6 = "empty"; // ["empty", "c1+", "c2", "c4", "hc4", "xu4", "xu4q", "mc1
|
|||||||
rack_bay6_xyz_loc = [0,0,0]; // [0:.5:450]
|
rack_bay6_xyz_loc = [0,0,0]; // [0:.5:450]
|
||||||
rack_bay6_rotation = 0; // [0:90:270]
|
rack_bay6_rotation = 0; // [0:90:270]
|
||||||
rack_bay6_face = "io_shield"; //["solid","blank","io_shield","vent_hex"]
|
rack_bay6_face = "io_shield"; //["solid","blank","io_shield","vent_hex"]
|
||||||
//rack_bay6_wall = false; // [true,false]
|
|
||||||
rack_bay6_rear_fan = false; //[true,false]
|
rack_bay6_rear_fan = false; //[true,false]
|
||||||
rack_bay6_rear_conduit = false; //[true,false]
|
rack_bay6_rear_conduit = false; //[true,false]
|
||||||
|
|
||||||
@@ -601,6 +600,26 @@ if (view == "platter") {
|
|||||||
case_bottom(case_design);
|
case_bottom(case_design);
|
||||||
translate([0,(2*depth)+20,case_z+floorthick]) rotate([180,0,0]) case_top(case_design);
|
translate([0,(2*depth)+20,case_z+floorthick]) rotate([180,0,0]) case_top(case_design);
|
||||||
}
|
}
|
||||||
|
if(case_design == "rack") {
|
||||||
|
case_rack(case_design,"bottom");
|
||||||
|
// rear fan covers
|
||||||
|
for(r = [0:len(rack_bay_sbc)-1]) {
|
||||||
|
fan_offset = -75+(75-rear_fan_size)/2;
|
||||||
|
if(rack_bay_rear_fan[r] == true) {
|
||||||
|
translate([-gap-wallthick-1+.125+75*(r+1)+fan_offset+8,
|
||||||
|
depth+10,(case_z-rear_fan_size)/2])
|
||||||
|
fan_cover(rear_fan_size, wallthick, rear_cooling);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// rear grommets
|
||||||
|
for(r = [0:len(rack_bay_sbc)-1]) {
|
||||||
|
grommet_offset = -75+11;
|
||||||
|
if(rack_bay_rear_conduit[r] == true) {
|
||||||
|
translate([-gap-wallthick-1+.125+75*(r+1)+grommet_offset,depth+30,0])
|
||||||
|
color("lightgrey") grommet("bottom", "sleeve", 10, r+2, wallthick, true, [false,10,0,"default"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if(case_design == "adapter_mini-stx_thin" || case_design == "adapter_mini-stx" || case_design == "adapter_mini-itx_thin" || case_design == "adapter_mini-itx" || case_design == "adapter_flex-atx" || case_design == "adapter_mini-dtx" || case_design == "adapter_dtx" || case_design == "adapter_micro-atx" || case_design == "adapter_atx" || case_design == "adapter_ssi-ceb" || case_design == "adapter_ssi-eeb") {
|
if(case_design == "adapter_mini-stx_thin" || case_design == "adapter_mini-stx" || case_design == "adapter_mini-itx_thin" || case_design == "adapter_mini-itx" || case_design == "adapter_flex-atx" || case_design == "adapter_mini-dtx" || case_design == "adapter_dtx" || case_design == "adapter_micro-atx" || case_design == "adapter_atx" || case_design == "adapter_ssi-ceb" || case_design == "adapter_ssi-eeb") {
|
||||||
color("dimgrey",1) case_adapter(case_design);
|
color("dimgrey",1) case_adapter(case_design);
|
||||||
color("dimgrey",1) translate([-180, 0, 4]) rotate([270,0,0]) io_shield();
|
color("dimgrey",1) translate([-180, 0, 4]) rotate([270,0,0]) io_shield();
|
||||||
@@ -1133,6 +1152,7 @@ if (view == "model") {
|
|||||||
}
|
}
|
||||||
if(sbc_off == false) {
|
if(sbc_off == false) {
|
||||||
for(i = [0:len(rack_bay_sbc)-1]) {
|
for(i = [0:len(rack_bay_sbc)-1]) {
|
||||||
|
if(rack_bay_sbc[i] != "empty") {
|
||||||
s = search([rack_bay_sbc[i]],sbc_data);
|
s = search([rack_bay_sbc[i]],sbc_data);
|
||||||
pcb_loc_z = rack_bay_xyz_loc[i][2];
|
pcb_loc_z = rack_bay_xyz_loc[i][2];
|
||||||
pcb_id = sbc_data[s[0]][4];
|
pcb_id = sbc_data[s[0]][4];
|
||||||
@@ -1154,6 +1174,7 @@ if (view == "model") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(case_design == "adapter_mini-stx_thin" || case_design == "adapter_mini-stx" || case_design == "adapter_mini-itx_thin" || case_design == "adapter_mini-itx" || case_design == "adapter_flex-atx" || case_design == "adapter_mini-dtx" || case_design == "adapter_dtx" || case_design == "adapter_micro-atx" || case_design == "adapter_atx" || case_design == "adapter_ssi-ceb" || case_design == "adapter_ssi-eeb") {
|
if(case_design == "adapter_mini-stx_thin" || case_design == "adapter_mini-stx" || case_design == "adapter_mini-itx_thin" || case_design == "adapter_mini-itx" || case_design == "adapter_flex-atx" || case_design == "adapter_mini-dtx" || case_design == "adapter_dtx" || case_design == "adapter_micro-atx" || case_design == "adapter_atx" || case_design == "adapter_ssi-ceb" || case_design == "adapter_ssi-eeb") {
|
||||||
color("dimgrey",1) case_adapter(case_design);
|
color("dimgrey",1) case_adapter(case_design);
|
||||||
if(sbc_off == false) {
|
if(sbc_off == false) {
|
||||||
|
|||||||
Reference in New Issue
Block a user