added io masks, updated sbc_models, rockpro64 and jetsonnano cases, other cleanup

This commit is contained in:
Edward Kisiel
2022-05-14 21:10:28 -04:00
parent c9e9acf10a
commit 511c8929e8
6 changed files with 953 additions and 663 deletions

View File

@@ -1,6 +1,5 @@
/* /*
SBC Library Copyright 2016,2017,2018,2019,2020 Edward A. Kisiel SBC Library Copyright 2016,2017,2018,2019,2020,2021,2022 Edward A. Kisiel hominoid@cablemi.com
hominoid @ www.forum.odroid.com
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@@ -50,6 +49,37 @@
20220413 Version 1.0.6 adjusted slide_4x9, adjust m.2_header, rj45-usb2_double, rj45-usb3_double, out-in-spdif, 20220413 Version 1.0.6 adjusted slide_4x9, adjust m.2_header, rj45-usb2_double, rj45-usb3_double, out-in-spdif,
momentary_6x6x4, fixed color for usb2 micro otg, adjust all header heights, momentary_6x6x4, fixed color for usb2 micro otg, adjust all header heights,
added mipi_csi, mipi_dsi, m.2_stud added mipi_csi, mipi_dsi, m.2_stud
see https://github.com/hominoids/SBC_Case_Builder
place(x,y,size_x,size_y,rotation,side,type,pcbsize_z)
pcb_add(size_x,size_y,loc_x,loc_y,rotation,side,type,pcbsize_z,data_1,data_2) - "square","round"
pcb_sub(size_x,size_y,loc_x,loc_y,rotation,side,type,pcbsize_z,data_1,data_2) - "square","round","art"
pcb_art(scale_d1,type,dxf_file) - "dxf"
pcb(size, radius)
memory(x,y,rotation,side,type,pcbsize_z) - "emmc","emmc_plug","sodimm_5.2","sodimm_9.2"
switch(x,y,rotation,side,type,pcbsize_z) - "slide_4x9"
button(x,y,rotation,side,type,pcbsize_z) - "momentary_6x6x9","momentary_6x6x4","momentary_6x6x4_90","momentary_4x2x1"
plug(x,y,rotation,side,type,pcbsize_z) - "pwr2.5_5x7.5","pwr5.5_7.5x11.5","pwr5.5_10x10","rtc_micro","audio_micro","uart_micro","molex_4x1","small_encl_satapwr"
usb2(x,y,rotation,side,type,pcbsize_z) - "single_vert_a","double_stacked_a","micro"
usb3(x,y,rotation,side,type,pcbsize_z) - "double_stacked_a"
network(x,y,rotation,side,type,pcbsize_z) - "rj45_single"
video(x,y,rotation,side,type,pcbsize_z - "hdmi_a","dp-hdmi_a","mipi_csi","mipi_dsi"
fan(x,y,rotation,side,type,pcbsize_z) - "micro","encl_pmw","encl_pmw_h"
gpio(x,y,rotation,side,type,pcbsize_z) - "encl_header_30","encl_header_12","header_40","header_20"
ic(x,y,rotation,side,type,pcbsize_z) - "ic_2.8x2.8","ic_3x3","ic_3.7x3.7","ic_4x4","ic_4.7x4.7","ic_5x5","ic_5.75x5.75","ic_6x6","ic_6.4x6.4",ic_6.75x6.75",
"ic_7x7","ic_4.3x5.1","ic_5.4x5.3","ic_6.7x8.4","ic_9x9","ic_11x8","ic_13x8","ic_13x9","ic_16x10"
audio(x,y,rotation,side,type,pcbsize_z) - "out-in-spdif","jack_3.5"
storage(x,y,rotation,side,type,pcbsize_z) - "sdcard","sdcard_i","sata_header","sata_power_vrec","sata_encl_power","sata_encl_header","m.2_header","m.2_stud"
combo(x,y,rotation,side,type,pcbsize_z) - "rj45-usb2_double","rj45-usb3_double"
jumper(x,y,rotation,side,type,pcbsize_z) - "header_2x1","header_3x2","header_5x1","header_6x1","header_7x1"
misc(x,y,rotation,side,type,pcbsize_z) - "ir_1","led_3x1.5","lcd_2.2","bat_hold_1"
heatsink(x,y,rotation,side,type,pcbsize_z,soc1size_z) - "hc4_oem","c4_oem","c2_oem","c1+_oem","xu4_oem","n1_oem","xu4q_oem","n2_oem","n2+_oem","m1_oem","h2_oem"
pcie(x,y,rotation,side,type,pcbsize_z) - "x4"
jst_ph(x,y,rotation,side,type,pcbsize_z) - type is #pins
cm_holder(x,y,rotation,side,type,pcbsize_z) - jetsonnano
cm(x,y,rotation,side,type,pcbsize_z) - jetsonnano
*/ */
module place(x,y,size_x,size_y,rotation,side,type,pcbsize_z) { module place(x,y,size_x,size_y,rotation,side,type,pcbsize_z) {
@@ -220,12 +250,12 @@ module memory(x,y,rotation,side,type,pcbsize_z) {
module switch(x,y,rotation,side,type,pcbsize_z) { module switch(x,y,rotation,side,type,pcbsize_z) {
// boot selector switch // boot selector switch
if(type=="slide_4x9") { if(type=="slide_4x9") {
size_x = 3.75; size_x = 9;
size_y = 9.1; size_y = 3.75;
place(x,y,size_x,size_y,rotation,side,type,pcbsize_z) place(x,y,size_x,size_y,rotation,side,type,pcbsize_z)
union() { union() {
color("silver") translate([0,0,.5]) cube([size_x, size_y, 3.5]); color("silver") translate([0,0,.5]) cube([size_x, size_y, 3.5]);
color("white") translate([3.75,4.5,1.75]) cube([3, 2, 1.5]); color("white") translate([3.75,-1.99,1.75]) cube([3, 2, 1.5]);
} }
} }
} }
@@ -1489,19 +1519,19 @@ module heatsink(x,y,rotation,side,type,pcbsize_z,soc1size_z) {
if(type=="n2_oem") { if(type=="n2_oem") {
size_x = 90; size_x = 90;
size_y = 90; size_y = 90;
place(x,y,size_x,size_y,rotation,side,type,(pcbsize_z-pcbsize_z-3)) place(x,y,size_x,size_y,rotation,side,type,-3)
color("gray") import("Odroid-N2_Heatsink.stl", convexity=3); color("gray") import("Odroid-N2_Heatsink.stl", convexity=3);
} }
if(type=="n2+_oem") { if(type=="n2+_oem") {
size_x = 90; size_x = 90;
size_y = 90; size_y = 90;
place(x,y,size_x,size_y,rotation,side,type,(pcbsize_z-pcbsize_z-3)) place(x,y,size_x,size_y,rotation,side,type,-3)
color("gray") import("Odroid-N2+_Heatsink.stl", convexity=3); color("gray") import("Odroid-N2+_Heatsink.stl", convexity=3);
} }
if(type=="m1_oem") { if(type=="m1_oem") {
size_x = 90; size_x = 90;
size_y = 122; size_y = 122;
place(x,y,size_x,size_y,rotation,side,type,(pcbsize_z-pcbsize_z-3)) place(x,y,size_x,size_y,rotation,side,type,-3)
color("gray") translate([-.5,0,3]) rotate([0,0,0]) import("Odroid-M1_Heatsink.stl", convexity=3); color("gray") translate([-.5,0,3]) rotate([0,0,0]) import("Odroid-M1_Heatsink.stl", convexity=3);
} }
if(type=="h2_oem") { if(type=="h2_oem") {

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,6 @@
/* /*
SBC Models Copyright 2016,2017,2018,2019,2020 Edward A. Kisiel SBC Models Copyright 2016,2017,2018,2019,2020,2021,2022 Edward A. Kisiel hominoid@cablemi.com
hominoid @ www.forum.odroid.com
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
@@ -28,6 +27,8 @@
20201021 Version 1.0.4 Added HK Odroid-HC4 as "hc4" 20201021 Version 1.0.4 Added HK Odroid-HC4 as "hc4"
20220202 Version 1.0.5 Added HK Show2 as "show2" 20220202 Version 1.0.5 Added HK Show2 as "show2"
20220413 Version 1.0.6 Added Odroid-M1 as "m1" 20220413 Version 1.0.6 Added Odroid-M1 as "m1"
see https://github.com/hominoids/SBC_Case_Builder
USE: sbc(model) USE: sbc(model)
model = "c1+","c2","c4","xu4","xu4q","mc1","hc1","hc4","n1","n2","n2+","h2" model = "c1+","c2","c4","xu4","xu4q","mc1","hc1","hc4","n1","n2","n2+","h2"

View File

@@ -1,6 +1,5 @@
/* /*
SBC Case Builder Copyright 2022 Edward A. Kisiel SBC Case Builder Copyright 2022 Edward A. Kisiel hominoid@cablemi.com
hominoid @ www.forum.odroid.com
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@@ -26,8 +25,9 @@
20220320 Version 1.2.1 added cases c1+_shell_boombox, c1+_panel_boombox, c1+_tray_boombox, 20220320 Version 1.2.1 added cases c1+_shell_boombox, c1+_panel_boombox, c1+_tray_boombox,
c2_shell_boombox, c2_panel_boombox, c2_deskboom_lcd3.5, c2_tray_boombox, c2_shell_boombox, c2_panel_boombox, c2_deskboom_lcd3.5, c2_tray_boombox,
c4_shell_boombox, c4_panel_boombox, c4_deskboom_lcd3.5, c4_tray_boombox c4_shell_boombox, c4_panel_boombox, c4_deskboom_lcd3.5, c4_tray_boombox
20220406 Version 1.2.2 various case adjustments 20220406 Version 1.2.2 various case adjustments
see https://github.com/hominoids/SBC_Case_Builder
*/ */
/* Instructions: All measurements from lower left corner of PCB to lower left /* Instructions: All measurements from lower left corner of PCB to lower left
@@ -1388,7 +1388,40 @@ case_data = [
[6.75,11.4,3.6,10,4,1,0,0,0,4.5,5.1], // bottom_pcb_standoff [6.75,11.4,3.6,10,4,1,0,0,0,4.5,5.1], // bottom_pcb_standoff
[6.75,15,2.5,10,4,4,0,1,1,4.5,5.1], // top_ext_standoff [6.75,15,2.5,10,4,4,0,1,1,4.5,5.1], // top_ext_standoff
[6.75,11.4,3.6,10,4,2,0,0,0,4.5,5.1], // bottom_ext_standoff [6.75,11.4,3.6,10,4,2,0,0,0,4.5,5.1], // bottom_ext_standoff
"sub","rectangle",17.5,36,28.5,"top",[0,0,0],62,43,4,0,0,"",[1,1,1,1]], // sub heatsink opening "sub","rectangle",17.5,36.375,28.5,"top",[0,0,0],62,43,4,0,0,"",[1,1,1,1]], // sub heatsink opening
["jetsonnano_panel","jetsonnano","panel","none", // case_name, sbc_model, case_design, case_style
0,0,0,0,0,-5,3, // pcb_loc_x,pcb_loc_y,pcb_loc_z,case_offset_x,case_offset_y,case_offset_tz,case_offset_bz,
2,2,2,1.5,[3,0], // wallthick,floorthick,sidethick,gap,fillet
false,false,false,true,true, // indents,sidewall_support,sbc_top_standoffs,sbc_bottom_standoffs,case_ext_standoffs
false,"vent","fan","vent","true", // sata_punchout,gpio_opening,cooling,exhaust_vents,mode
[6.75,15,2.5,10,4,4,0,1,0,4.5,5.1], // top_pcb_standoff
[6.75,11.4,3.6,10,4,1,0,0,0,4.5,5.1], // bottom_pcb_standoff
[6.75,15,2.5,10,4,4,0,1,1,4.5,5.1], // top_ext_standoff
[6.75,11.4,3.6,10,4,2,0,0,0,4.5,5.1], // bottom_ext_standoff
"sub","rectangle",17.5,36.375,28.5,"top",[0,0,0],62,43,4,0,0,"",[1,1,1,1]], // sub heatsink opening
["jetsonnano_stacked","jetsonnano","stacked","none", // case_name, sbc_model, case_design, case_style
0,0,0,0,0,-5,3, // pcb_loc_x,pcb_loc_y,pcb_loc_z,case_offset_x,case_offset_y,case_offset_tz,case_offset_bz,
2,2,2,1.5,[3,0], // wallthick,floorthick,sidethick,gap,fillet
false,false,true,true,true, // indents,sidewall_support,sbc_top_standoffs,sbc_bottom_standoffs,case_ext_standoffs
false,"vent","fan","vent","true", // sata_punchout,gpio_opening,cooling,exhaust_vents,mode
[6.75,15,2.5,10,4,4,0,1,0,4.5,5.1], // top_pcb_standoff
[6.75,11.4,3.6,10,4,1,0,0,0,4.5,5.1], // bottom_pcb_standoff
[6.75,15,2.5,10,4,4,0,1,1,4.5,5.1], // top_ext_standoff
[6.75,11.4,3.6,10,4,2,0,0,0,4.5,5.1], // bottom_ext_standoff
"sub","rectangle",17.5,36.375,28.5,"top",[0,0,0],62,43,4,0,0,"",[1,1,1,1]], // sub heatsink opening
["jetsonnano_tray","jetsonnano","tray","none", // case_name, sbc_model, case_design, case_style
0,0,0,0,0,-5,3, // pcb_loc_x,pcb_loc_y,pcb_loc_z,case_offset_x,case_offset_y,case_offset_tz,case_offset_bz,
2,2,2,1.5,[3,0], // wallthick,floorthick,sidethick,gap,fillet
false,false,false,true,true, // indents,sidewall_support,sbc_top_standoffs,sbc_bottom_standoffs,case_ext_standoffs
false,"vent","fan","vent","true", // sata_punchout,gpio_opening,cooling,exhaust_vents,mode
[6.75,15,2.5,10,4,4,0,1,0,4.5,5.1], // top_pcb_standoff
[6.75,11.4,3.6,10,4,1,0,0,0,4.5,5.1], // bottom_pcb_standoff
[6.75,15,2.5,10,4,4,0,1,1,4.5,5.1], // top_ext_standoff
[6.75,11.4,3.6,10,4,2,0,0,0,4.5,5.1], // bottom_ext_standoff
"sub","rectangle",17.5,36.375,28.5,"top",[0,0,0],62,43,8,0,0,"",[1,1,1,1]], // sub heatsink opening
["rockpro64_shell","rockpro64","shell","none", // case_name, sbc_model, case_design, case_style ["rockpro64_shell","rockpro64","shell","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, 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,
@@ -1399,9 +1432,46 @@ case_data = [
[6.75,11.4,3.6,10,4,1,0,0,0,4.5,5.1], // bottom_pcb_standoff [6.75,11.4,3.6,10,4,1,0,0,0,4.5,5.1], // bottom_pcb_standoff
[6.75,15,2.5,10,4,4,0,1,1,4.5,5.1], // top_ext_standoff [6.75,15,2.5,10,4,4,0,1,1,4.5,5.1], // top_ext_standoff
[6.75,11.4,3.6,10,4,2,0,0,0,4.5,5.1], // bottom_ext_standoff [6.75,11.4,3.6,10,4,2,0,0,0,4.5,5.1], // bottom_ext_standoff
"sub","fan",43,26,25,"top",[0,0,0],40,0,6,2,0,"",0, // sub fan opening
"sub","rectangle",43,0,25,"top",[0,0,0],40,10,6,0,0,"",[1,1,1,1]], // sub pcie opening
["rockpro64_panel","rockpro64","panel","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,2,1.5,[3,3], // wallthick,floorthick,sidethick,gap,fillet
false,false,false,true,true, // indents,sidewall_support,sbc_top_standoffs,sbc_bottom_standoffs,case_ext_standoffs
false,"vent","fan","vent","true", // sata_punchout,gpio_opening,cooling,exhaust_vents,mode
[6.75,15,2.5,10,4,4,0,1,0,4.5,5.1], // top_pcb_standoff
[6.75,11.4,3.6,10,4,1,0,0,0,4.5,5.1], // bottom_pcb_standoff
[6.75,15,2.5,10,4,4,0,1,1,4.5,5.1], // top_ext_standoff
[6.75,11.4,3.6,10,4,2,0,0,0,4.5,5.1], // bottom_ext_standoff
"sub","fan",43,26,24,"top",[0,0,0],40,0,6,2,0,"",0, // sub fan opening
"sub","rectangle",43,0,24.5,"top",[0,0,0],40,10,6,0,0,"",[1,1,1,1]], // sub pcie opening "sub","rectangle",43,0,24.5,"top",[0,0,0],40,10,6,0,0,"",[1,1,1,1]], // sub pcie opening
["rockpro64_stacked","rockpro64","stacked","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,2,1.5,[3,3], // wallthick,floorthick,sidethick,gap,fillet
false,true,true,true,true, // indents,sidewall_support,sbc_top_standoffs,sbc_bottom_standoffs,case_ext_standoffs
false,"vent","fan","vent","true", // sata_punchout,gpio_opening,cooling,exhaust_vents,mode
[6.75,15,2.5,10,4,4,0,1,0,4.5,5.1], // top_pcb_standoff
[6.75,11.4,3.6,10,4,1,0,0,0,4.5,5.1], // bottom_pcb_standoff
[6.75,15,2.5,10,4,4,0,1,1,4.5,5.1], // top_ext_standoff
[6.75,11.4,3.6,10,4,2,0,0,0,4.5,5.1], // bottom_ext_standoff
"sub","fan",43,26,24,"top",[0,0,0],40,0,6,2,0,"",0, // sub fan opening
"sub","rectangle",43,0,24.5,"top",[0,0,0],40,10,6,0,0,"",[1,1,1,1]], // sub pcie opening
["rockpro64_tray","rockpro64","tray","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,2,1.5,[3,3], // wallthick,floorthick,sidethick,gap,fillet
false,true,false,true,true, // indents,sidewall_support,sbc_top_standoffs,sbc_bottom_standoffs,case_ext_standoffs
false,"vent","fan","vent","true", // sata_punchout,gpio_opening,cooling,exhaust_vents,mode
[6.75,15,2.5,10,4,4,0,1,0,4.5,5.1], // top_pcb_standoff
[6.75,11.4,3.6,10,4,1,0,0,0,4.5,5.1], // bottom_pcb_standoff
[6.75,15,2.5,10,4,4,0,1,1,4.5,5.1], // top_ext_standoff
[6.75,11.4,3.6,10,4,2,0,0,0,4.5,5.1], // bottom_ext_standoff
"sub","fan",43,26,25,"top",[0,0,0],40,0,6,2,0,"",0, // sub fan opening
"sub","rectangle",43,0,24.5,"top",[0,0,0],40,10,8,0,0,"",[1,1,1,1]], // sub pcie opening
["test","test","shell","none", // case_name, sbc_model, case_design, case_style ["test","test","shell","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, 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,2,[3.5,3], // wallthick,floorthick,sidethick,gap,fillet 2,2,3,2,[3.5,3], // wallthick,floorthick,sidethick,gap,fillet

View File

@@ -1,6 +1,5 @@
/* /*
SBC Case Builder Copyright 2022 Edward A. Kisiel SBC Case Builder Copyright 2022 Edward A. Kisiel hominoid@cablemi.com
hominoid @ www.forum.odroid.com
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@@ -33,6 +32,7 @@
enabled pcb_z, added tabs and fixed tray case top, other fixes and maintenance enabled pcb_z, added tabs and fixed tray case top, other fixes and maintenance
20220406 Version 1.2.2 added vu7c, vu8m and weatherboard2 models, other additions, fixes and maintenance 20220406 Version 1.2.2 added vu7c, vu8m and weatherboard2 models, other additions, fixes and maintenance
see https://github.com/hominoids/SBC_Case_Builder
*/ */
use <./lib/sbc_models.scad>; use <./lib/sbc_models.scad>;
@@ -41,7 +41,7 @@ use <./lib/fillets.scad>;
include <./lib/sbc_models.cfg>; include <./lib/sbc_models.cfg>;
include <./sbc_case_builder.cfg>; include <./sbc_case_builder.cfg>;
case_name = "rockpro64_shell"; // case_name to load from sbc_case_builder.cfg case_name = "rockpro64_shell"; // case_name to load from sbc_case_builder.cfg
view = "model"; // viewing mode "platter", "model", "debug" view = "model"; // viewing mode "platter", "model", "debug"
highlight = false; // enable highlight for subtarctive geometry (true or false) highlight = false; // enable highlight for subtarctive geometry (true or false)

View File

@@ -1,5 +1,5 @@
/* /*
SBC Case Builder Library Copyright 2022 Edward A. Kisiel, hominoid @ www.forum.odroid.com SBC Case Builder Library Copyright 2022 Edward A. Kisiel hominoid@cablemi.com
Contributions: Contributions:
hk_vu8m(brackets),u_bracket(),screw(),m1_hdmount() Copyright 2022 Tomek Szczęsny, mctom @ www.forum.odroid.com hk_vu8m(brackets),u_bracket(),screw(),m1_hdmount() Copyright 2022 Tomek Szczęsny, mctom @ www.forum.odroid.com
@@ -41,11 +41,12 @@
embelished boom_speaker(), changed boom_speaker_holder(style, tolerance), added boom_speaker_strap(), embelished boom_speaker(), changed boom_speaker_holder(style, tolerance), added boom_speaker_strap(),
adjusted access_port(), access_cover(), added @mctom's hk_vu8m(bracket), u_bracket(), spacer() adjusted access_port(), access_cover(), added @mctom's hk_vu8m(bracket), u_bracket(), spacer()
2022xxxx version 1.2.x removed spacer(); added screw(); modified hk_vu8m(); added m1_hdmount(); added hdd35_25holder(length) 2022xxxx version 1.2.x removed spacer(); added screw(); modified hk_vu8m(); added m1_hdmount(); added hdd35_25holder(length)
see https://github.com/hominoids/SBC_Case_Builder
place(x,y,z,size_x,size_y,rotation,side) place(x,y,z,size_x,size_y,rotation,side)
add(type,loc_x,loc_y,loc_z,size_x,size_y,size_z,rotation,face,side,case_z,data_1,data_2,data_3,data_4) add(type,loc_x,loc_y,loc_z,size_x,size_y,size_z,rotation,face,side,case_z,data_1,data_2,data_3,data_4)
sub(type,loc_x,loc_y,loc_z,size_x,size_y,size_z,rotation,face,side,case_z,data_1,data_2,data_3,data_4) sub(type,loc_x,loc_y,loc_z,size_x,size_y,size_z,rotation,face,side,case_z,data_1,data_2,data_3,data_4)
art(scale_d1,type,size_z) art(scale_d1,type,size_z)
screw(screw[d, l, style]) screw(screw[d, l, style])
slab(size, radius) slab(size, radius)
@@ -110,7 +111,6 @@
mask(loc_x,loc_y,rotation,side,class,type,case_z,wallthick,gap,floorthick,pcb_z) mask(loc_x,loc_y,rotation,side,class,type,case_z,wallthick,gap,floorthick,pcb_z)
punchout(width,depth,gap,thick,fillet,shape) punchout(width,depth,gap,thick,fillet,shape)
*/ */
use <./lib/fillets.scad>; use <./lib/fillets.scad>;
@@ -2541,42 +2541,70 @@ module mask(loc_x,loc_y,loc_z,rotation,side,class,type,wallthick,gap,floorthick,
} }
// emmc storage // emmc storage
if(type == "emmc" && side == "bottom" && rotation == 0) { if(type == "emmc" && side == "bottom" && rotation == 0) {
place(loc_x-.5,loc_y,floorthick+adjust,14.5,19,rotation,side) place(loc_x-.5,loc_y-.5,floorthick+adjust,14.5,19.5,rotation,side)
cube([14.5,19,floorthick+(2*adjust)]); cube([14.5,19.5,floorthick+(2*adjust)]);
} }
if(type == "emmc" && side == "bottom" && rotation == 90) { if(type == "emmc" && side == "bottom" && rotation == 90) {
place(loc_x,loc_y-.5,floorthick+adjust,14.5,19,rotation,side) place(loc_x-.5,loc_y-.5,floorthick+adjust,14.5,19.5,rotation,side)
cube([14.5,19,floorthick+(2*adjust)]); cube([14.5,19.5,floorthick+(2*adjust)]);
}
if(type == "emmc" && side == "bottom" && rotation == 180) {
place(loc_x-.5,loc_y-.5,floorthick+adjust,14.5,19.5,rotation,side)
cube([14.5,19.5,floorthick+(2*adjust)]);
}
if(type == "emmc" && side == "bottom" && rotation == 270) {
place(loc_x-.5,loc_y-.5,floorthick+adjust,14.5,19.5,rotation,side)
cube([14.5,19.5,floorthick+(2*adjust)]);
} }
// sd storage // sd storage
if(type == "sdcard" && side == "bottom" && rotation == 0) { if(type == "sdcard" && side == "bottom" && rotation == 0) {
place(loc_x,loc_y,loc_z,12,15.5,rotation,side) place(loc_x,loc_y-5,loc_z,12,15.5,rotation,side)
translate([-1,-10,3.5]) cube([13,15.5,2]); translate([-1,-10,3.5]) cube([13,15.5,2]);
} }
if(type == "sdcard" && side == "bottom" && rotation == 90) { if(type == "sdcard" && side == "bottom" && rotation == 90) {
place(loc_x+(2*(wallthick+gap+adjust)),loc_y,loc_z-2.75,12,15.5,rotation,side) place(loc_x+5,loc_y,loc_z-2.75,12,15.5,rotation,side)
cube([12,15.5,2]); cube([12,15.5,2]);
} }
if(type == "sdcard" && side == "bottom" && rotation == 180) { if(type == "sdcard" && side == "bottom" && rotation == 180) {
place(loc_x,loc_y+(2*(wallthick+gap+adjust)),loc_z-2.75,12,15.5,rotation,side) place(loc_x,loc_y+5,loc_z-2.75,12,15.5,rotation,side)
cube([12,15.5,2]); cube([12,15.5,2]);
} }
if(type == "sdcard_i" && side == "bottom" && rotation == 180) {
place(loc_x,loc_y+(2*(wallthick+gap+adjust)),floorthick+adjust+4,12,18.5,rotation,side)
cube([12,18.5,floorthick+(2*adjust)+4]);
}
if(type == "sdcard" && side == "bottom" && rotation == 270) { if(type == "sdcard" && side == "bottom" && rotation == 270) {
place(loc_x,loc_y,loc_z,12,15.5,rotation,side) place(loc_x+5,loc_y,loc_z,12,15.5,rotation,side)
translate([0,-18,2.75]) cube([12,15.5,2]); translate([0,-18,2.75]) cube([12,15.5,2]);
} }
if(type == "sdcard" && side == "top" && rotation == 0) { if(type == "sdcard" && side == "top" && rotation == 0) {
place(loc_x,loc_y-17,loc_z,12,15.5,rotation,side) place(loc_x,loc_y-15,loc_z,12,15.5,rotation,side)
translate([0,0,1.75]) cube([12,15.5,2]);
}
if(type == "sdcard" && side == "top" && rotation == 90) {
place(loc_x-15,loc_y-.5,loc_z,12,15.5,rotation,side)
translate([0,0,1.75]) cube([12,15.5,2]); translate([0,0,1.75]) cube([12,15.5,2]);
} }
if(type == "sdcard" && side == "top" && rotation == 180) { if(type == "sdcard" && side == "top" && rotation == 180) {
place(loc_x,loc_y+4,loc_z,12,15.5,rotation,side) place(loc_x-.5,loc_y+5,loc_z,12,15.5,rotation,side)
translate([0,0,1.75]) cube([12,15.5,2]); translate([0,0,1.75]) cube([12,15.5,2]);
} }
if(type == "sdcard" && side == "top" && rotation == 270) {
place(loc_x+5,loc_y,loc_z,12,15.5,rotation,side)
translate([0,0,1.75]) cube([12,15.5,2]);
}
if(type == "sdcard_i" && side == "bottom" && rotation == 0) {
place(loc_x,loc_y-18.5,floorthick+adjust+4,12,18.5,rotation,side)
cube([12,18.5,floorthick+(2*adjust)+4]);
}
if(type == "sdcard_i" && side == "bottom" && rotation == 90) {
place(loc_x+5.5,loc_y-.25,floorthick+adjust+4,12,18.5,rotation,side)
cube([12,18.5,floorthick+(2*adjust)+4]);
}
if(type == "sdcard_i" && side == "bottom" && rotation == 180) {
place(loc_x,loc_y+5.5,floorthick+adjust+4,12,18.5,rotation,side)
cube([12,18.5,floorthick+(2*adjust)+4]);
}
if(type == "sdcard_i" && side == "bottom" && rotation == 270) {
place(loc_x-18.5,loc_y-.25,floorthick+adjust+4,12,18.5,rotation,side)
cube([12,18.5,floorthick+(2*adjust)+4]);
}
// rj45 opening // rj45 opening
if(type == "rj45_single" && rotation == 0) { if(type == "rj45_single" && rotation == 0) {
place(loc_x,loc_y-6,loc_z,16,17.5,rotation,side) place(loc_x,loc_y-6,loc_z,16,17.5,rotation,side)
@@ -2629,61 +2657,185 @@ module mask(loc_x,loc_y,loc_z,rotation,side,class,type,wallthick,gap,floorthick,
cube([6.5,8,15]); cube([6.5,8,15]);
} }
// ir opening // ir opening
if(type == "ir_1") { if(type == "ir_1" && rotation == 0) {
place(loc_x,loc_y,loc_z,6,6,rotation,side) place(loc_x,loc_y,loc_z,6,6,rotation,side)
translate([2.5,wallthick+gap,7.5]) rotate([90,0,0]) cylinder(d=6, h=9); translate([3.5,2,7.5]) rotate([90,0,0]) cylinder(d=6, h=9);
}
if(type == "ir_1" && rotation == 90) {
place(loc_x,loc_y,loc_z,6,6,rotation,side)
translate([2.5,2,7.5]) rotate([90,0,0]) cylinder(d=6, h=9);
}
if(type == "ir_1" && rotation == 180) {
place(loc_x,loc_y,loc_z,6,6,rotation,side)
translate([2.5,5,7.5]) rotate([90,0,0]) cylinder(d=6, h=9);
}
if(type == "ir_1" && rotation == 270) {
place(loc_x,loc_y,loc_z,6,6,rotation,side)
translate([3.375,5,7.5]) rotate([90,0,0]) cylinder(d=6, h=9);
} }
// switch opening // switch opening
if(type == "slide_4x9" && rotation == 0) { if(type == "slide_4x9" && rotation == 0) {
place(loc_x+(wallthick+gap+adjust),loc_y,loc_z,4,9.1,rotation,side) place(loc_x,loc_y,loc_z,4,9,rotation,side)
translate([0,0,.5]) cube([15.75,9.1,4]); translate([0,-6,.25]) cube([9,8,4]);
}
if(type == "slide_4x9" && rotation == 90) {
place(loc_x,loc_y,loc_z,4,9,rotation,side)
translate([-5,-6,.25]) cube([9,8,4]);
}
if(type == "slide_4x9" && rotation == 180) {
place(loc_x,loc_y,loc_z,4,9,rotation,side)
translate([-5,-.5,.25]) cube([9,8,4]);
} }
if(type == "slide_4x9" && rotation == 270) { if(type == "slide_4x9" && rotation == 270) {
place(loc_x,loc_y,loc_z,4,9.1,rotation,side) place(loc_x,loc_y,loc_z,4,9,rotation,side)
translate([0,0,.5]) cube([15.75,9.1,4]); translate([0,-.75,.25]) cube([9,8,4]);
} }
// rj45-usb2_double opening // rj45-usb2_double opening
if(type == "rj45-usb2_double" && rotation == 0) { if(type == "rj45-usb2_double" && rotation == 0) {
place(loc_x,loc_y-2*(wallthick+gap)-adjust,loc_z,19,28,rotation,side) place(loc_x,loc_y-6,loc_z,19,28,rotation,side)
cube([19,28,31]); cube([19,8,31]);
}
if(type == "rj45-usb2_double" && rotation == 90) {
place(loc_x-6,loc_y,loc_z,19,28,rotation,side)
cube([19,8,31]);
}
if(type == "rj45-usb2_double" && rotation == 180) {
place(loc_x,loc_y+6,loc_z,19,28,rotation,side)
cube([19,8,31]);
}
if(type == "rj45-usb2_double" && rotation == 270) {
place(loc_x+6,loc_y,loc_z,19,28,rotation,side)
cube([19,8,31]);
} }
// rj45-usb3_double opening // rj45-usb3_double opening
if(type == "rj45-usb3_double" && rotation == 0) { if(type == "rj45-usb3_double" && rotation == 0) {
place(loc_x,loc_y-2*(wallthick+gap)-adjust,loc_z,19.5,28,rotation,side) place(loc_x-.25,loc_y-6,loc_z,19.5,28,rotation,side)
cube([19.5,28,31]); cube([19.5,8,31.25]);
}
if(type == "rj45-usb3_double" && rotation == 90) {
place(loc_x-6,loc_y-.25,loc_z,19.5,28,rotation,side)
cube([19.5,8,31.25]);
}
if(type == "rj45-usb3_double" && rotation == 180) {
place(loc_x+.25,loc_y+6,loc_z,19.5,28,rotation,side)
cube([19.5,8,31.25]);
}
if(type == "rj45-usb3_double" && rotation == 270) {
place(loc_x+6,loc_y-.25,loc_z,19.5,28,rotation,side)
cube([19.5,8,31.25]);
} }
// out-in-spdif opening // out-in-spdif opening
if(type == "out-in-spdif" && rotation == 0) { if(type == "out-in-spdif" && rotation == 0) {
place(loc_x,loc_y-2*(wallthick+gap)-adjust,loc_z,13,21.65,rotation,side) place(loc_x-.1,loc_y-6,loc_z,13,21.65,rotation,side)
cube([13,21.65,35.5]); cube([13,8,35.5]);
}
if(type == "out-in-spdif" && rotation == 90) {
place(loc_x-6,loc_y-.1,loc_z,13,21.65,rotation,side)
cube([13,8,35.5]);
}
if(type == "out-in-spdif" && rotation == 180) {
place(loc_x-.2,loc_y+6,loc_z,13,21.65,rotation,side)
cube([13,8,35.5]);
}
if(type == "out-in-spdif" && rotation == 270) {
place(loc_x+6,loc_y-.1,loc_z,13,21.65,rotation,side)
cube([13,8,35.5]);
} }
// dp-hdmi_a opening // dp-hdmi_a opening
if(type == "dp-hdmi_a" && rotation == 0) { if(type == "dp-hdmi_a" && rotation == 0) {
place(loc_x-.5,loc_y-2*(wallthick+gap)-adjust,loc_z,19,18,rotation,side) place(loc_x-.5,loc_y-6,loc_z,19,18,rotation,side)
cube([19,18,19]); cube([19,8,19.25]);
}
if(type == "dp-hdmi_a" && rotation == 90) {
place(loc_x-6,loc_y-.5,loc_z,19,18,rotation,side)
cube([19,8,19.25]);
}
if(type == "dp-hdmi_a" && rotation == 180) {
place(loc_x-.5,loc_y+6,loc_z,19,18,rotation,side)
cube([19,8,19.25]);
}
if(type == "dp-hdmi_a" && rotation == 270) {
place(loc_x+6,loc_y-.5,loc_z,19,18,rotation,side)
cube([19,8,19.25]);
} }
// sata_encl_power opening // sata_encl_power opening
if(type == "sata_encl_power" && rotation == 0) { if(type == "sata_encl_power" && rotation == 0) {
place(loc_x,loc_y,loc_z,38.5,7.5,rotation,side) place(loc_x,loc_y,loc_z,38.5,7.5,rotation,side)
translate([1,9.5+adjust,3]) rotate([90,0,0]) slot(7.5,38.5,wallthick+2*adjust); translate([1,14,3]) rotate([90,0,0]) slot(7.5,38.5,10);
}
if(type == "sata_encl_power" && rotation == 90) {
place(loc_x,loc_y,loc_z,38.5,7.5,rotation,side)
translate([-1,14,3]) rotate([90,0,0]) slot(7.5,38.5,10);
}
if(type == "sata_encl_power" && rotation == 180) {
place(loc_x,loc_y,loc_z,38.5,7.5,rotation,side)
translate([-1,8,3]) rotate([90,0,0]) slot(7.5,38.5,10);
}
if(type == "sata_encl_power" && rotation == 270) {
place(loc_x,loc_y,loc_z,38.5,7.5,rotation,side)
translate([1,8,3]) rotate([90,0,0]) slot(7.5,38.5,10);
} }
// audio jack opening // audio jack opening
if(type == "jack_3.5" && rotation == 0) {
place(loc_x,loc_y,loc_z,7.5,7.5,rotation,side)
union() {
translate([3.25,2,2]) rotate([90,0,0]) cylinder(d=5, h=8);
translate([-.5,-.5,0]) cube([7.5,2.5,4.5]);
}
}
if(type == "jack_3.5" && rotation == 90) {
place(loc_x,loc_y,loc_z,7.5,7.5,rotation,side)
union() {
translate([4.1,2,2]) rotate([90,0,0]) cylinder(d=5, h=8);
translate([.5,-.5,0]) cube([7.5,2.5,4.5]);
}
}
if(type == "jack_3.5" && rotation == 180) { if(type == "jack_3.5" && rotation == 180) {
place(loc_x,loc_y+wallthick+gap,loc_z,7.5,7.5,rotation,side) place(loc_x,loc_y,loc_z,7.5,7.5,rotation,side)
translate([4,0,2.25]) rotate([90,0,0]) cylinder(d=5, h=9); union() {
translate([4.1,-2.5,2]) rotate([90,0,0]) cylinder(d=5, h=8);
translate([.5,-5,0]) cube([7.5,2.5,4.5]);
}
} }
if(type == "jack_3.5" && rotation == 270) { if(type == "jack_3.5" && rotation == 270) {
place(loc_x,loc_y+wallthick+gap,loc_z,5,5,rotation,side) place(loc_x,loc_y,loc_z,7.5,7.5,rotation,side)
translate([-.5,-6,2]) rotate([90,0,0]) cylinder(d=5, h=9); union() {
translate([3,-2.5,2]) rotate([90,0,0]) cylinder(d=5, h=8);
translate([-.5,-5,0]) cube([7.5,2.5,4.5]);
}
} }
// button opening // button opening
if(type == "momentary_6x6x4") { if(type == "momentary_6x6x4") {
place(loc_x,loc_y,loc_z,6,6,rotation,side) place(loc_x,loc_y,loc_z,6,6,rotation,side)
translate([3,3,5]) rotate([0,0,0]) cylinder(d=5, h=50); translate([3,3,4]) rotate([0,0,0]) cylinder(d=5, h=50);
}
if(type == "momentary_6x6x4_90" && rotation == 0) {
place(loc_x,loc_y,loc_z,6,6,rotation,side)
union() {
translate([3,-2.5,3]) rotate([90,0,0]) cylinder(d=5, h=8);
translate([-.5,-3.75,0]) cube([7,2.5,6.5]);
}
}
if(type == "momentary_6x6x4_90" && rotation == 90) {
place(loc_x,loc_y,loc_z,6,6,rotation,side)
union() {
translate([3,-2.5,3]) rotate([90,0,0]) cylinder(d=5, h=8);
translate([-.5,-3.75,0]) cube([7,2.5,6.5]);
}
}
if(type == "momentary_6x6x4_90" && rotation == 180) {
place(loc_x,loc_y,loc_z,6,6,rotation,side)
union() {
translate([3,-2.5,3]) rotate([90,0,0]) cylinder(d=5, h=8);
translate([-.5,-3.75,0]) cube([7,2.5,6.5]);
}
} }
if(type == "momentary_6x6x4_90" && rotation == 270) { if(type == "momentary_6x6x4_90" && rotation == 270) {
place(loc_x,loc_y,loc_z,6,6,rotation,side) place(loc_x,loc_y,loc_z,6,6,rotation,side)
translate([3,-3,3]) rotate([90,0,0]) cylinder(d=5, h=10); union() {
translate([3,-2.5,3]) rotate([90,0,0]) cylinder(d=5, h=8);
translate([-.5,-3.75,0]) cube([7,2.5,6.5]);
}
} }
} }