plumbed accessory support for standard mb form adapters, added mini-stx adapter and initial work for standard mb form cases

This commit is contained in:
Edward Kisiel
2024-04-13 14:36:52 -04:00
parent 3277cc8d07
commit 5c7f917b9f
6 changed files with 761 additions and 41 deletions

View File

@@ -44,13 +44,15 @@ mb_adapters=[
["left_front", 6.35, 165.1], ["right_front", 163.83, 165.1]],
["adapter_mini-itx", 170, 170, ["left_rear", 6.35, 33.02], ["right_rear", 163.83, 10.16],
["left_front", 6.35, 165.1], ["right_front", 163.83, 165.1]],
["adapter_mini-stx", 140, 147, ["left_rear", 5, 5], ["right_rear", 135, 5],
["left_front", 5, 142], ["right_front", 135, 142]],
];
mb = search([case_design],mb_adapters);
mba_x = mb_adapters[mb[0]][1];
mba_y = mb_adapters[mb[0]][2];
mba_z = floorthick;
mba_offset_x = -6.35;
mba_offset_x = -8.35;
mba_offset_y = 0;
mba_radius = 5;
mba_standoff = [6.75, floorthick, 4, 7, floorthick, "none", "round", "none", true, false, 0, 0];
@@ -60,8 +62,29 @@ mb_adapters=[
difference() {
union() {
difference() {
translate([mba_offset_x,mba_offset_y,0]) slab([mba_x,mba_y,mba_z], mba_radius);
translate([mba_offset_x+8,mba_offset_y+8,0]) vent_hex((mba_x-16)/6,(mba_y-16)/10,floorthick+4,10,1.5,"horizontal");
union() {
translate([mba_offset_x,mba_offset_y,0]) slab([mba_x,mba_y,mba_z], mba_radius);
// additive accessories
if(accessory_name != "none") {
for (i=[1:11:len(accessory_data[a[0]])-1]) {
class = accessory_data[a[0]][i];
type = accessory_data[a[0]][i+1];
loc_x = accessory_data[a[0]][i+2];
loc_y = accessory_data[a[0]][i+3];
loc_z = accessory_data[a[0]][i+4];
face = accessory_data[a[0]][i+5];
rotation = accessory_data[a[0]][i+6];
parametric = accessory_data[a[0]][i+7];
size = accessory_data[a[0]][i+8];
data = accessory_data[a[0]][i+9];
mask = accessory_data[a[0]][i+10];
if(class == "add1" && face == "bottom") {
parametric_move_add(type, loc_x, loc_y, loc_z, face, rotation, parametric, size, data, [false,mask[1],mask[2],mask[3]]);
}
}
}
}
// adapter standoff holes
for (i=[2:len(mb_adapters[mb[0]])-3:len(mb_adapters[mb[0]])-3]) {
for (c=[1:1:len(mb_adapters[mb[0]])-3]) {
@@ -103,6 +126,87 @@ mb_adapters=[
}
}
}
// bottom cover pattern
if(bottom_cover_pattern != "solid") {
if(bottom_cover_pattern == "hex_5mm") {
translate([1,0,-2]) vent_hex(mba_x/3.75,mba_y/6,floorthick+4,5,1.5,"horizontal");
}
if(bottom_cover_pattern == "hex_8mm") {
translate([1,2,-2]) vent_hex(mba_x/5.5,mba_y/9.5,floorthick+4,8,1.5,"horizontal");
}
if(bottom_cover_pattern == "linear_vertical") {
translate([0,-gap,-2]) vent(wallthick,mba_y-2*wallthick-gap,floorthick+4,1,1,(mba_x-2*wallthick-gap)/4,"horizontal");
}
if(bottom_cover_pattern == "linear_horizontal") {
translate([-gap,-gap,-2]) vent(mba_x-2*wallthick-gap,wallthick,floorthick+4,1,(mba_y-2*wallthick-gap)/3,1,"horizontal");
}
if(bottom_cover_pattern == "astroid") {
for(c=[3:12:mba_y-8]) {
for(r=[4:12:mba_x-8]) {
translate([r,c,-4]) linear_extrude(floorthick+5) import("./dxf/astroid_8mm.dxf");
}
}
}
}
// subtractive accessories
if(accessory_name != "none") {
for (i=[1:11:len(accessory_data[a[0]])-1]) {
class = accessory_data[a[0]][i];
type = accessory_data[a[0]][i+1];
loc_x = accessory_data[a[0]][i+2];
loc_y = accessory_data[a[0]][i+3];
loc_z = accessory_data[a[0]][i+4];
face = accessory_data[a[0]][i+5];
rotation = accessory_data[a[0]][i+6];
parametric = accessory_data[a[0]][i+7];
size_x = accessory_data[a[0]][i+8][0];
size_y = accessory_data[a[0]][i+8][1];
size_z = accessory_data[a[0]][i+8][2];
data = accessory_data[a[0]][i+9];
mask = accessory_data[a[0]][i+10];
if ((class == "sub" && face == "bottom") || class == "suball") {
if(accessory_highlight == false) {
parametric_move_sub(type, loc_x, loc_y, loc_z, face, rotation, parametric,
[size_x,size_y,size_z],data, mask);
}
else {
#parametric_move_sub(type,loc_x,loc_y,loc_z,face,rotation,parametric,
[size_x,size_y,size_z],data, mask);
}
}
// create openings for additive
if ((class == "add1" || class == "add2" || class == "model") && mask[0] == true) {
if(accessory_highlight == false) {
parametric_move_add(type,loc_x,loc_y,loc_z,face,rotation,parametric,[size_x,size_y,size_z],data,[true,mask[1],mask[2],mask[3]]);
}
else {
#parametric_move_add(type,loc_x,loc_y,loc_z,face,rotation,parametric,[size_x,size_y,size_z],data,[true,mask[1],mask[2],mask[3]]);
}
}
}
}
// ui access panel
if(bottom_access_panel_enable == true) {
if(access_panel_rotation == 0) {
translate([access_panel_location[0],access_panel_location[1], 0]) rotate([0,0,access_panel_rotation])
access_panel([access_panel_size[0],access_panel_size[1],floorthick], access_panel_orientation, [true,10,2,"default"]);
}
if(access_panel_rotation == 90) {
translate([access_panel_location[0]+access_panel_size[1],access_panel_location[1], 0]) rotate([0,0,access_panel_rotation])
access_panel([access_panel_size[0],access_panel_size[1],floorthick], access_panel_orientation, [true,10,2,"default"]);
}
if(access_panel_rotation == 180) {
translate([access_panel_location[0]+access_panel_size[0],access_panel_location[1]+access_panel_size[1],0]) rotate([0,0,access_panel_rotation])
access_panel([access_panel_size[0],access_panel_size[1],floorthick], access_panel_orientation, [true,10,2,"default"]);
}
if(access_panel_rotation == 270) {
translate([access_panel_location[0],access_panel_location[1]+access_panel_size[0], 0]) rotate([0,0,access_panel_rotation])
access_panel([access_panel_size[0],access_panel_size[1],floorthick], access_panel_orientation, [true,10,2,"default"]);
}
}
}
// adapter standoffs
for (i=[2:len(mb_adapters[mb[0]])-3:len(mb_adapters[mb[0]])-3]) {
@@ -201,32 +305,111 @@ mb_adapters=[
// translate([mba_offset_x-10, -10, -1]) cube([10, mba_y+20, floorthick+4]);
// translate([mba_x+mba_offset_x, -10, -1]) cube([10, mba_y+20, floorthick+4]);
}
// additive accessories
if(accessory_name != "none") {
for (i=[1:11:len(accessory_data[a[0]])-1]) {
class = accessory_data[a[0]][i];
type = accessory_data[a[0]][i+1];
loc_x = accessory_data[a[0]][i+2];
loc_y = accessory_data[a[0]][i+3];
loc_z = accessory_data[a[0]][i+4];
face = accessory_data[a[0]][i+5];
rotation = accessory_data[a[0]][i+6];
parametric = accessory_data[a[0]][i+7];
size = accessory_data[a[0]][i+8];
data = accessory_data[a[0]][i+9];
mask = accessory_data[a[0]][i+10];
if(class == "add2" && face == "bottom") {
parametric_move_add(type, loc_x, loc_y, loc_z, face, rotation, parametric, size, data, [false,mask[1],mask[2],mask[3]]);
}
}
}
// ui access port
if(bottom_access_panel_enable == true) {
if(access_panel_rotation == 0) {
translate([access_panel_location[0],access_panel_location[1], 0]) rotate([0,0,access_panel_rotation])
access_panel([access_panel_size[0],access_panel_size[1],floorthick], access_panel_orientation, [false,10,2,"default"]);
}
if(access_panel_rotation == 90) {
translate([access_panel_location[0]+access_panel_size[1],access_panel_location[1], 0]) rotate([0,0,access_panel_rotation])
access_panel([access_panel_size[0],access_panel_size[1],floorthick], access_panel_orientation, [false,10,2,"default"]);
}
if(access_panel_rotation == 180) {
translate([access_panel_location[0]+access_panel_size[0],access_panel_location[1]+access_panel_size[1],0]) rotate([0,0,access_panel_rotation])
access_panel([access_panel_size[0],access_panel_size[1],floorthick], access_panel_orientation, [false,10,2,"default"]);
}
if(access_panel_rotation == 270) {
translate([access_panel_location[0],access_panel_location[1]+access_panel_size[0], 0]) rotate([0,0,access_panel_rotation])
access_panel([access_panel_size[0],access_panel_size[1],floorthick], access_panel_orientation, [false,10,2,"default"]);
}
}
}
/*
NAME: io_panel
NAME: io_plate
DESCRIPTION: creates rear io panel for legacy cases
TODO: none
USAGE: io_panel()
USAGE: io_plate()
*/
module io_panel() {
module io_plate() {
io_window_x = 158.75;
io_window_x = case_design == "adapter_mini-stx" ? 124.75 : 158.75;
io_window_y = 4;
io_window_z = 44;
io_offset = 6.35;
io_window_z = case_design == "adapter_mini-stx" ? 40 : 44;
io_offset = case_design == "adapter_mini-stx" ? 1.2 : 10.79;
difference() {
union() {
translate([-1,io_window_y-1,-1]) cube([io_window_x+2,1,io_window_z+2]);
translate([0,0,0]) cube([io_window_x,4,io_window_z]);
cube([io_window_x,4,io_window_z]);
}
translate([2,-2,2]) cube([io_window_x-4,5,io_window_z-4]);
translate([8.79 ,6,bottom_height-pcb_z+pcb_loc_z+2])
translate([io_offset,6,bottom_height-pcb_z+pcb_loc_z+2])
sbc(sbc_model, cooling, fan_size, gpio_opening, uart_opening, true);
// subtractive accessories
if(accessory_name != "none") {
for (i=[1:11:len(accessory_data[a[0]])-1]) {
class = accessory_data[a[0]][i];
type = accessory_data[a[0]][i+1];
loc_x = accessory_data[a[0]][i+2]+io_offset;
loc_y = accessory_data[a[0]][i+3]+io_window_y;
loc_z = accessory_data[a[0]][i+4]+2;
face = accessory_data[a[0]][i+5];
rotation = accessory_data[a[0]][i+6];
parametric = accessory_data[a[0]][i+7];
size_x = accessory_data[a[0]][i+8][0];
size_y = accessory_data[a[0]][i+8][1];
size_z = accessory_data[a[0]][i+8][2];
data = accessory_data[a[0]][i+9];
mask = accessory_data[a[0]][i+10];
if ((class == "sub" && face == "bottom") || class == "suball") {
if(accessory_highlight == false) {
parametric_move_sub(type, loc_x, loc_y, loc_z, face, rotation, parametric,
[size_x,size_y,size_z],data, mask);
}
else {
#parametric_move_sub(type,loc_x,loc_y,loc_z,face,rotation,parametric,
[size_x,size_y,size_z],data, mask);
}
}
// create openings for additive
if ((class == "add1" || class == "add2" || class == "model") && mask[0] == true) {
if(accessory_highlight == false) {
parametric_move_add(type,loc_x,loc_y,loc_z,face,rotation,parametric,[size_x,size_y,size_z],data,[true,mask[1],mask[2],mask[3]]);
}
else {
#parametric_move_add(type,loc_x,loc_y,loc_z,face,rotation,parametric,[size_x,size_y,size_z],data,[true,mask[1],mask[2],mask[3]]);
}
}
}
}
}
}

View File

@@ -300,6 +300,13 @@ module case_bottom(case_design) {
}
}
}
// rear io plate support for standard form motherboards
// if(rear_io_plate == true) {
// difference() {
// translate([-10.79+pcb_loc_x,-gap-adj,-2+bottom_height-pcb_z+pcb_loc_z-1]) cube([162.75, 13, 46]);
// translate([-10.79+pcb_loc_x-1,-gap-2*adj,-pcb_z+pcb_loc_z+bottom_height]) cube([162.75+2, 15, top_height+1]);
// }
// }
}
// tray side attachment holes
if(case_design == "tray" || case_design == "tray_vu5" || case_design == "tray_vu7" || case_design == "tray_sides") {
@@ -456,6 +463,10 @@ module case_bottom(case_design) {
}
}
}
// rear io plate opening for standard form motherboards
if(rear_io_plate == true) {
translate([-8.79+pcb_loc_x,-4.5,-2+bottom_height-pcb_z+pcb_loc_z]) cube([158.75, 10+pcb_loc_y, 44]);
}
}
// pcb standoffs
if(sbc_bottom_standoffs == true) {
@@ -544,7 +555,7 @@ module case_bottom(case_design) {
// extended right-rear standoff
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,
bottom_height+ext_bottom_rear_right_adjust,
ext_bottom_standoff[2],
ext_bottom_standoff[3],
ext_bottom_standoff[4],
@@ -564,7 +575,7 @@ module case_bottom(case_design) {
(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,
bottom_height+ext_bottom_front_right_adjust,
ext_bottom_standoff[2],
ext_bottom_standoff[3],
ext_bottom_standoff[4],
@@ -581,7 +592,7 @@ module case_bottom(case_design) {
// extended left-rear standoff
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,
bottom_height+ext_bottom_rear_left_adjust,
ext_bottom_standoff[2],
ext_bottom_standoff[3],
ext_bottom_standoff[4],
@@ -601,7 +612,7 @@ module case_bottom(case_design) {
(pcb_loc_x >= 10 && depth-(pcb_loc_y+pcb_depth) <= 10)) &&
ext_bottom_front_left_enable == true) {
normal_standoff = [ext_bottom_standoff[0],
bottom_height+pcb_loc_z+ext_bottom_front_left_adjust,
bottom_height+ext_bottom_front_left_adjust,
ext_bottom_standoff[2],
ext_bottom_standoff[3],
ext_bottom_standoff[4],

View File

@@ -30,6 +30,7 @@ module case_top(case_design) {
vu_rotation = [15,0,0];
case_fn = 360; // circle segments for round cases
case_ffn = 90; // circle segments for fillet of round cases
adj = .01;
difference() {
union() {
@@ -293,6 +294,13 @@ module case_top(case_design) {
}
}
}
// rear io plate support for standard form motherboards
// if(rear_io_plate == true) {
// difference() {
// translate([-10.79+pcb_loc_x,-gap-adj,-2+bottom_height-pcb_z+pcb_loc_z-1]) cube([162.75, 13, 46]);
// translate([-10.79+pcb_loc_x-2*adj,-gap-1,pcb_z+pcb_loc_z]) cube([162.75+2, 15, bottom_height+1]);
// }
// }
}
// pcb standoff holes
if(sbc_top_standoffs == true) {
@@ -378,6 +386,10 @@ module case_top(case_design) {
}
}
}
// rear io plate opening for standard form motherboards
if(rear_io_plate == true) {
translate([-8.79+pcb_loc_x,-4.5,-2+bottom_height-pcb_z+pcb_loc_z]) cube([158.75, 10+pcb_loc_y, 44]);
}
}
// pcb standoffs
if(sbc_top_standoffs == true) {
@@ -395,7 +407,7 @@ module case_top(case_design) {
if (pcbhole_pos == "left_rear" && top_rear_left_enable == true) {
top_support = top_sidewall_support == true ? top_rear_left_support : "none";
normal_standoff = [top_standoff[0],
top_height+pcb_loc_z+top_rear_left_adjust,
top_height-pcb_loc_z+top_rear_left_adjust,
top_standoff[2],
top_standoff[3],
top_standoff[4],
@@ -411,7 +423,7 @@ module case_top(case_design) {
if (pcbhole_pos == "left_front" && top_front_left_enable == true) {
top_support = top_sidewall_support == true ? top_front_left_support : "none";
normal_standoff = [top_standoff[0],
top_height+pcb_loc_z+top_front_left_adjust,
top_height-pcb_loc_z+top_front_left_adjust,
top_standoff[2],
top_standoff[3],
top_standoff[4],
@@ -427,7 +439,7 @@ module case_top(case_design) {
if (pcbhole_pos == "right_rear" && top_rear_right_enable == true) {
top_support = top_sidewall_support == true ? top_rear_right_support : "none";
normal_standoff = [top_standoff[0],
top_height+pcb_loc_z+top_rear_right_adjust,
top_height-pcb_loc_z+top_rear_right_adjust,
top_standoff[2],
top_standoff[3],
top_standoff[4],
@@ -443,7 +455,7 @@ module case_top(case_design) {
if (pcbhole_pos == "right_front" && top_front_right_enable == true) {
top_support = top_sidewall_support == true ? top_front_right_support : "none";
normal_standoff = [top_standoff[0],
top_height+pcb_loc_z+top_front_right_adjust,
top_height-pcb_loc_z+top_front_right_adjust,
top_standoff[2],
top_standoff[3],
top_standoff[4],
@@ -464,7 +476,7 @@ module case_top(case_design) {
// extended right-rear standoff
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,
top_height+ext_top_rear_right_adjust,
ext_top_standoff[2],
ext_top_standoff[3],
ext_top_standoff[4],
@@ -484,7 +496,7 @@ module case_top(case_design) {
(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,
top_height+ext_top_front_right_adjust,
ext_top_standoff[2],
ext_top_standoff[3],
ext_top_standoff[4],
@@ -502,7 +514,7 @@ module case_top(case_design) {
// extended left-rear standoff
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,
top_height+ext_top_rear_left_adjust,
ext_top_standoff[2],
ext_top_standoff[3],
ext_top_standoff[4],
@@ -522,7 +534,7 @@ module case_top(case_design) {
(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,
top_height+ext_top_front_left_adjust,
ext_top_standoff[2],
ext_top_standoff[3],
ext_top_standoff[4],