implemented named fastener size m2, m2.5, m3, m4 and custom for top and bottom standoffs

This commit is contained in:
Edward Kisiel
2024-04-22 20:49:03 -04:00
parent 0807d49dbb
commit 74084eebde
5 changed files with 103 additions and 31 deletions

View File

@@ -25,10 +25,10 @@
USAGE: standoff(stand_off, mask)
stand_off[radius, height, holesize, supportsize, supportheight, sink, pillarstyle,
stand_off[diameter, height, holesize, supportsize, supportheight, sink, pillarstyle,
pillarsupport, reverse, insert_e, i_dia, i_depth], mask)
radius = pillar radius
diameter = pillar diameter
height = total height
holesize = hole diameter
supportsize = support size for sink
@@ -50,7 +50,7 @@
module standoff(stand_off, mask){
radius = stand_off[0];
diameter = stand_off[0];
height = stand_off[1];
holesize = stand_off[2];
supportsize = stand_off[3];
@@ -82,16 +82,16 @@ module standoff(stand_off, mask){
difference (){
union () {
if(pillarstyle == "hex" && reverse == false) {
rotate([0,0,30]) cylinder(d=radius*2/sqrt(3), h=height, $fn=6);
rotate([0,0,30]) cylinder(d=diameter*2/sqrt(3), h=height, $fn=6);
}
if(pillarstyle == "hex" && reverse == true) {
translate([0,0,-height]) rotate([0,0,30]) cylinder(d=radius*2/sqrt(3), h=height, $fn=6);
translate([0,0,-height]) rotate([0,0,30]) cylinder(d=diameter*2/sqrt(3), h=height, $fn=6);
}
if(pillarstyle == "round" && reverse == false) {
cylinder(d=radius, h=height);
cylinder(d=diameter, h=height);
}
if(pillarstyle == "round" && reverse == true) {
translate([0,0,-height]) cylinder(d=radius, h=height);
translate([0,0,-height]) cylinder(d=diameter, h=height);
}
if(reverse == true) {
translate([0,0,-supportheight]) cylinder(d=supportsize, h=supportheight);
@@ -136,10 +136,14 @@ module standoff(stand_off, mask){
}
// countersink hole
if(sink == "countersunk" && reverse == false) {
translate([0,0, -adj]) cylinder(d1=6.5, d2=holesize, h=3.25);
hs = holesize == 2 ? 4 : holesize == 2.5 ? 5 : holesize == 3 ? 6.72 : holesize == 4 ? 8.96 : (2*holesize)+.5;
ds = holesize == 2 ? 1.2 : holesize == 2.5 ? 1.5 : holesize == 3 ? 1.86 : holesize == 4 ? 2.48 : 3.5;
translate([0,0,-adj]) cylinder(d1=hs, d2=holesize, h=ds);
}
if(sink == "countersunk" && reverse == true) {
translate([0,0,+adj-2.5]) cylinder(d1=holesize, d2=6.5, h=3.25);
hs = holesize == 2 ? 4 : holesize == 2.5 ? 5 : holesize == 3 ? 6.72 : holesize == 4 ? 8.96 : (2*holesize)+.5;
ds = holesize == 2 ? 1.2 : holesize == 2.5 ? 1.5 : holesize == 3 ? 1.86 : holesize == 4 ? 2.48 : 3.5;
translate([0,0,+adj-ds]) cylinder(d1=holesize, d2=hs, h=ds);
}
// recessed hole
if(sink == "recessed" && reverse == false) {
@@ -150,10 +154,14 @@ module standoff(stand_off, mask){
}
// nut holder
if(sink == "nut holder" && reverse == false) {
translate([0,0,-adj]) cylinder(r=3.3,h=3,$fn=6);
hs = holesize == 2 ? 4 : holesize == 2.5 ? 5 : holesize == 3 ? 5.5 : holesize == 4 ? 7 : (2*holesize)+.5;
ds = holesize == 2 ? 1.6 : holesize == 2.5 ? 2 : holesize == 3 ? 2.4 : holesize == 4 ? 3.2 : 3.5;
translate([0,0,-adj]) cylinder(d=hs*2/sqrt(3),h=ds,$fn=6);
}
if(sink == "nut holder" && reverse == true) {
translate([0,0,+adj-3]) cylinder(r=3.3,h=3,$fn=6);
hs = holesize == 2 ? 4 : holesize == 2.5 ? 5 : holesize == 3 ? 5.5 : holesize == 4 ? 7 : (2*holesize)+.5;
ds = holesize == 2 ? 1.6 : holesize == 2.5 ? 2 : holesize == 3 ? 2.4 : holesize == 4 ? 3.2 : 3.5;
translate([0,0,+adj-ds]) cylinder(d=hs*2/sqrt(3),h=ds,$fn=6);
}
// blind hole
if(sink == "blind" && reverse == false) {

View File

@@ -386,19 +386,19 @@ echo(pcb_depth+case_offset_y-10);
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);
translate([pcbhole_x,pcbhole_y,-1]) cylinder(d=bottom_standoff[3]-.2, 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);
translate([pcbhole_x,pcbhole_y,-1]) cylinder(d=bottom_standoff[3]-.2, 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);
translate([pcbhole_x,pcbhole_y,-1]) cylinder(d=bottom_standoff[3]-.2, 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);
translate([pcbhole_x,pcbhole_y,-1]) cylinder(d=bottom_standoff[3]-.2, h=bottom_height);
}
}
@@ -409,7 +409,7 @@ echo(pcb_depth+case_offset_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);
(corner_fillet/2)+ext_bottom_standoff_support_size/4,-1]) cylinder(d=ext_bottom_standoff[3]-.2, h=bottom_height);
}
// right-front standoff
if(((width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 && depth-pcb_loc_y-pcb_depth >= 10) ||
@@ -418,12 +418,12 @@ echo(pcb_depth+case_offset_y-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);
cylinder(d=ext_bottom_standoff[3]-.2, h=bottom_height);
}
// left-rear standoff
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);
(corner_fillet/2)+ext_bottom_standoff_support_size/4,-1]) cylinder(d=ext_bottom_standoff[3]-.2, h=bottom_height);
}
// left-front standoff
if(((pcb_loc_x >= 10 && (depth-(pcb_loc_y+pcb_depth)) >= 10) ||
@@ -432,7 +432,7 @@ echo(pcb_depth+case_offset_y-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);
cylinder(d=ext_bottom_standoff[3]-.2, h=bottom_height);
}
}
// bottom cover pattern

