added snap top and hexagon cases

This commit is contained in:
Edward Kisiel
2022-07-27 22:02:29 -04:00
parent f4c9078d85
commit ba574aba8a
2 changed files with 141 additions and 13 deletions

View File

@@ -295,7 +295,7 @@ case_data = [
[6.75,5,3.6,10,4,1,0,0,0,4.5,5.1]], // bottom_ext_standoff
["c1+_round","c1+","round","none", // case_name,sbc_model,case_design,case_style
0,0,0,0,0,2,0, // pcb_loc_x,pcb_loc_y,pcb_loc_z,case_offset_x,case_offset_y,case_offset_tz,case_offset_bz,
0,0,0,0,0,0,0, // pcb_loc_x,pcb_loc_y,pcb_loc_z,case_offset_x,case_offset_y,case_offset_tz,case_offset_bz,
3,2,3,1.5,[0,0], // wallthick,floorthick,sidethick,gap,fillet
false,false,false,true,false, // indents,sidewall_support,sbc_top_standoffs,sbc_bottom_standoffs,case_ext_standoffs
false,"none","fan","none","true", // sata_punchout,gpio_opening,cooling,exhaust_vents,mode
@@ -533,7 +533,7 @@ case_data = [
[6.75,5,3.6,10,4,1,0,0,0,4.5,5.1]], // bottom_ext_standoff
["c2_round","c2","round","none", // case_name,sbc_model,case_design,case_style
0,0,0,0,0,2,0, // pcb_loc_x,pcb_loc_y,pcb_loc_z,case_offset_x,case_offset_y,case_offset_tz,case_offset_bz,
0,0,0,0,0,0,0, // pcb_loc_x,pcb_loc_y,pcb_loc_z,case_offset_x,case_offset_y,case_offset_tz,case_offset_bz,
3,2,3,1.5,[0,0], // wallthick,floorthick,sidethick,gap,fillet
false,false,false,true,false, // indents,sidewall_support,sbc_top_standoffs,sbc_bottom_standoffs,case_ext_standoffs
false,"none","fan","none","true", // sata_punchout,gpio_opening,cooling,exhaust_vents,mode
@@ -781,7 +781,7 @@ case_data = [
[6.75,5,3.6,10,4,1,0,0,0,4.5,5.1]], // bottom_ext_standoff
["c4_round","c4","round","none", // case_name,sbc_model,case_design,case_style
0,0,0,0,0,2,0, // pcb_loc_x,pcb_loc_y,pcb_loc_z,case_offset_x,case_offset_y,case_offset_tz,case_offset_bz,
0,0,0,0,0,0,0, // pcb_loc_x,pcb_loc_y,pcb_loc_z,case_offset_x,case_offset_y,case_offset_tz,case_offset_bz,
3,2,3,1.5,[0,0], // wallthick,floorthick,sidethick,gap,fillet
false,false,false,true,false, // indents,sidewall_support,sbc_top_standoffs,sbc_bottom_standoffs,case_ext_standoffs
false,"none","fan","none","true", // sata_punchout,gpio_opening,cooling,exhaust_vents,mode
@@ -792,6 +792,28 @@ case_data = [
"suball","round",10.5,-2,14.5,"top",[90,0,0],11,0,18,0,0,"",0, // sub power plug hole
"suball","rectangle",34.5,-26,4,"top",[0,0,0],21,10,15.5,0,0,"vertical",[1,1,1,1]], // sub hdmi opening
["c4_hex","c4","hex","none", // case_name,sbc_model,case_design,case_style
0,0,0,0,0,0,0, // pcb_loc_x,pcb_loc_y,pcb_loc_z,case_offset_x,case_offset_y,case_offset_tz,case_offset_bz,
3,2,3,1.5,[0,0], // wallthick,floorthick,sidethick,gap,fillet
false,false,false,true,false, // indents,sidewall_support,sbc_top_standoffs,sbc_bottom_standoffs,case_ext_standoffs
false,"none","fan","none","true", // sata_punchout,gpio_opening,cooling,exhaust_vents,mode
[6.75,18,2.5,10,4,4,0,1,0,4.5,5.1], // top_pcb_standoff
[6.75,5,3.6,10,4,1,0,0,0,4.5,5.1], // bottom_pcb_standoff
[6.75,18,2.5,10,4,4,0,1,0,4.5,5.1], // top_ext_standoff
[6.75,5,3.6,10,4,1,0,0,0,4.5,5.1], // bottom_ext_standoff
"suball","round",10.5,-2,14.5,"top",[90,0,0],11,0,18,0,0,"",0, // sub power plug hole
"suball","rectangle",34.5,-26,4,"top",[0,0,0],21,10,15.5,0,0,"vertical",[1,1,1,1]], // sub hdmi opening
["c4_snap","c4","snap","none", // case_name,sbc_model,case_design,case_style
0,0,0,0,0,0,0, // pcb_loc_x,pcb_loc_y,pcb_loc_z,case_offset_x,case_offset_y,case_offset_tz,case_offset_bz,
2,2,3,1.5,[3.5,0], // wallthick,floorthick,sidethick,gap,fillet
true,true,false,true,false, // indents,sidewall_support,sbc_top_standoffs,sbc_bottom_standoffs,case_ext_standoffs
false,"none","fan","vent","true", // sata_punchout,gpio_opening,cooling,exhaust_vents,mode
[6.75,18,2.5,10,4,4,0,1,0,4.5,5.1], // top_pcb_standoff
[6.75,5,3.6,10,4,1,0,0,0,4.5,5.1], // bottom_pcb_standoff
[6.75,18,2.5,10,4,4,0,1,0,4.5,5.1], // top_ext_standoff
[6.75,5,3.6,10,4,1,0,0,0,4.5,5.1]], // bottom_ext_standoff
// Odroid-XU4
["xu4_shell","xu4","shell","none", // case_name,sbc_model,case_design,case_style

View File

@@ -33,7 +33,8 @@
20220406 Version 1.2.2 added vu7c, vu8m and weatherboard2 models, other additions, fixes and maintenance
20220515 Version 1.2.3 added odroid-m1, jetson nano, rockpro64, completed mask(), improved docs
changed tray top design
2022xxxx Version 1.x.x added round case for odroid c-series and other rpi format
2022xxxx Version 2.0.x added round, hexagon, snap and fitted cases, customizer user interface,
configuration file changed to json
see https://github.com/hominoids/SBC_Case_Builder
*/
@@ -46,7 +47,7 @@ include <./sbc_case_builder.cfg>;
/* [Board and View] */
// case_name to load from sbc_case_builder.cfg
case_name = "c4_round"; // [c1+_shell,c1+_shell_boombox,c1+_panel,c1+_panel_boombox,c1+_panel_lcd3.5,c1+_desktop_lcd3.5,c1+_stacked,c1+_tray,c1+_tray_sides,c1+_tray_boombox,c1+_tray_vu5,c1+_tray_vu7,c2_shell,c2_shell_boombox,c2_panel,c2_panel_boombox,c2_panel_lcd3.5,c2_desktop_lcd3.5,c2_deskboom_lcd3.5,c2_stacked,c2_tray,c2_tray_sides,c2_tray_boombox,c2_tray_vu5,c2_tray_vu7,c4_shell,c4_shell_boombox,c4_shell_vu7c,c4_panel,c4_panel_lcd3.5,c4_desktop_lcd3.5,c4_deskboom_lcd3.5,c4_panel_boombox,c4_stacked,c4_tray,c4_tray_sides,c4_tray_boombox,c4_tray_vu5,c4_tray_vu7,xu4_shell,xu4_panel,xu4_stacked,xu4_tray,xu4_tray_sides,xu4_tray_vu5,xu4_tray_vu7,xu4q_shell,xu4q_panel,xu4q_stacked,xu4q_tray,xu4q_tray_sides,xu4q_tray_vu5,xu4q_tray_vu7,n1_shell,n1_panel,n1_stacked,n1_tray,n1_tray_sides,n1_tray_vu5,n1_tray_vu7,n2_panel,n2_tray,n2_tray_sides,n2_tray_vu5,n2_tray_vu7,n2+_panel,n2+_tray,n2+_tray_sides,n2+_tray_vu5,n2+_tray_vu7,n2+_tray_vu7_fan,m1_panel,m1_tray,m1_tray_drive,m1_tray_sides,m1_tray_vu5,m1_tray_vu7,h2_shell,h2_panel,h2_stacked,h2_tray,h2_tray_sides,h2_tray_vu5,h2_tray_vu7,h2_tray_router,h2_router_station,h2_lowboy,h2_lowboy_router,h2_shell_router,h2_shell_router-ssd,hc4_shell,hc4_panel,hc4_stacked,hc4_tray,hc4_tray_sides,hc4_tray_vu5,hc4_tray_vu7,hc4_tray_drivebox2.5,hc4_shell_drivebox2.5,hc4_shell_drivebox2.5v,hc4_shell_drivebox3.5,jetsonnano_shell,jetsonnano_panel,jetsonnano_stacked,jetsonnano_tray,jetsonnano_tray_sides,rockpro64_shell,rockpro64_panel,rockpro64_stacked,rockpro64_tray,rockpro64_tray_sides,show2_shell,rpi3b+_shell,rpi3b+_panel,rpi3b+_stacked,rpi3b+_tray,test]
case_name = "c4_snap"; // [c1+_shell,c1+_shell_boombox,c1+_panel,c1+_panel_boombox,c1+_panel_lcd3.5,c1+_desktop_lcd3.5,c1+_stacked,c1+_tray,c1+_tray_sides,c1+_tray_boombox,c1+_tray_vu5,c1+_tray_vu7,c2_shell,c2_shell_boombox,c2_panel,c2_panel_boombox,c2_panel_lcd3.5,c2_desktop_lcd3.5,c2_deskboom_lcd3.5,c2_stacked,c2_tray,c2_tray_sides,c2_tray_boombox,c2_tray_vu5,c2_tray_vu7,c4_shell,c4_shell_boombox,c4_shell_vu7c,c4_panel,c4_panel_lcd3.5,c4_desktop_lcd3.5,c4_deskboom_lcd3.5,c4_panel_boombox,c4_stacked,c4_tray,c4_tray_sides,c4_tray_boombox,c4_tray_vu5,c4_tray_vu7,xu4_shell,xu4_panel,xu4_stacked,xu4_tray,xu4_tray_sides,xu4_tray_vu5,xu4_tray_vu7,xu4q_shell,xu4q_panel,xu4q_stacked,xu4q_tray,xu4q_tray_sides,xu4q_tray_vu5,xu4q_tray_vu7,n1_shell,n1_panel,n1_stacked,n1_tray,n1_tray_sides,n1_tray_vu5,n1_tray_vu7,n2_panel,n2_tray,n2_tray_sides,n2_tray_vu5,n2_tray_vu7,n2+_panel,n2+_tray,n2+_tray_sides,n2+_tray_vu5,n2+_tray_vu7,n2+_tray_vu7_fan,m1_panel,m1_tray,m1_tray_drive,m1_tray_sides,m1_tray_vu5,m1_tray_vu7,h2_shell,h2_panel,h2_stacked,h2_tray,h2_tray_sides,h2_tray_vu5,h2_tray_vu7,h2_tray_router,h2_router_station,h2_lowboy,h2_lowboy_router,h2_shell_router,h2_shell_router-ssd,hc4_shell,hc4_panel,hc4_stacked,hc4_tray,hc4_tray_sides,hc4_tray_vu5,hc4_tray_vu7,hc4_tray_drivebox2.5,hc4_shell_drivebox2.5,hc4_shell_drivebox2.5v,hc4_shell_drivebox3.5,jetsonnano_shell,jetsonnano_panel,jetsonnano_stacked,jetsonnano_tray,jetsonnano_tray_sides,rockpro64_shell,rockpro64_panel,rockpro64_stacked,rockpro64_tray,rockpro64_tray_sides,show2_shell,rpi3b+_shell,rpi3b+_panel,rpi3b+_stacked,rpi3b+_tray,test]
// viewing mode "platter", "model", "debug"
view = "model"; // [platter, model, debug]
@@ -73,7 +74,7 @@ case_ffn = 90; // circle segments for fill
c = search([case_name],case_data);
case_design = case_data[c[0]][2]; // "shell", "panel", "stacked", "tray", "round"
case_design = case_data[c[0]][2]; // "shell", "panel", "stacked", "tray", "round", "snap"
case_style = case_data[c[0]][3]; // style of case_design
sbc_model = case_data[c[0]][1]; // any sbc from sbc model framework: "c1+","c2","c4","hc4"
@@ -341,7 +342,18 @@ if (view == "model") {
case_z+27]) rotate([-vu_rotation[0],0,180]) hk_speaker();
}
}
if(case_design == "round") {
if(case_design == "round" || case_design == "hex") {
if(lower_bottom >= 0) {
color("grey",1) translate([0,0,-lower_bottom]) case_bottom(case_design);
}
if(sbc_off == false) {
translate([pcb_loc_x ,pcb_loc_y,bottom_standoff[1]]) sbc(sbc_model);
}
if(raise_top >= 0) {
color("grey",1) translate([0,0,raise_top]) case_top(case_design);
}
}
if(case_design == "snap") {
if(lower_bottom >= 0) {
color("grey",1) translate([0,0,-lower_bottom]) case_bottom(case_design);
}
@@ -522,6 +534,52 @@ module case_bottom(case_design) {
}
}
if(case_design == "hex") {
difference() {
translate([pcb_width/2,pcb_depth/2,bottom_height/2]) rotate([0,0,30])
cylinder_fillet_inside(h=bottom_height, r=case_diameter/2,
top=0, bottom=c_fillet, $fn=6, fillet_fn=case_ffn, center=true);
translate([pcb_width/2,pcb_depth/2,(bottom_height/2)+floorthick]) rotate([0,0,30])
cylinder_fillet_inside(h=bottom_height+adjust+floorthick,
r=(case_diameter/2)-lip/2,top=0, bottom=c_fillet-1, $fn=6,
fillet_fn=case_ffn, center=true);
difference() {
translate([pcb_width/2,pcb_depth/2,bottom_height-lip]) rotate([0,0,30])
cylinder(h=lip+adjust, r=(case_diameter/2)+1, $fn=6);
translate([pcb_width/2,pcb_depth/2,bottom_height-lip]) rotate([0,0,30])
cylinder(h=lip+2*adjust, r=(case_diameter/2)-lip/4, $fn=6);
}
}
difference() {
translate([pcb_width/2,pcb_depth/2,(bottom_height/2)+2*floorthick]) rotate([0,0,30])
cylinder_fillet_inside(h=bottom_height+adjust+floorthick+lip,
r=(case_diameter/2)-lip/2,top=0, bottom=c_fillet-1, $fn=6,
fillet_fn=case_ffn, center=true);
translate([-16,(depth/2)-60,-adjust])
cube([width+10,110,bottom_height+top_height-2*floorthick-2]);
translate([width-9,(depth/2)-62.5,bottom_height])
cube([20,110,top_height-2*floorthick-2]);
}
}
if(case_design == "snap") {
difference() {
translate([(width/2)-wallthick-gap,(depth/2)-wallthick-gap,(bottom_height+top_height)/2])
cube_fillet_inside([width,depth,bottom_height+top_height+floorthick],
vertical=[c_fillet,c_fillet,c_fillet,c_fillet],
top=[0,0,0,0], bottom=[fillet,fillet,fillet,fillet,fillet], $fn=90);
translate([(width/2)-wallthick-gap,
(depth/2)-wallthick-gap,(bottom_height+top_height)/2+floorthick])
cube_fillet_inside([width-(wallthick*2),depth-(wallthick*2),bottom_height+top_height+floorthick+1],
vertical=[c_fillet-1,c_fillet-1,c_fillet-1,c_fillet-1],
top=[0,0,0,0], bottom=[fillet,fillet,fillet,fillet,fillet], $fn=90);
// snap top carveout
translate([-gap-wallthick+.5,(depth/2)-25-gap-wallthick,bottom_height+top_height-2])
rotate([0,45,0]) cube([4,50,4]);
translate([width-wallthick-gap-4-2,(depth/2)-25-gap-wallthick,bottom_height+top_height-2])
rotate([0,45,0]) cube([4,50,4]);
}
}
// additive accessories
for (i=[30:14:len(case_data[c[0]])-1]) {
class = case_data[c[0]][i];
@@ -967,22 +1025,70 @@ module case_top(case_design) {
}
if(case_design == "round") {
difference() {
translate([pcb_width/2,pcb_depth/2,case_z/2]) rotate([0,0,30])
translate([pcb_width/2,pcb_depth/2,(case_z+2)/2]) rotate([0,0,30])
cylinder_fillet_inside(h=top_height+lip, r=case_diameter/2,
top=fillet, bottom=0, $fn=case_fn, fillet_fn=case_ffn, center=true);
translate([pcb_width/2,pcb_depth/2,(case_z/2)-floorthick]) rotate([0,0,30])
cylinder_fillet_inside(h=top_height+lip, r=(case_diameter/2)-lip/2,
translate([pcb_width/2,pcb_depth/2,(case_z+2)/2-floorthick]) rotate([0,0,30])
cylinder_fillet_inside(h=top_height+lip, r=(case_diameter/2)-(wallthick/3)-tol,
top=fillet-1, bottom=0, $fn=case_fn, fillet_fn=case_ffn, center=true);
translate([pcb_width/2,pcb_depth/2,lip-1-adjust]) rotate([0,0,30])
cylinder(h=lip+2*adjust, r=(case_diameter/2)-(lip/2)+tol/2, $fn=case_fn);
// translate([pcb_width/2,pcb_depth/2,lip-1-adjust]) rotate([0,0,30])
// cylinder(h=lip+2*adjust, r=(case_diameter/2)-(lip/2)+tol/2, $fn=case_fn);
// io cutout
translate([width,(depth/2)-wallthick-gap,bottom_height-lip+top_height/2-floorthick])
cube_fillet_inside([18,depth-2*(wallthick+gap)-1,top_height+lip],
cube_fillet_inside([18,depth-2*(wallthick+gap)-1,top_height+lip+2],
vertical=[0,0,0,0], top=[0,0,0,0], bottom=[0,0,0,0], $fn=90);
}
translate([width-8.5+adjust,(depth/2)-32.5,bottom_height])
cube([wallthick-.5,depth-2-2*(floorthick+gap),top_height-floorthick-gap]);
}
if(case_design == "hex") {
difference() {
translate([pcb_width/2,pcb_depth/2,(case_z+2)/2]) rotate([0,0,30])
cylinder_fillet_inside(h=top_height+lip, r=case_diameter/2,
top=fillet, bottom=0, $fn=6, fillet_fn=case_ffn, center=true);
translate([pcb_width/2,pcb_depth/2,(case_z+2)/2-floorthick]) rotate([0,0,30])
cylinder_fillet_inside(h=top_height+lip, r=(case_diameter/2)-(wallthick/3)-tol,
top=fillet-1, bottom=0, $fn=6, fillet_fn=case_ffn, center=true);
// translate([pcb_width/2,pcb_depth/2,lip-1-adjust]) rotate([0,0,30])
// cylinder(h=lip+2*adjust, r=(case_diameter/2)-(lip/2)+tol/2, $fn=case_fn);
// io cutout
translate([width,(depth/2)-wallthick-gap,bottom_height-lip+top_height/2-floorthick])
cube_fillet_inside([18,depth-2*(wallthick+gap)-1,top_height+lip+2],
vertical=[0,0,0,0], top=[0,0,0,0], bottom=[0,0,0,0], $fn=90);
}
translate([width-8.5+adjust,(depth/2)-32,bottom_height])
cube([wallthick-.5,depth-3-2*(floorthick+gap),top_height-floorthick-gap]);
}
if(case_design == "snap") {
translate([(width/2)-wallthick-gap,(depth/2)-wallthick-gap,top_height+bottom_height+floorthick])
cube_fillet_inside([width,depth,floorthick],
vertical=[c_fillet,c_fillet,c_fillet,c_fillet],
top=[0,0,0,0],bottom=[fillet,fillet,fillet,fillet,fillet], $fn=90);
difference() {
translate([(width/2)-wallthick-gap,(depth/2)-wallthick-gap,top_height+bottom_height])
cube_fillet_inside([width-2*wallthick-tol,depth-2*wallthick-tol,floorthick*2],
vertical=[c_fillet,c_fillet,c_fillet,c_fillet],
top=[0,0,0,0],bottom=[fillet,fillet,fillet,fillet,fillet], $fn=90);
translate([(width/2)-wallthick-gap,(depth/2)-wallthick-gap,top_height+bottom_height])
cube_fillet_inside([width-(3*wallthick),depth-(3*wallthick),2*floorthick+adjust],
vertical=[c_fillet-1,c_fillet-1,c_fillet-1,c_fillet-1],top=[0,0,0,0],
bottom=[fillet,fillet,fillet,fillet,fillet], $fn=90);
}
// snap top outdent
difference() {
translate([-2.85,(depth/2)-25-gap-wallthick,bottom_height+top_height+floorthick-2])
rotate([0,45,0]) cube([4,50,4]);
translate([-1,(depth/2)-26-gap-wallthick,bottom_height+top_height+floorthick-5])
rotate([0,0,0]) cube([4,52,6]);
}
difference() {
translate([width-wallthick-gap-6.5,(depth/2)-25-gap-wallthick,bottom_height+top_height+floorthick-2])
rotate([0,45,0]) cube([4,50,4]);
translate([width-wallthick-gap-6.5,(depth/2)-26-gap-wallthick,bottom_height+top_height+floorthick-5])
rotate([0,0,0]) cube([4,52,6]);
}
}
for (i=[30:14:len(case_data[c[0]])-1]) {
class = case_data[c[0]][i];
type = case_data[c[0]][i+1];