created ui enable for individual top, bottom and extended standoffs with associated plumbing

This commit is contained in:
Edward Kisiel
2024-02-26 13:22:57 -05:00
parent d5d23fba18
commit e46ac774e4
3 changed files with 121 additions and 77 deletions

View File

@@ -332,7 +332,7 @@ module case_bottom(case_design) {
}
}
// pcb standoff holes
if(sbc_bottom_standoffs == true && bottom_standoff[5] != 4) {
if(sbc_bottom_standoffs == true) {
for (i=[1:11:len(sbc_data[s[0]])-2]) {
class = sbc_data[s[0]][i+1];
type = sbc_data[s[0]][i+2];
@@ -343,10 +343,23 @@ module case_bottom(case_design) {
pcbhole_size = sbc_data[s[0]][i+9][0];
pcbhole_pos = sbc_data[s[0]][i+10][4];
if(class == "pcbhole" && id == pcb_id && (pcbhole_pos == "left_rear" || pcbhole_pos == "left_front" ||
pcbhole_pos == "right_rear" || pcbhole_pos == "right_front")) {
translate([pcbhole_x,pcbhole_y,-1]) cylinder(d=6.5, h=bottom_height);
if (class == "pcbhole" && id == pcb_id && pcbhole_pos == "left_rear" &&
bottom_rear_left_enable == true && bottom_standoff[5] != "blind") {
translate([pcbhole_x,pcbhole_y,-1]) cylinder(d=6.5, h=bottom_height);
}
if (class == "pcbhole" && id == pcb_id && pcbhole_pos == "left_front" &&
bottom_front_left_enable == true && bottom_standoff[5] != "blind") {
translate([pcbhole_x,pcbhole_y,-1]) cylinder(d=6.5, h=bottom_height);
}
if (class == "pcbhole" && id == pcb_id && pcbhole_pos == "right_rear" &&
bottom_rear_right_enable == true && bottom_standoff[5] != "blind") {
translate([pcbhole_x,pcbhole_y,-1]) cylinder(d=6.5, h=bottom_height);
}
if (class == "pcbhole" && id == pcb_id && pcbhole_pos == "right_front" &&
bottom_front_right_enable == true && bottom_standoff[5] != "blind") {
translate([pcbhole_x,pcbhole_y,-1]) cylinder(d=6.5, h=bottom_height);
}
}
}
@@ -354,27 +367,30 @@ module case_bottom(case_design) {
// extended standoff holes
if(ext_bottom_standoffs == true) {
// right-rear standoff
if(width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 || pcb_loc_y >= 10) {
if(((width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 || pcb_loc_y >= 10)) &&
ext_bottom_rear_right_enable == true && ext_bottom_standoff[5] != "blind") {
translate([width-ext_bottom_standoff_support_size/4-(2*(wallthick+gap))-(corner_fillet/2),
(corner_fillet/2)+ext_bottom_standoff_support_size/4,-1]) cylinder(d=6.5, h=bottom_height);
}
// right-front standoff
if((width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 && depth-pcb_loc_y-pcb_depth >= 10) ||
if(((width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 && depth-pcb_loc_y-pcb_depth >= 10) ||
(width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 && depth-pcb_loc_y-pcb_depth <= 10) ||
(width-pcb_loc_x-pcb_width-(gap+2*wallthick) <= 10 && depth-pcb_loc_y-pcb_depth >= 10)) {
(width-pcb_loc_x-pcb_width-(gap+2*wallthick) <= 10 && depth-pcb_loc_y-pcb_depth >= 10)) &&
ext_bottom_front_right_enable == true && ext_bottom_standoff[5] != "blind") {
translate([width-ext_bottom_standoff_support_size/4-(corner_fillet/2)-(2*(wallthick+gap)),
depth-ext_bottom_standoff_support_size/4-(corner_fillet/2)-(2*(wallthick+gap)),-1])
cylinder(d=6.5, h=bottom_height);
}
// left-rear standoff
if(pcb_loc_x >= 10 || pcb_loc_y >= 10) {
if((pcb_loc_x >= 10 || pcb_loc_y >= 10) && ext_bottom_rear_left_enable == true && ext_bottom_standoff[5] != "blind") {
translate([(corner_fillet/2)+ext_bottom_standoff_support_size/4,
(corner_fillet/2)+ext_bottom_standoff_support_size/4,-1]) cylinder(d=6.5, h=bottom_height);
}
// left-front standoff
if((pcb_loc_x >= 10 && (depth-(pcb_loc_y+pcb_depth)) >= 10) ||
if(((pcb_loc_x >= 10 && (depth-(pcb_loc_y+pcb_depth)) >= 10) ||
(pcb_loc_x <= 10 && (depth-(pcb_loc_y+pcb_depth)) >= 10) ||
pcb_loc_x >= 10 && (depth-(pcb_loc_y+pcb_depth)) <= 10) {
(pcb_loc_x >= 10 && (depth-(pcb_loc_y+pcb_depth)) <= 10)) &&
ext_bottom_front_left_enable == true && ext_bottom_standoff[5] != "blind") {
translate([(corner_fillet/2)+ext_bottom_standoff_support_size/4,
depth-ext_bottom_standoff_support_size/4-(corner_fillet/2)-(2*(wallthick+gap)),-1])
cylinder(d=6.5, h=bottom_height);
@@ -393,8 +409,9 @@ module case_bottom(case_design) {
pcbhole_size = sbc_data[s[0]][i+9][0];
pcbhole_pos = sbc_data[s[0]][i+10][4];
if(class == "pcbhole" && id == pcb_id && (pcbhole_pos == "left_rear" || pcbhole_pos == "left_front" || pcbhole_pos == "right_rear" || pcbhole_pos == "right_front")) {
if (pcbhole_pos == "left_rear") {
if(class == "pcbhole" && id == pcb_id &&
(pcbhole_pos == "left_rear" || pcbhole_pos == "left_front" || pcbhole_pos == "right_rear" || pcbhole_pos == "right_front")) {
if (pcbhole_pos == "left_rear" && bottom_rear_left_enable == true) {
normal_standoff = [bottom_standoff[0],
bottom_height-pcb_z+pcb_loc_z+bottom_rear_left_adjust,
bottom_standoff[2],
@@ -409,7 +426,7 @@ module case_bottom(case_design) {
bottom_standoff[11]];
translate([pcbhole_x,pcbhole_y,0]) standoff(normal_standoff);
}
if (pcbhole_pos == "left_front") {
if (pcbhole_pos == "left_front" && bottom_front_left_enable == true) {
normal_standoff = [bottom_standoff[0],
bottom_height-pcb_z+pcb_loc_z+bottom_front_left_adjust,
bottom_standoff[2],
@@ -424,7 +441,7 @@ module case_bottom(case_design) {
bottom_standoff[11]];
translate([pcbhole_x,pcbhole_y,0]) standoff(normal_standoff);
}
if (pcbhole_pos == "right_rear") {
if (pcbhole_pos == "right_rear" && bottom_rear_right_enable == true) {
normal_standoff = [bottom_standoff[0],
bottom_height-pcb_z+pcb_loc_z+bottom_rear_right_adjust,
bottom_standoff[2],
@@ -439,7 +456,7 @@ module case_bottom(case_design) {
bottom_standoff[11]];
translate([pcbhole_x,pcbhole_y,0]) standoff(normal_standoff);
}
if (pcbhole_pos == "right_front") {
if (pcbhole_pos == "right_front" && bottom_front_right_enable == true) {
normal_standoff = [bottom_standoff[0],
bottom_height-pcb_z+pcb_loc_z+bottom_front_right_adjust,
bottom_standoff[2],
@@ -461,7 +478,7 @@ module case_bottom(case_design) {
// extended standoffs
if(ext_bottom_standoffs == true) {
// extended right-rear standoff
if(width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 || pcb_loc_y >= 10) {
if((width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 || pcb_loc_y >= 10) && ext_bottom_rear_right_enable == true) {
normal_standoff = [ext_bottom_standoff[0],
bottom_height+pcb_loc_z+ext_bottom_rear_right_adjust,
ext_bottom_standoff[2],
@@ -478,9 +495,10 @@ module case_bottom(case_design) {
(corner_fillet/2)+ext_top_standoff_support_size/4,0]) standoff(normal_standoff);
}
// extended right-front standoff
if((width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 && depth-pcb_loc_y-pcb_depth >= 10) ||
if(((width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 && depth-pcb_loc_y-pcb_depth >= 10) ||
(width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 && depth-pcb_loc_y-pcb_depth <= 10) ||
(width-pcb_loc_x-pcb_width-(gap+2*wallthick) <= 10 && depth-pcb_loc_y-pcb_depth >= 10)) {
(width-pcb_loc_x-pcb_width-(gap+2*wallthick) <= 10 && depth-pcb_loc_y-pcb_depth >= 10)) &&
ext_bottom_front_right_enable == true) {
normal_standoff = [ext_bottom_standoff[0],
bottom_height+pcb_loc_z+ext_bottom_front_right_adjust,
ext_bottom_standoff[2],
@@ -497,7 +515,7 @@ module case_bottom(case_design) {
depth-ext_top_standoff_support_size/4-(corner_fillet/2)-(2*(wallthick+gap)),0]) standoff(normal_standoff);
}
// extended left-rear standoff
if(pcb_loc_x >= 10 || pcb_loc_y >= 10) {
if((pcb_loc_x >= 10 || pcb_loc_y >= 10) && ext_bottom_rear_left_enable == true) {
normal_standoff = [ext_bottom_standoff[0],
bottom_height+pcb_loc_z+ext_bottom_rear_left_adjust,
ext_bottom_standoff[2],
@@ -514,9 +532,11 @@ module case_bottom(case_design) {
(corner_fillet/2)+ext_top_standoff_support_size/4,0]) standoff(normal_standoff);
}
// extended left-front standoff
if((pcb_loc_x >= 10 && (depth-(pcb_loc_y+pcb_depth)) >= 10) ||
(pcb_loc_x <= 10 && (depth-(pcb_loc_y+pcb_depth)) >= 10) ||
pcb_loc_x >= 10 && (depth-(pcb_loc_y+pcb_depth)) <= 10) {
if(((pcb_loc_x >= 10 && depth-(pcb_loc_y+pcb_depth) >= 10) ||
(pcb_loc_x <= 10 && depth-(pcb_loc_y+pcb_depth) >= 10) ||
(pcb_loc_x >= 10 && depth-(pcb_loc_y+pcb_depth) <= 10)) &&
ext_bottom_front_left_enable == true) {
echo(ext_bottom_front_left_enable);
normal_standoff = [ext_bottom_standoff[0],
bottom_height+pcb_loc_z+ext_bottom_front_left_adjust,
ext_bottom_standoff[2],

View File

@@ -272,7 +272,7 @@ module case_top(case_design) {
}
}
// pcb standoff holes
if(sbc_top_standoffs == true && top_standoff[5] != 4) {
if(sbc_top_standoffs == true) {
for (i=[1:11:len(sbc_data[s[0]])-2]) {
class = sbc_data[s[0]][i+1];
type = sbc_data[s[0]][i+2];
@@ -283,9 +283,16 @@ module case_top(case_design) {
pcbhole_size = sbc_data[s[0]][i+9][0];
pcbhole_pos = sbc_data[s[0]][i+10][4];
if (class == "pcbhole" && id == pcb_id &&
(pcbhole_pos == "left_rear" || pcbhole_pos == "left_front" ||
pcbhole_pos == "right_rear" || pcbhole_pos == "right_front")) {
if (class == "pcbhole" && id == pcb_id && pcbhole_pos == "left_rear" && top_rear_left_enable == true && top_standoff[5] != "blind") {
translate([pcbhole_x,pcbhole_y,top_height+1]) cylinder(d=6.5, h=top_height);
}
if (class == "pcbhole" && id == pcb_id && pcbhole_pos == "left_front" && top_front_left_enable == true && top_standoff[5] != "blind") {
translate([pcbhole_x,pcbhole_y,top_height+1]) cylinder(d=6.5, h=top_height);
}
if (class == "pcbhole" && id == pcb_id && pcbhole_pos == "right_rear" && top_rear_right_enable == true && top_standoff[5] != "blind") {
translate([pcbhole_x,pcbhole_y,top_height+1]) cylinder(d=6.5, h=top_height);
}
if (class == "pcbhole" && id == pcb_id && pcbhole_pos == "right_front" && top_front_right_enable == true && top_standoff[5] != "blind") {
translate([pcbhole_x,pcbhole_y,top_height+1]) cylinder(d=6.5, h=top_height);
}
}
@@ -293,27 +300,30 @@ module case_top(case_design) {
// extended standoff holes
if(ext_top_standoffs == true) {
// right-rear standoff
if(width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 || pcb_loc_y >= 10) {
if((width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 || pcb_loc_y >= 10) &&
ext_top_rear_right_enable == true && ext_top_standoff[5] != "blind") {
translate([width-ext_top_standoff_support_size/4-(2*(wallthick+gap))-(corner_fillet/2),
(corner_fillet/2)+ext_top_standoff_support_size/4,top_height+1]) cylinder(d=6.5, h=top_height);
}
// right-front standoff
if((width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 && depth-pcb_loc_y-pcb_depth >= 10) ||
if(((width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 && depth-pcb_loc_y-pcb_depth >= 10) ||
(width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 && depth-pcb_loc_y-pcb_depth <= 10) ||
(width-pcb_loc_x-pcb_width-(gap+2*wallthick) <= 10 && depth-pcb_loc_y-pcb_depth >= 10)) {
(width-pcb_loc_x-pcb_width-(gap+2*wallthick) <= 10 && depth-pcb_loc_y-pcb_depth >= 10)) &&
ext_top_front_right_enable == true && ext_top_standoff[5] != "blind") {
translate([width-ext_top_standoff_support_size/4-(corner_fillet/2)-(2*(wallthick+gap)),
depth-ext_top_standoff_support_size/4-(corner_fillet/2)-(2*(wallthick+gap)),top_height+1])
cylinder(d=6.5, h=top_height);
}
// left-rear standoff
if(pcb_loc_x >= 10 || pcb_loc_y >= 10) {
if((pcb_loc_x >= 10 || pcb_loc_y >= 10) && ext_top_rear_left_enable == true && ext_top_standoff[5] != "blind") {
translate([(corner_fillet/2)+ext_top_standoff_support_size/4,
(corner_fillet/2)+ext_top_standoff_support_size/4,top_height+1]) cylinder(d=6.5, h=top_height);
}
// left-front standoff
if((pcb_loc_x >= 10 && (depth-(pcb_loc_y+pcb_depth)) >= 10) ||
if(((pcb_loc_x >= 10 && (depth-(pcb_loc_y+pcb_depth)) >= 10) ||
(pcb_loc_x <= 10 && (depth-(pcb_loc_y+pcb_depth)) >= 10) ||
pcb_loc_x >= 10 && (depth-(pcb_loc_y+pcb_depth)) <= 10) {
(pcb_loc_x >= 10 && (depth-(pcb_loc_y+pcb_depth)) <= 10)) &&
ext_top_front_left_enable == true && ext_top_standoff[5] != "blind") {
translate([+(corner_fillet/2)+ext_top_standoff_support_size/4,
depth-ext_top_standoff_support_size/4-(corner_fillet/2)-(2*(wallthick+gap)),top_height+1])
cylinder(d=6.5, h=top_height+1);
@@ -335,7 +345,7 @@ module case_top(case_design) {
if(class == "pcbhole" && id == pcb_id &&
(pcbhole_pos == "left_rear" || pcbhole_pos == "left_front" || pcbhole_pos == "right_rear" || pcbhole_pos == "right_front")) {
if (pcbhole_pos == "left_rear") {
if (pcbhole_pos == "left_rear" && top_rear_left_enable == true) {
normal_standoff = [top_standoff[0],
top_height+pcb_loc_z+top_rear_left_adjust,
top_standoff[2],
@@ -350,7 +360,7 @@ module case_top(case_design) {
top_standoff[11]];
translate([pcbhole_x,pcbhole_y,case_z]) standoff(normal_standoff);
}
if (pcbhole_pos == "left_front") {
if (pcbhole_pos == "left_front" && top_front_left_enable == true) {
normal_standoff = [top_standoff[0],
top_height+pcb_loc_z+top_front_left_adjust,
top_standoff[2],
@@ -365,7 +375,7 @@ module case_top(case_design) {
top_standoff[11]];
translate([pcbhole_x,pcbhole_y,case_z]) standoff(normal_standoff);
}
if (pcbhole_pos == "right_rear") {
if (pcbhole_pos == "right_rear" && top_rear_right_enable == true) {
normal_standoff = [top_standoff[0],
top_height+pcb_loc_z+top_rear_right_adjust,
top_standoff[2],
@@ -380,7 +390,7 @@ module case_top(case_design) {
top_standoff[11]];
translate([pcbhole_x,pcbhole_y,case_z]) standoff(normal_standoff);
}
if (pcbhole_pos == "right_front") {
if (pcbhole_pos == "right_front" && top_front_right_enable == true) {
normal_standoff = [top_standoff[0],
top_height+pcb_loc_z+top_front_right_adjust,
top_standoff[2],
@@ -401,7 +411,7 @@ module case_top(case_design) {
// extended standoffs
if(ext_top_standoffs == true) {
// extended right-rear standoff
if(width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 || pcb_loc_y >= 10) {
if((width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 || pcb_loc_y >= 10) && ext_top_rear_right_enable == true) {
normal_standoff = [ext_top_standoff[0],
top_height+pcb_loc_z+ext_top_rear_right_adjust,
ext_top_standoff[2],
@@ -418,9 +428,10 @@ module case_top(case_design) {
(corner_fillet/2)+ext_top_standoff_support_size/4,case_z]) standoff(normal_standoff);
}
// extended right-front standoff
if((width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 && depth-pcb_loc_y-pcb_depth >= 10) ||
if(((width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 && depth-pcb_loc_y-pcb_depth >= 10) ||
(width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 && depth-pcb_loc_y-pcb_depth <= 10) ||
(width-pcb_loc_x-pcb_width-(gap+2*wallthick) <= 10 && depth-pcb_loc_y-pcb_depth >= 10)) {
(width-pcb_loc_x-pcb_width-(gap+2*wallthick) <= 10 && depth-pcb_loc_y-pcb_depth >= 10)) &&
ext_top_front_right_enable == true) {
normal_standoff = [ext_top_standoff[0],
top_height+pcb_loc_z+ext_top_front_right_adjust,
ext_top_standoff[2],
@@ -438,7 +449,7 @@ module case_top(case_design) {
standoff(normal_standoff);
}
// extended left-rear standoff
if(pcb_loc_x >= 10 || pcb_loc_y >= 10) {
if((pcb_loc_x >= 10 || pcb_loc_y >= 10) && ext_top_rear_left_enable == true) {
normal_standoff = [ext_top_standoff[0],
top_height+pcb_loc_z+ext_top_rear_left_adjust,
ext_top_standoff[2],
@@ -455,9 +466,10 @@ module case_top(case_design) {
(corner_fillet/2)+ext_top_standoff_support_size/4,case_z]) standoff(normal_standoff);
}
// extended left-front standoff
if((pcb_loc_x >= 10 && (depth-(pcb_loc_y+pcb_depth)) >= 10) ||
if(((pcb_loc_x >= 10 && (depth-(pcb_loc_y+pcb_depth)) >= 10) ||
(pcb_loc_x <= 10 && (depth-(pcb_loc_y+pcb_depth)) >= 10) ||
pcb_loc_x >= 10 && (depth-(pcb_loc_y+pcb_depth)) <= 10) {
(pcb_loc_x >= 10 && depth-(pcb_loc_y+pcb_depth) <= 10)) &&
ext_top_front_left_enable == true) {
normal_standoff = [ext_top_standoff[0],
top_height+pcb_loc_z+ext_top_front_left_adjust,
ext_top_standoff[2],

View File

@@ -35,9 +35,9 @@ sbc_model = "c1+"; // ["c1+", "c2", "c4", "hc4", "xu4", "xu4q", "mc1", "hc1", "
sbc_off = false;
// sbc information display
sbc_information = false;
// enable highlight for sbc component subtarctive geometry
// enable highlight for sbc component subtractive geometry
sbc_highlight = false;
// enable highlight for accessory subtarctive geometry
// enable highlight for accessory subtractive geometry
accessory_highlight = false;
// base case design
case_design = "shell"; // [shell,panel,stacked,tray,round,hex,snap,fitted,paper]
@@ -90,6 +90,9 @@ tol = .25; //[-.5:.0625:.5]
/* [Top Standoffs] */
// enable case top standoffs
sbc_top_standoffs = true;
top_standoff_reverse = true;
// enable wall support for standoffs
top_sidewall_support = true;
top_standoff_type = "blind"; //[none, countersunk, recessed, nut holder, blind]
top_standoff_pillar = "hex"; //[hex, round]
top_standoff_diameter = 5.75; //[0:.01:10]
@@ -99,26 +102,29 @@ top_standoff_support_height = 4; //[0:.01:50]
top_standoff_insert = false;
top_standoff_insert_dia = 4.2; //.01
top_standoff_insert_height = 5.1; //.01
top_standoff_reverse = true;
// enable wall support for standoffs
top_sidewall_support = true;
// case top - lower left standoff settings
top_rear_left_support = "rear"; //[none,left,rear,front,right]
top_rear_left_enable = true;
top_rear_left_adjust = 0; //[-20:.01:20]
top_rear_left_support = "rear"; //[none,left,rear,front,right]
// case top - upper left standoff settings
top_front_left_support = "front"; //[none,left,rear,front,right]
top_front_left_enable = true;
top_front_left_adjust = 0; //[-20:.01:20]
top_front_left_support = "front"; //[none,left,rear,front,right]
// case top - lower right standoff settings
top_rear_right_support = "rear"; //[none,left,rear,front,right]
top_rear_right_enable = true;
top_rear_right_adjust = 0; //[-20:.01:20]
top_rear_right_support = "rear"; //[none,left,rear,front,right]
// case top - upper right standoff settings
top_front_right_support = "front"; //[none,left,rear,front,right]
top_front_right_enable = true;
top_front_right_adjust = 0; //[-20:.01:20]
top_front_right_support = "front"; //[none,left,rear,front,right]
/* [Bottom Standoffs] */
// enable case bottom standoffs
sbc_bottom_standoffs = true;
bottom_standoff_reverse = false;
// enable wall support for standoffs
bottom_sidewall_support = true;
bottom_standoff_type = "countersunk"; //[none, countersunk, recessed, nut holder, blind]
bottom_standoff_pillar = "hex"; //[hex, round]
bottom_standoff_diameter = 5.75; //[2:.01:10]
@@ -128,26 +134,29 @@ bottom_standoff_support_height = 4; //[0:.01:50]
bottom_standoff_insert = false;
bottom_standoff_insert_dia = 4.2; //.01
bottom_standoff_insert_height = 5.1; //.01
bottom_standoff_reverse = false;
// enable wall support for standoffs
bottom_sidewall_support = true;
// case bottom - rear left standoff settings
bottom_rear_left_support = "rear"; //[none,left,rear,front,right]
bottom_rear_left_enable = true;
bottom_rear_left_adjust = 0; //[-20:.01:20]
bottom_rear_left_support = "rear"; //[none,left,rear,front,right]
// case bottom - upper left standoff settings
bottom_front_left_support = "front"; //[none,left,rear,front,right]
bottom_front_left_enable = true;
bottom_front_left_adjust = 0; //[-20:.01:20]
bottom_front_left_support = "front"; //[none,left,rear,front,right]
// case bottom - lower right standoff settings
bottom_rear_right_support = "rear"; //[none,left,rear,front,right]
bottom_rear_right_enable = true;
bottom_rear_right_adjust = 0; //[-20:.01:20]
bottom_rear_right_support = "rear"; //[none,left,rear,front,right]
// case bottom - upper right standoff settings
bottom_front_right_support = "front"; //[none,left,rear,front,right]
bottom_front_right_enable = true;
bottom_front_right_adjust = 0; //[-20:.01:20]
bottom_front_right_support = "front"; //[none,left,rear,front,right]
/* [Extended Top Standoffs] */
// enable case extended standoffs
ext_top_standoffs = true;
ext_top_standoff_reverse = true;
// enable wall support for extended standoffs
ext_top_sidewall_support = true;
ext_top_standoff_type = "blind"; //[none, countersunk, recessed, nut holder, blind]
ext_top_standoff_pillar = "hex"; //[hex, round]
ext_top_standoff_diameter = 5.75; //[0:.01:10]
@@ -157,27 +166,30 @@ ext_top_standoff_support_height = 4; //[0:.01:50]
ext_top_standoff_insert = false;
ext_top_standoff_insert_dia = 4.2; //.01
ext_top_standoff_insert_height = 5.1; //.01
ext_top_standoff_reverse = true;
// enable wall support for extended standoffs
ext_top_sidewall_support = true;
// extended case top - lower left standoff settings
ext_top_rear_left_support = "rear"; //[none,left,rear,front,right]
ext_top_rear_left_enable = true;
ext_top_rear_left_adjust = 0; //[-20:.01:20]
ext_top_rear_left_support = "rear"; //[none,left,rear,front,right]
// extended case top - upper left standoff settings
ext_top_front_left_support = "front"; //[none,left,rear,front,right]
ext_top_front_left_enable = true;
ext_top_front_left_adjust = 0; //[-20:.01:20]
ext_top_front_left_support = "front"; //[none,left,rear,front,right]
// extended case top - lower right standoff settings
ext_top_rear_right_support = "rear"; //[none,left,rear,front,right]
ext_top_rear_right_enable = true;
ext_top_rear_right_adjust = 0; //[-20:.01:20]
ext_top_rear_right_support = "rear"; //[none,left,rear,front,right]
// extended case top - upper right standoff settings
ext_top_front_right_support = "front"; //[none,left,rear,front,right]
ext_top_front_right_enable = true;
ext_top_front_right_adjust = 0; //[-20:.01:20]
ext_top_front_right_support = "front"; //[none,left,rear,front,right]
/* [Extended Bottom Standoffs] */
// enable case bottom extended standoffs
ext_bottom_standoffs = true;
ext_bottom_standoff_reverse = false;
// enable wall support for extended standoffs
ext_bottom_sidewall_support = true;
ext_bottom_standoff_type = "countersunk"; //[none, countersunk, recessed, nut holder, blind]
ext_bottom_standoff_pillar = "hex"; //[hex, round]
ext_bottom_standoff_diameter = 5.75; //[2:.01:10]
@@ -187,22 +199,22 @@ ext_bottom_standoff_support_height = 4; //[0:.01:50]
ext_bottom_standoff_insert = false;
ext_bottom_standoff_insert_dia = 4.2; //.01
ext_bottom_standoff_insert_height = 5.1; //.01
ext_bottom_standoff_reverse = false;
// enable wall support for extended standoffs
ext_bottom_sidewall_support = true;
// extended case bottom - rear left standoff settings
ext_bottom_rear_left_support = "rear"; //[none,left,rear,front,right]
ext_bottom_rear_left_enable = true;
ext_bottom_rear_left_adjust = 0; //[-20:.01:20]
ext_bottom_rear_left_support = "rear"; //[none,left,rear,front,right]
// extended case bottom - upper left standoff settings
ext_bottom_front_left_support = "front"; //[none,left,rear,front,right]
ext_bottom_front_left_enable = true;
ext_bottom_front_left_adjust = 0; //[-20:.01:20]
ext_bottom_front_left_support = "front"; //[none,left,rear,front,right]
// extended case bottom - lower right standoff settings
ext_bottom_rear_right_support = "rear"; //[none,left,rear,front,right]
ext_bottom_rear_right_enable = true;
ext_bottom_rear_right_adjust = 0; //[-20:.01:20]
ext_bottom_rear_right_support = "rear"; //[none,left,rear,front,right]
// extended case bottom - upper right standoff settings
ext_bottom_front_right_support = "front"; //[none,left,rear,front,right]
ext_bottom_front_right_enable = true;
ext_bottom_front_right_adjust = 0; //[-20:.01:20]
ext_bottom_front_right_support = "front"; //[none,left,rear,front,right]
/* [Folded Case Adjustments] */
// material thickness in mm
@@ -257,7 +269,7 @@ pcb_radius = sbc_data[s[0]][11][0];
width = pcb_width+2*(wallthick+gap)+case_offset_x;
depth = pcb_depth+2*(wallthick+gap)+case_offset_y;
top_height = pcb_tmaxz+floorthick+case_offset_tz;
bottom_height = pcb_z+pcb_bmaxz+floorthick+case_offset_bz;
bottom_height = case_design == "tray" ? pcb_z+pcb_bmaxz+floorthick+case_offset_bz+4 : pcb_z+pcb_bmaxz+floorthick+case_offset_bz;
case_z = bottom_height+top_height;
case_diameter = sqrt(pow(width-wallthick-gap,2)+pow(depth-wallthick-gap,2));
hex_diameter = sqrt(pow(width+2*(wallthick+gap),2)+pow(depth+2*(wallthick+gap),2));