View File

@@ -309,19 +309,19 @@ module case_top(case_design) {
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+5]) cylinder(d=6.5, h=top_height);
translate([pcbhole_x,pcbhole_y,top_height+5]) cylinder(d=top_standoff[3]-.2, 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+5]) cylinder(d=6.5, h=top_height);
translate([pcbhole_x,pcbhole_y,top_height+5]) cylinder(d=top_standoff[3]-.2, 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+5]) cylinder(d=6.5, h=top_height);
translate([pcbhole_x,pcbhole_y,top_height+5]) cylinder(d=top_standoff[3]-.2, 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+5]) cylinder(d=6.5, h=top_height);
translate([pcbhole_x,pcbhole_y,top_height+5]) cylinder(d=top_standoff[3]-.2, h=top_height);
}
}
}
@@ -331,7 +331,7 @@ module case_top(case_design) {
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+5]) cylinder(d=6.5, h=top_height);
(corner_fillet/2)+ext_top_standoff_support_size/4,top_height+5]) cylinder(d=ext_top_standoff[3]-.2, h=top_height);
}
// right-front standoff
if(((width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 && depth-pcb_loc_y-pcb_depth >= 10) ||
@@ -340,12 +340,12 @@ module case_top(case_design) {
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+5])
cylinder(d=6.5, h=top_height);
cylinder(d=ext_top_standoff[3]-.2, h=top_height);
}
// left-rear standoff
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+5]) cylinder(d=6.5, h=top_height);
(corner_fillet/2)+ext_top_standoff_support_size/4,top_height+5]) cylinder(d=ext_top_standoff[3]-.2, h=top_height);
}
// left-front standoff
if(((pcb_loc_x >= 10 && (depth-(pcb_loc_y+pcb_depth)) >= 10) ||
@@ -354,7 +354,7 @@ module case_top(case_design) {
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+5])
cylinder(d=6.5, h=top_height);
cylinder(d=ext_top_standoff[3]-.2, h=top_height);
}
}
// top cover pattern

View File

@@ -143,6 +143,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -292,6 +293,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -441,6 +443,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -590,6 +593,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -740,6 +744,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -889,6 +894,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -1038,6 +1044,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -1187,6 +1194,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -1394,6 +1402,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -1543,6 +1552,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "17",
"top_standoff_support_size": "10",
"top_standoff_type": "recessed",
@@ -1692,6 +1702,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "35",
"top_standoff_support_size": "10",
"top_standoff_type": "recessed",
@@ -1841,6 +1852,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "25",
"top_standoff_support_size": "10",
"top_standoff_type": "recessed",
@@ -1990,6 +2002,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -2140,6 +2153,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -2289,6 +2303,7 @@
"top_standoff_insert_height": "5",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -2439,6 +2454,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -2589,6 +2605,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -2739,6 +2756,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -2888,6 +2906,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -3037,6 +3056,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -3186,6 +3206,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -3335,6 +3356,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -3484,6 +3506,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -3633,6 +3656,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -3782,6 +3806,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -3931,6 +3956,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "50",
"top_standoff_support_size": "10",
"top_standoff_type": "recessed",
@@ -4080,6 +4106,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "30",
"top_standoff_support_size": "10",
"top_standoff_type": "recessed",
@@ -4230,6 +4257,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -4380,6 +4408,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -4530,6 +4559,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -4680,6 +4710,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -4830,6 +4861,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -4980,6 +5012,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -5130,6 +5163,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -5280,6 +5314,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -5430,6 +5465,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -5580,6 +5616,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -5730,6 +5767,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -5880,6 +5918,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -6030,6 +6069,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -6180,6 +6220,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -6330,6 +6371,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -6480,6 +6522,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -6630,6 +6673,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -6780,6 +6824,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -6930,6 +6975,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -7080,6 +7126,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -7230,6 +7277,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -7380,6 +7428,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -7529,6 +7578,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -7678,6 +7728,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",
@@ -7827,6 +7878,7 @@
"top_standoff_insert_height": "5.1",
"top_standoff_pillar": "hex",
"top_standoff_reverse": "true",
"top_standoff_size": "m3",
"top_standoff_support_height": "4",
"top_standoff_support_size": "10",
"top_standoff_type": "blind",

View File

@@ -104,9 +104,11 @@ tol = .25; //[-.5:.0625:.5]
/* [Top Standoff Global Settings] */
// enable case top standoffs
sbc_top_standoffs = true;
// reverse standoff vertical orientation
top_standoff_reverse = true;
// enable wall support for standoffs
top_sidewall_support = false;
top_standoff_size = "m3"; //[m2, m2.5, m3, m4, custom]
top_standoff_type = "blind"; //[none, countersunk, recessed, nut holder, blind]
top_standoff_pillar = "hex"; //[hex, round]
top_standoff_diameter = 5.75; //[0:.01:10]
@@ -138,9 +140,11 @@ top_front_right_support = "front"; //[none,left,rear,front,right]
/* [Bottom Standoff Global Settings] */
// enable case bottom standoffs
sbc_bottom_standoffs = true;
// reverse standoff vertical orientation
bottom_standoff_reverse = false;
// enable wall support for standoffs
bottom_sidewall_support = false;
bottom_standoff_size = "m3"; //[m2, m2.5, m3, m4, custom]
bottom_standoff_type = "countersunk"; //[none, countersunk, recessed, nut holder, blind]
bottom_standoff_pillar = "hex"; //[hex, round]
bottom_standoff_diameter = 5.75; //[2:.01:10]
@@ -286,9 +290,13 @@ 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));
/* [Hidden] */
top_standoff = [top_standoff_diameter,
top_dia = top_standoff_size == "m2" ? 4 : top_standoff_size == "m2.5" ? 4 :
top_standoff_size == "m3" ? 5 : top_standoff_size == "m4" ? 6 : top_standoff_diameter;
top_hole_size = top_standoff_size == "m2" ? 2 : top_standoff_size == "m2.5" ? 2.5 :
top_standoff_size == "m3" ? 3 : top_standoff_size == "m4" ? 4 : top_standoff_hole_size;
top_standoff = [top_dia,
18,
top_standoff_hole_size,
top_hole_size,
top_standoff_support_size,
top_standoff_support_height,
top_standoff_type,
@@ -298,9 +306,13 @@ top_standoff = [top_standoff_diameter,
top_standoff_insert,
top_standoff_insert_dia,
top_standoff_insert_height];
bottom_standoff = [bottom_standoff_diameter,
bottom_dia = bottom_standoff_size == "m2" ? 4 : bottom_standoff_size == "m2.5" ? 4 :
bottom_standoff_size == "m3" ? 5 : bottom_standoff_size == "m4" ? 6 : bottom_standoff_diameter;
bottom_hole_size = bottom_standoff_size == "m2" ? 2 : bottom_standoff_size == "m2.5" ? 2.5 :
bottom_standoff_size == "m3" ? 3 : bottom_standoff_size == "m4" ? 4 : bottom_standoff_hole_size;
bottom_standoff = [bottom_dia,
6,
bottom_standoff_hole_size,
bottom_hole_size,
bottom_standoff_support_size,
bottom_standoff_support_height,
bottom_standoff_type,