rework of mask ioopen() addition of jetsonnano and rockpro64

This commit is contained in:
Edward Kisiel
2022-05-13 20:28:25 -04:00
parent 95ff3e7091
commit c9e9acf10a
6 changed files with 478 additions and 111 deletions

187
lib/sbc_library.scad Normal file → Executable file
View File

@@ -47,8 +47,9 @@
and type "hc4_oem" under class "heatsink" and type "hc4_oem" under class "heatsink"
20220202 Version 1.0.5 added type "header_6x1","header_3x2" under "jumper" class, led_3x1.5 under misc class, 20220202 Version 1.0.5 added type "header_6x1","header_3x2" under "jumper" class, led_3x1.5 under misc class,
momentary_3x2 under button class, fixed ir, corrected sata height, fixed header_7x1 momentary_3x2 under button class, fixed ir, corrected sata height, fixed header_7x1
20220406 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
*/ */
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) {
@@ -258,6 +259,19 @@ module button(x,y,rotation,side,type,pcbsize_z) {
color("black") translate([5,5,3.5]) sphere(d=1); color("black") translate([5,5,3.5]) sphere(d=1);
} }
} }
if(type=="momentary_6x6x4_90") {
size_x = 6;
size_y = 6;
place(x,y,size_x,size_y,rotation,side,type,pcbsize_z)
rotate([90, 0, 0]) union() {
color("silver") translate([0,0,0]) cube([size_x,size_y,3.5]);
color("black") translate([3,3,3.5]) cylinder(r=1.6,h=2.5,$fn=30);
color("black") translate([1,1,3.5]) sphere(d=1);
color("black") translate([1,5,3.5]) sphere(d=1);
color("black") translate([5,1,3.5]) sphere(d=1);
color("black") translate([5,5,3.5]) sphere(d=1);
}
}
if(type=="momentary_4x2x1") { if(type=="momentary_4x2x1") {
size_x = 4; size_x = 4;
size_y = 2; size_y = 2;
@@ -599,7 +613,7 @@ module video(x,y,rotation,side,type,pcbsize_z) {
difference() { difference() {
color("silver") translate([0,0,0]) cube([size_x, size_y, 19]); color("silver") translate([0,0,0]) cube([size_x, size_y, 19]);
translate([2,-.7,1.5]) color("dimgray") cube([14.5, 11.5, 5.5]); translate([2,-.7,1.5]) color("dimgray") cube([14.5, 11.5, 5.5]);
translate([1.5,-.7,12.5]) color("dimgray") cube([15, 18.5, 5.5]); translate([1.5,-.7,12.5]) color("dimgray") cube([15, 17.5, 5.5]);
} }
translate([2,-.7,1.5]){ translate([2,-.7,1.5]){
difference() { difference() {
@@ -628,7 +642,7 @@ module video(x,y,rotation,side,type,pcbsize_z) {
color("black") translate([2.5,.5,2.25]) cube([9.25,10.5,1.5]); color("black") translate([2.5,.5,2.25]) cube([9.25,10.5,1.5]);
} }
color("black") translate([2.5,.5,14.5]) cube([13,10.5,1.5]); color("black") translate([2.5,.5,14.5]) cube([13,10.5,1.5]);
color("silver") translate([0,0,12.5]) rotate([0,45,0]) cube([2,18.5,2]); color("silver") translate([0,0,12.5]) rotate([0,45,0]) cube([2,17.5,2]);
color("silver") translate([-.5,0,13]) cube([.6,.5,4.5]); color("silver") translate([-.5,0,13]) cube([.6,.5,4.5]);
color("silver") translate([17.9,0,13]) cube([.6,.5,4.5]); color("silver") translate([17.9,0,13]) cube([.6,.5,4.5]);
color("silver") translate([2,0,18.9]) cube([14,.5,.5]); color("silver") translate([2,0,18.9]) cube([14,.5,.5]);
@@ -642,7 +656,14 @@ module video(x,y,rotation,side,type,pcbsize_z) {
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() {
difference() { difference() {
color("white") translate([0,0,0]) cube([size_x, size_y, 5]); color("white") cube([size_x, size_y, 5]);
color("white") translate([-1,-1,3.5]) cube([23,3.5,5]);
color("white") translate([-1,-1,3.5]) cube([3,5,5]);
color("white") translate([19,-1,3.5]) cube([3,5,5]);
}
difference() {
color("black") translate([-1,0,3.5]) cube([23,3.5,1]);
color("dimgrey") translate([2,2.9,3.49]) cube([17,3,2]);
} }
} }
} }
@@ -653,11 +674,11 @@ module video(x,y,rotation,side,type,pcbsize_z) {
size_y = 3; size_y = 3;
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() {
difference() { color("black") cube([size_x, 1.5, 2]);
color("black") translate([0,0,0]) cube([size_x, size_y, 2]); color("saddlebrown") translate([0,1.5,0]) cube([size_x, 1.5, 2]);
}
} }
} }
} }
// fan connector class // fan connector class
@@ -1133,6 +1154,17 @@ module storage(x,y,rotation,side,type,pcbsize_z) {
} }
} }
// m.2 mounting stud
if(type=="m.2_stud") {
size_x = 5;
size_y = 5;
place(x,y,size_x,size_y,rotation,side,type,pcbsize_z)
difference () {
color("silver") cylinder(d=5, h=2);
color("silver") translate([0,0,-1]) cylinder(d=2, h=5);
}
}
} }
@@ -1468,9 +1500,9 @@ module heatsink(x,y,rotation,side,type,pcbsize_z,soc1size_z) {
} }
if(type=="m1_oem") { if(type=="m1_oem") {
size_x = 90; size_x = 90;
size_y = 90; 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,(pcbsize_z-pcbsize_z-3))
color("gray") translate([-.5,0,0]) 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") {
size_x = 90; size_x = 90;
@@ -1480,3 +1512,138 @@ module heatsink(x,y,rotation,side,type,pcbsize_z,soc1size_z) {
} }
} }
// pcie class
module pcie(x,y,rotation,side,type,pcbsize_z) {
// PCIE-X4
if (type=="x4") {
size_x = 38.8;
size_y = 8.5;
place(x,y,size_x,size_y,rotation,side,type,pcbsize_z)
union() {
difference() {
color("black") cube([size_x, size_y, 11.1]);
color("dimgrey") translate([1.55,(size_y/2)-.8,2]) cube([11.5,1.6,11]);
color("dimgrey") translate([16.5,(size_y/2)-.8,2]) cube([20.3,1.6,11]);
}
for (i=[1:1:11.5]) {
color("gold") translate ([i+1,2.75,2.5]) cube([.5,1,8.25]);
color("gold") translate ([i+1,4.75,2.5]) cube([.5,1,8.25]);
}
for (i=[17:1:36.5]) {
color("gold") translate ([i,2.75,2.5]) cube([.5,1,8.25]);
color("gold") translate ([i,4.75,2.5]) cube([.5,1,8.25]);
}
}
}
}
// JST-PH connector class
module jst_ph(x,y,rotation,side,type,pcbsize_z) {
size_x = 2.4+(type*2);
size_y = 4.5;
place(x,y,size_x,size_y,rotation,side,type,pcbsize_z)
union() {
difference() {
color("white") cube([size_x, size_y, 6]);
color("white") translate([.5, .5, .5]) cube([size_x-1, size_y-1, 6]);
color("white") translate([size_x/2-(0.5*type)/2, -.1,.5]) cube([0.5*type, size_y-2, 6]);
}
translate([1.95, 0, 0]) union() {
for(ind=[0:type-1]) {
color("silver") translate([ind*2, 1.4, .5]) cube([.5, .5, 4]);
}
}
}
}
// compute module holder class
module cm_holder(x,y,rotation,side,type,pcbsize_z) {
// jetson nano
if(type == "jetsonnano") {
size_x = 73;
size_y = 6.5;
place(x,y,size_x,size_y,rotation,side,type,pcbsize_z)
union() {
difference () {
color("dimgray") translate([0,0,0]) cube([size_x,size_y,9.2]);
color("dimgray") translate([1.5,-1,5.7]) cube([70,3,5]);
color("dimgray") translate([3.5,-1,5.7]) cube([28.5,5.25,.92]);
color("dimgray") translate([34.5,-1,5.7]) cube([35,5.25,.92]);
}
for (i=[2:.5:31]) {
color("gold") translate ([i+.5,2,5.7]) cube([.25,2,.25]);
}
for (i=[34:.5:69]) {
color("gold") translate ([i+.5,2,5.7]) cube([.25,2,.25]);
}
}
}
}
// compute module class
module cm(x,y,rotation,side,type,pcbsize_z) {
$fn=90;
// jetson nano
if(type == "jetsonnano") {
size_x = 70;
size_y = 45;
place(x,y,size_x,size_y,rotation,side,type,pcbsize_z)
union() {
difference () {
color("tan") translate([0,0,7]) cube([size_x,size_y,1.4]);
color("tan") translate([37,-1,6]) cube([1,5,4]);
color("dimgray") translate([-1,18,6]) cube([3,4,4]);
color("dimgray") translate([size_x-2,18,6]) cube([3,4,4]);
translate([size_x-3,size_y-3,6]) cylinder(d=3,h=3);
translate([3,size_y-3,6]) cylinder(d=3,h=3);
}
for (i=[2:.5:36]) {
color("gold") translate ([i+.5,0,6.8]) cube([.25,2,.25]);
color("gold") translate ([i+.5,0,8.4]) cube([.25,2,.25]);
}
for (i=[37.5:.5:67]) {
color("gold") translate ([i+.5,0,6.8]) cube([.25,2,.25]);
color("gold") translate ([i+.5,0,8.4]) cube([.25,2,.25]);
}
color("dimgrey") translate([20,13,8.3]) cube([14,14,1.2]);
difference() {
color("black") translate([6.5,4.5,9.5]) cube([58,40,16]);
color("dimgrey") translate([0,25.375,13.5]) rotate([90,2.5,90]) linear_extrude(70) {
polygon(points = [[0,0],[-.5,13],[4,13],[3.5,0]]);}
color("dimgrey") translate([0,20.675,13.5]) rotate([90,-2.5,90]) linear_extrude(70) {
polygon(points = [[0,0],[-.5,13],[4,13],[3.5,0]]);}
color("dimgrey") translate([0,30.5,13.5]) rotate([90,5,90]) linear_extrude(70) {
polygon(points = [[0,0],[-.5,13],[4,13],[3.5,0]]);}
color("dimgrey") translate([0,15.25,13.5]) rotate([90,-5,90]) linear_extrude(70) {
polygon(points = [[0,0],[-.5,13],[4,13],[3.5,0]]);}
color("dimgrey") translate([0,35,13.5]) rotate([90,10,90]) linear_extrude(70) {
polygon(points = [[0,0],[-.5,10.5],[4,10.5],[3.5,0]]);}
color("dimgrey") translate([0,10.5,13]) rotate([90,-10,90]) linear_extrude(70) {
polygon(points = [[0,0],[-.5,10.5],[4,10.5],[3.5,0]]);}
color("dimgrey") translate([0,36.5,20]) cube([70,10,4]);
color("dimgrey") translate([0,1.5,20]) cube([70,10,4]);
color("dimgrey") translate([0,39.5,13]) rotate([90,10,90]) linear_extrude(70) {
polygon(points = [[0,0],[0,10.5],[3,10.5],[3,0]]);}
color("dimgrey") translate([0,6.5,12.5]) rotate([90,-10,90]) linear_extrude(70) {
polygon(points = [[0,0],[0,10.5],[3,10.5],[3,0]]);}
color("dimgrey") translate([19,9,22]) cylinder(d=3, h=5);
color("dimgrey") translate([51,9,22]) cylinder(d=3, h=5);
color("dimgrey") translate([19,41,22]) cylinder(d=3, h=5);
color("dimgrey") translate([51,41,22]) cylinder(d=3, h=5);
}
difference() {
union() {
color("silver") translate([size_x-3,size_y-3,0]) cylinder(d=5.2,h=7, $fn=6);
color("silver") translate([3,size_y-3,0]) cylinder(d=5.2,h=7, $fn=6);
}
color("silver") translate([size_x-3,size_y-3,-.1]) cylinder(d=3,h=13);
color("silver") translate([3,size_y-3,-.1]) cylinder(d=3,h=13);
}
}
}
}

View File

@@ -52,7 +52,7 @@
component classes and types: component classes and types:
memory - emmc, emmc_plug, sodimm_5.2, sodimm_9.2 memory - emmc, emmc_plug, sodimm_5.2, sodimm_9.2
switch - slide_4x9 switch - slide_4x9
button - momentary_6x6x9, momentary_6x6x4 button - momentary_6x6x9, momentary_6x6x4, momentary_6x6x4_90
plug - pwr5.5_7.5x11.5, pwr2.5_5x7.5, rtc_micro, uart_micro, molex_4x1, small_encl_satapwr plug - pwr5.5_7.5x11.5, pwr2.5_5x7.5, rtc_micro, uart_micro, molex_4x1, small_encl_satapwr
usb2 - single_vert_a, double_stacked_a, micro usb2 - single_vert_a, double_stacked_a, micro
usb3 - double_stacked_a usb3 - double_stacked_a
@@ -68,6 +68,8 @@
jumper - header_2x1, header_5x1, header_7x1 jumper - header_2x1, header_5x1, header_7x1
misc - ir_1, batt_hold_1 misc - ir_1, batt_hold_1
heatsink - xu4_oem, xu4q_oem, c1+_oem, c2_oem, c4_oem, hc4_oem, n2_oem, h2_oem heatsink - xu4_oem, xu4q_oem, c1+_oem, c2_oem, c4_oem, hc4_oem, n2_oem, h2_oem
pcie - x4
jst_ph - number of pins from 2-16
sbc models "c1+","c2","c4","xu4","xu4q","mc1","hc1","hc4","n1","n2","n2+","h2","rpi3b+","a64","rock64","rockpro64","atomicpi","jetsonnano" sbc models "c1+","c2","c4","xu4","xu4q","mc1","hc1","hc4","n1","n2","n2+","h2","rpi3b+","a64","rock64","rockpro64","atomicpi","jetsonnano"
*/ */
@@ -151,7 +153,7 @@ sbc_data = [
36.8,1.34,0,"bottom","memory","emmc", // emmc location, rotation, side, class and type 36.8,1.34,0,"bottom","memory","emmc", // emmc location, rotation, side, class and type
39.5,39.8,180,"bottom","storage","sdcard_i", // sdcard location, rotation, side, class and type 39.5,39.8,180,"bottom","storage","sdcard_i", // sdcard location, rotation, side, class and type
19.75,-1,0,"top","usb2","micro", // usb2 otg location, rotation, side, class and type 19.75,-1,0,"top","usb2","micro", // usb2 otg location, rotation, side, class and type
38.5,-1,1,"top","video","hdmi_a", // hdmi location, rotation, side, class and type 38.5,-1,0,"top","video","hdmi_a", // hdmi location, rotation, side, class and type
6.75,-1,0,"top","plug","pwr5.5_7.5x11.5", // pwrplug location, rotation, side, class and type 6.75,-1,0,"top","plug","pwr5.5_7.5x11.5", // pwrplug location, rotation, side, class and type
65.765,2,270,"top","network","rj45_single", // ethernet location, rotation, side, class and type 65.765,2,270,"top","network","rj45_single", // ethernet location, rotation, side, class and type
70,40,270,"top","usb3","double_stacked_a", // usb3 location, rotation, side, class and type 70,40,270,"top","usb3","double_stacked_a", // usb3 location, rotation, side, class and type
@@ -353,8 +355,8 @@ sbc_data = [
0,0,0,0,0,0,0,"", // soc4 size, location, rotation and side 0,0,0,0,0,0,0,"", // soc4 size, location, rotation and side
0,0,0,0,0,0,0,"", // soc4 size, location, rotation and side 0,0,0,0,0,0,0,"", // soc4 size, location, rotation and side
2.35,-1,0,"top","plug","pwr5.5_7.5x11.5", // power plug location, rotation, side, class and type 2.35,-1,0,"top","plug","pwr5.5_7.5x11.5", // power plug location, rotation, side, class and type
18,0,0,"top","usb3","double_stacked_a", // usb3 location, rotation, side, class and type 18,0,0,"top","usb3","double_stacked_a", // usb3 location, rotation, side, class and type
36,0,0,"top","usb3","double_stacked_a", // usb3 location, rotation, side, class and type 36,0,0,"top","usb3","double_stacked_a", // usb3 location, rotation, side, class and type
54.5,-1,0,"top","video","hdmi_a", // hdmi location, rotation, side, class and type 54.5,-1,0,"top","video","hdmi_a", // hdmi location, rotation, side, class and type
71.75,0,0,"top","network","rj45_single", // ethernet location, rotation, side, class and type 71.75,0,0,"top","network","rj45_single", // ethernet location, rotation, side, class and type
83.96,32.1,90,"top","gpio","header_40", // gpio location, rotation, side, class and type 83.96,32.1,90,"top","gpio","header_40", // gpio location, rotation, side, class and type
@@ -470,7 +472,7 @@ sbc_data = [
7.3,-1,0,"top","plug","pwr5.5_7.5x11.5", // pwrplug location, rotation, side, class and type 7.3,-1,0,"top","plug","pwr5.5_7.5x11.5", // pwrplug location, rotation, side, class and type
36,-1,0,"top","usb2","single_vert_a", // usb2 location, rotation, side, class and type 36,-1,0,"top","usb2","single_vert_a", // usb2 location, rotation, side, class and type
67,-1,0,"top","network","rj45_single", // ethernet location, rotation, side, class and type 67,-1,0,"top","network","rj45_single", // ethernet location, rotation, side, class and type
84.7,38.55,-90,"top","plug","uart_micro", // uart location, rotation, side, class and type 84.7,38.55,270,"top","plug","uart_micro", // uart location, rotation, side, class and type
75.3,79.45,180,"top","misc","ir_1", // ir location, rotation, side, class and type 75.3,79.45,180,"top","misc","ir_1", // ir location, rotation, side, class and type
85.25,53,90,"top","jumper","header_5x1", // jumper location, rotation, side, class and type 85.25,53,90,"top","jumper","header_5x1", // jumper location, rotation, side, class and type
34.65,74.85,0,"bottom","button","momentary_6x6x4", // boot button location, rotation, side, class and type 34.65,74.85,0,"bottom","button","momentary_6x6x4", // boot button location, rotation, side, class and type
@@ -497,8 +499,8 @@ sbc_data = [
0,0,0,0,0,0,0,"", // soc3 size, location, rotation and side 0,0,0,0,0,0,0,"", // soc3 size, location, rotation and side
0,0,0,0,0,0,0,"", // soc4 size, location, rotation and side 0,0,0,0,0,0,0,"", // soc4 size, location, rotation and side
7.5,44,180,"top","usb2","micro", // usb2 otg location, rotation, side, class and type 7.5,44,180,"top","usb2","micro", // usb2 otg location, rotation, side, class and type
2,8.83,-90,"top","jumper","header_6x1", // jumper location, rotation, side, class and type 2,8.83,270,"top","jumper","header_6x1", // jumper location, rotation, side, class and type
15.5,42,-90,"top","jumper","header_2x1", // jumper location, rotation, side, class and type 15.5,42,270,"top","jumper","header_2x1", // jumper location, rotation, side, class and type
2,35,0,"top","jumper","header_3x2", // jumper location, rotation, side, class and type 2,35,0,"top","jumper","header_3x2", // jumper location, rotation, side, class and type
2,25.5,270,"top","plug","rtc_micro", // battery location, rotation, side, class and type 2,25.5,270,"top","plug","rtc_micro", // battery location, rotation, side, class and type
7.65,2,90,"top","switch","slide_4x9", // switch location, rotation, side, class and type 7.65,2,90,"top","switch","slide_4x9", // switch location, rotation, side, class and type
@@ -524,7 +526,7 @@ sbc_data = [
0,0,0,0,0,0,0,"", // soc4 size, location, rotation and side 0,0,0,0,0,0,0,"", // soc4 size, location, rotation and side
0,0,0,"","",""], // component location, rotation, side, class and type 0,0,0,"","",""], // component location, rotation, side, class and type
// Pine64 SBC's // Pine64 SBCs
["a64",127,79,1.6,3.5,0,0, // sbc model, pcb size and component height ["a64",127,79,1.6,3.5,0,0, // sbc model, pcb size and component height
4.5,4,3.3,122.5,4,3.3, // pcb holes 1 and 2 location and pcb hole size 4.5,4,3.3,122.5,4,3.3, // pcb holes 1 and 2 location and pcb hole size
4.5,75,3.3,122.5,75,3.3, // pcb holes 3 and 4 location and pcb hole size 4.5,75,3.3,122.5,75,3.3, // pcb holes 3 and 4 location and pcb hole size
@@ -549,18 +551,34 @@ sbc_data = [
0,0,0,0,0,0,0,"", // soc4 size, location, rotation and side 0,0,0,0,0,0,0,"", // soc4 size, location, rotation and side
0,0,0,"","",""], // component, location, rotation, side, class and type 0,0,0,"","",""], // component, location, rotation, side, class and type
["rockpro64",127,79.5,2,3.5,0,0, // sbc model, pcb size and component height ["rockpro64",127,79.5,2,3.5,17,8, // sbc model, pcb size and component height
4.5,4.25,3.25,122.5,4.25,3.25, // pcb holes 1 and 2 location and pcb hole size 4.5,4.25,3.25,4.5,75.25,3.25, // pcb holes 1 and 2 location and pcb hole size
4.5,75.25,3.25,122.5,75.25,3.25, // pcb holes 3 and 4 location and pcb hole size 122.5,4.25,3.25,122.5,75.25,3.25, // pcb holes 3 and 4 location and pcb hole size
45.5,67.4,3.25,87,25.6,3.25, // pcb holes 5 and 6 location and pcb hole size 45.5,67.4,3.25,87,25.6,3.25, // pcb holes 5 and 6 location and pcb hole size
0,0,0,0,0,0, // pcb holes 7 and 8 location and pcb hole size 0,0,0,0,0,0, // pcb holes 7 and 8 location and pcb hole size
0,0,0,0,0,0, // pcb holes 9 and 10 location and pcb hole size 0,0,0,0,0,0, // pcb holes 9 and 10 location and pcb hole size
0,0,0,0,0,0,0,"", // soc1 size, location, rotation and side 21,21,1.5,48,47.3,0,45,"top", // soc1 size, location, rotation and side
0,0,0,0,0,0,0,"", // soc2 size, location, rotation and side 0,0,0,0,0,0,0,"", // soc2 size, location, rotation and side
0,0,0,0,0,0,0,"", // soc3 size, location, rotation and side 0,0,0,0,0,0,0,"", // soc3 size, location, rotation and side
0,0,0,0,0,0,0,"", // soc4 size, location, rotation and side 0,0,0,0,0,0,0,"", // soc4 size, location, rotation and side
0,0,0,"","",""], // component, location, rotation, side, class and type -1.5,12,90,"top","plug","pwr5.5_7.5x11.5", // component, location, rotation, side, class and type
-1.5, 32, 90, "top", "network", "rj45_single", // rj45 ethernet port
-1.5, 52.4, 90, "top", "video", "hdmi_a", // hdmi port
114.4, 9.8, 270, "top", "audio", "jack_3.5", // audio jack
118, 19.5, 270, "top", "button", "momentary_6x6x4_90", // Power button
118, 28.5, 270, "top", "button", "momentary_6x6x4_90", // Reset button
112, 38.7, 270, "top", "usb2", "double_stacked_a", // USB-2 stack
112, 55, 270, "top", "usb3", "double_stacked_a", // USB-3 / USB-C stack
13.6, 73.4, 0, "top", "button", "momentary_4x2x1", // recover button
42.6, 73.4, 0, "top", "gpio", "header_40", // gpio
43.5, 0, 0, "top", "pcie", "x4", // pcie x4 port
98.9, 14.7, 0, "top", "memory", "emmc_plug", // mmc port
97.2, 0, 0, "bottom", "storage", "sdcard", // micro sdcard
94.6, 73.4, 0, "top", "jst_ph", 2, // fan header
101.4, 73.4, 0, "top", "jst_ph", 3, // SPDIF header
110.3, 73.4, 0, "top", "jst_ph", 2, // rtc header
10.6, 13.2, 270, "top", "jst_ph", 4], // sata dc out
["atomicpi",130.44,99.9,1.63,3,14,8, // sbc model, pcb size and component height ["atomicpi",130.44,99.9,1.63,3,14,8, // sbc model, pcb size and component height
4.22,3.95,3,126.22,3.95,3, // pcb holes 1 and 2 location and pcb hole size 4.22,3.95,3,126.22,3.95,3, // pcb holes 1 and 2 location and pcb hole size
126.22,95.95,3,4.22,95.95,3, // pcb holes 3 and 4 location and pcb hole size 126.22,95.95,3,4.22,95.95,3, // pcb holes 3 and 4 location and pcb hole size
@@ -573,7 +591,7 @@ sbc_data = [
0,0,0,0,0,0,0,"", // soc4 size, location, rotation and side 0,0,0,0,0,0,0,"", // soc4 size, location, rotation and side
0,0,0,"","",""], // component, location, rotation, side, class and type 0,0,0,"","",""], // component, location, rotation, side, class and type
["jetsonnano",100,80,1.63,.2,19,3, // sbc model, pcb size and component height ["jetsonnano",100,80,1.63,.2,27,3, // sbc model, pcb size and component height
4,17,3,4,75,3, // pcb holes 1 and 2 location and pcb hole size 4,17,3,4,75,3, // pcb holes 1 and 2 location and pcb hole size
90,17,3,90,75,3, // pcb holes 3 and 4 location and pcb hole size 90,17,3,90,75,3, // pcb holes 3 and 4 location and pcb hole size
16,75,3,80,75,3, // pcb holes 5 and 6 location and pcb hole size 16,75,3,80,75,3, // pcb holes 5 and 6 location and pcb hole size
@@ -583,5 +601,79 @@ sbc_data = [
0,0,0,0,0,0,0,"", // soc2 size, location, rotation and side 0,0,0,0,0,0,0,"", // soc2 size, location, rotation and side
0,0,0,0,0,0,0,"", // soc3 size, location, rotation and side 0,0,0,0,0,0,0,"", // soc3 size, location, rotation and side
0,0,0,0,0,0,0,"", // soc4 size, location, rotation and side 0,0,0,0,0,0,0,"", // soc4 size, location, rotation and side
2,-1,0,"top","plug","pwr5.5_7.5x11.5", // power plug location, rotation, side, class and type
14,-1,0,"top","video","dp-hdmi_a", // hdmi location, rotation, side, class and type
36,0,0,"top","usb3","double_stacked_a", // usb3 location, rotation, side, class and type
53,0,0,"top","usb3","double_stacked_a", // usb3 location, rotation, side, class and type
68.5,0,0,"top","network","rj45_single", // ethernet location, rotation, side, class and type
88,-1,0,"top","usb2","micro", // otg location, rotation, side, class and type
29,53,0,"top","ic","ic_9x9", // hub size, location, rotation and side
2,36,90,"top","video","mipi_csi", // mipi_csi location, rotation, side, class and type
72,45,90,"top","storage","m.2_header", // m.2 header location, rotation, side, class and type
44,57,0,"top","storage","m.2_stud", // m.2 stud location, rotation, side, class and type
11.5,30,180,"top","cm_holder","jetsonnano", // cm holder location, rotation, side, class and type
13,33,0,"top","cm","jetsonnano", // cm location, rotation, side, class and type
87.5,20,90,"top","gpio","header_40", // gpio location, rotation, side, class and type
72,24,0,"top","jumper","header_2x1", // jumper location, rotation, side, class and type
77,24,0,"top","jumper","header_2x1", // jumper location, rotation, side, class and type
.5,30,0,"top","jumper","header_2x1", // jumper location, rotation, side, class and type
.5,68.25,0,"top","jumper","header_2x1", // jumper location, rotation, side, class and type
.5,65.5,0,"top","jumper","header_2x1", // jumper location, rotation, side, class and type
.5,62.75,0,"top","jumper","header_2x1", // jumper location, rotation, side, class and type
.5,60,0,"top","jumper","header_2x1", // jumper location, rotation, side, class and type
93,72.5,90,"top","jumper","header_2x1", // jumper location, rotation, side, class and type
95.75,72.5,90,"top","jumper","header_2x1", // jumper location, rotation, side, class and type
8,62,90,"top","jumper","header_6x1"], // jumper location, rotation, side, class and type
["test",127,79,1.6,3.5,17,6, // sbc model, pcb size and component height
4.5,4,3.3,122.5,4,3.3, // pcb holes 1 and 2 location and pcb hole size
4.5,75,3.3,122.5,75,3.3, // pcb holes 3 and 4 location and pcb hole size
0,0,0,0,0,0, // pcb holes 5 and 6 location and pcb hole size
0,0,0,0,0,0, // pcb holes 7 and 8 location and pcb hole size
0,0,0,0,0,0, // pcb holes 9 and 10 location and pcb hole size
0,0,0,0,0,0,0,"", // soc1 size, location, rotation and side
0,0,0,0,0,0,0,"", // soc2 size, location, rotation and side
0,0,0,0,0,0,0,"", // soc3 size, location, rotation and side
0,0,0,0,0,0,0,"", // soc4 size, location, rotation and side
10, -1.5, 0, "top", "video", "hdmi_a", // hdmi port
-1.5, 30, 90, "top", "video", "hdmi_a", // hdmi port
10, 69, 180, "top", "video", "hdmi_a", // hdmi port
117, 30, 270, "top", "video", "hdmi_a", // hdmi port
30, -1, 0, "top", "usb2", "micro", // usb2 micro port
-1, 10, 90, "top", "usb2", "micro", // usb2 micro port
30, 75.5, 180, "top", "usb2", "micro", // usb2 micro port
123.5, 10, 270, "top", "usb2", "micro", // usb2 micro port
// 50, -1, 0, "top", "plug", "pwr5.5_7.5x11.5", // pwr5.5_7.5x11.5
// -1, 2, 90, "top", "plug", "pwr5.5_7.5x11.5", // pwr5.5_7.5x11.5
// 50, 69, 180, "top", "plug", "pwr5.5_7.5x11.5", // pwr5.5_7.5x11.5
// 116.5, 2, 270, "top", "plug", "pwr5.5_7.5x11.5", // pwr5.5_7.5x11.5
// 50, -1, 0, "top", "plug", "pwr2.5_5x7.5", // pwr5.5_7.5x11.5
// -1, 2, 90, "top", "plug", "pwr2.5_5x7.5", // pwr5.5_7.5x11.5
// 50, 72.5, 180, "top", "plug", "pwr2.5_5x7.5", // pwr5.5_7.5x11.5
// 120.5, 2, 270, "top", "plug", "pwr2.5_5x7.5", // pwr5.5_7.5x11.5
// 50, -1, 0, "top", "plug", "pwr5.5_10x10", // pwr5.5_10x10
// -1, 2, 90, "top", "plug", "pwr5.5_10x10", // pwr5.5_10x10
// 50, 67, 180, "top", "plug", "pwr5.5_10x10", // pwr5.5_10x10
// 114.5, 2, 270, "top", "plug", "pwr5.5_10x10", // pwr5.5_10x10
// 60, -1, 0, "top", "network", "rj45_single", // rj45_single
// -1, 47, 90, "top", "network", "rj45_single", // rj45_single
// 60, 59, 180, "top", "network", "rj45_single", // rj45_single
// 107, 50, 270, "top", "network", "rj45_single", // rj45_single
// 80, -1, 0, "top", "usb2", "double_stacked_a", // double_stacked_a
// -1, 47, 90, "top", "usb2", "double_stacked_a", // double_stacked_a
// 80, 63, 180, "top", "usb2", "double_stacked_a", // double_stacked_a
// 110.5, 50, 270, "top", "usb2", "double_stacked_a", // double_stacked_a
100, -1, 0, "top", "usb2", "single_vert_a", // single_vert_a
-1, 67, 90, "top", "usb2", "single_vert_a", // single_vert_a
60, 61, 180, "top", "usb2", "single_vert_a", // single_vert_a
108.5, 67, 270, "top", "usb2", "single_vert_a", // single_vert_a
0,0,0,"","",""] // component, location, rotation, side, class and type 0,0,0,"","",""] // component, location, rotation, side, class and type
]; ];

37
lib/sbc_models.scad Normal file → Executable file
View File

@@ -16,17 +16,18 @@
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
20190214 Version 1.0.0 SBC Model Framework 20190214 Version 1.0.0 SBC Model Framework
20190218 Version 1.0.1 Added HK Odroid n2 as "n2" 20190218 Version 1.0.1 Added HK Odroid-N2 as "n2"
20200425 Version 1.0.2 Added AtomicPi as "atomicpi" 20200425 Version 1.0.2 Added AtomicPi as "atomicpi"
Added Nvidia JetsonNano as "jetsonnano" Added Nvidia JetsonNano as "jetsonnano"
Updated Odroid n2 sbc data Updated Odroid-N2 sbc data
Updated Odroid h2 sbc data Updated Odroid-H2 sbc data
Added Odroid c4 as"c4" Added Odroid-C4 as"c4"
Added oem heatsinks Added oem heatsinks
Added Odroid xu4q as "xu4q" Added Odroid-XU4Q as "xu4q"
20200725 Version 1.0.3 Added Odroid n2+ and heatsink 20200725 Version 1.0.3 Added Odroid-N2+ and heatsink
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"
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"
@@ -185,7 +186,27 @@ module sbc(model) {
if (loc_x!=0 || loc_y!=0) { if (loc_x!=0 || loc_y!=0) {
heatsink(loc_x,loc_y,rotation,side,type,pcbsize_z,sbc_data[s[0]][39]); heatsink(loc_x,loc_y,rotation,side,type,pcbsize_z,sbc_data[s[0]][39]);
} }
} }
if (class == "pcie") {
if(loc_x!=0 || loc_y!=0) {
pcie(loc_x, loc_y, rotation, side, type, pcbsize_z);
}
}
if (class == "jst_ph") {
if(loc_x!=0 || loc_y!=0) {
jst_ph(loc_x, loc_y, rotation, side, type, pcbsize_z);
}
}
if (class == "cm_holder") {
if(loc_x!=0 || loc_y!=0) {
cm_holder(loc_x, loc_y, rotation, side, type, pcbsize_z);
}
}
if (class == "cm") {
if(loc_x!=0 || loc_y!=0) {
cm(loc_x, loc_y, rotation, side, type, pcbsize_z);
}
}
} }
} }

View File

@@ -34,7 +34,7 @@
corner of component or opening, holes measured to center. All measurements in mm. corner of component or opening, holes measured to center. All measurements in mm.
PCB orientation is long side of board along the x axis. PCB orientation is long side of board along the x axis.
SBC: "c1+","c2","c4","xu4","xu4q","mc1","hc1","n1","n2","n2+","h2",hc4 SBC: "c1+","c2","c4","xu4","xu4q","mc1","hc1","n1","n2","n2+","h2",hc4,rockpro64,jetsonnano
schema: schema:
"case_name","sbc_model","case_design","case_style", "case_name","sbc_model","case_design","case_style",
@@ -1379,8 +1379,31 @@ case_data = [
"model","fan_cover",125,-4,7,"top",[90,0,0],40,0,3,2,0,"",0, // model fan "model","fan_cover",125,-4,7,"top",[90,0,0],40,0,3,2,0,"",0, // model fan
"platter","fan_cover",-50,50,0,"bottom",[0,0,0],40,0,3,2,0,"",0], // model fan "platter","fan_cover",-50,50,0,"bottom",[0,0,0],40,0,3,2,0,"",0], // model fan
["test","c4","tray","none", // case_name, sbc_model, case_design, case_style ["jetsonnano_shell","jetsonnano","shell","none", // case_name, sbc_model, case_design, case_style
20,0,0,20,60,0,4, // 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,-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,28.5,"top",[0,0,0],62,43,4,0,0,"",[1,1,1,1]], // sub heatsink opening
["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,
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","rectangle",43,0,24.5,"top",[0,0,0],40,10,6,0,0,"",[1,1,1,1]], // sub pcie opening
["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,
2,2,3,2,[3.5,3], // wallthick,floorthick,sidethick,gap,fillet 2,2,3,2,[3.5,3], // wallthick,floorthick,sidethick,gap,fillet
false,false,false,false,false, // indents,sidewall_support,sbc_top_standoffs,sbc_bottom_standoffs,case_ext_standoffs false,false,false,false,false, // indents,sidewall_support,sbc_top_standoffs,sbc_bottom_standoffs,case_ext_standoffs
false,"none","fan","none","false", // sata_punchout,gpio_opening,cooling,exhaust_vents,mode false,"none","fan","none","false", // sata_punchout,gpio_opening,cooling,exhaust_vents,mode
@@ -1388,31 +1411,6 @@ case_data = [
[6.75,5,3.6,10,4,1,0,0,0,4.5,5.1], // bottom_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,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 [6.75,5,3.6,10,4,1,0,0,0,4.5,5.1], // bottom_ext_standoff
// "add2","batt_holder",35,45,0,"bottom",[0,0,0],10,10,0,0,0,"",0, // add battery "sub","vent",60,120,10,"bottom",[0,0,0],2,15,4,1,4,"vertical",1] // sub vent
// "add2","uart_holder",10,0,1.9,"bottom",[0,0,0],10,10,0,0,0,"",0, // add uart
// "sub","text",5,65,-.1,"bottom",[0,0,0],30,30,5,5,0,"TEXT",0, // sub text
// "add2","text",5,55,1.9,"bottom",[0,0,0],30,30,2,5,0,"TEXT",0, // add text
// "add2","standoff",15,90,0,"bottom",[0,0,0],0,0,3,6.75,0,"", // add standoff
// [6.75,15,3.6,10,4,1,0,0,0,4.5,5.1],
// "add2","standoff",28,90,0,"bottom",[0,0,0],0,0,3,6.75,0,"", // add standoff
// [6.75,10,2.5,10,4,2,1,0,1,4.5,3],
// "add2","standoff",41,90,0,"bottom",[0,0,0],0,0,3,6.75,0,"", // add standoff
// [6.75,5,3.6,10,5,3,1,0,0,4.5,5.1],
// "sub","round",15,75,-.1,"bottom",[0,0,0],5,0,5,0,0,"",0, // sub round
// "sub","rectangle",3,78,-.1,"bottom",[0,0,0],8,8,5,0,0,"",[1,1,1,1], // sub rectangle
// "sub","rectangle",20,75,-.1,"bottom",[0,0,0],8,8,5,0,0,"",[1,1,4,1], // sub slab
// "sub","slot",3,75,-.1,"bottom",[0,0,0],3,5,4,0,0,"",0, // sub slot
// "sub","art",75,30,-.1,"bottom",[0,0,0],0,0,0,.5,5,"./dxf/hk_25mm.dxf",0, // sub rectangle
// "model","feet",4,5,-6,"bottom",[0,0,0],10,0,6,0,0,"",0, // case feet
// "add1","art",90,30,1.99,"bottom",[0,0,0],0,0,0,.5,2,"./dxf/hk_25mm.dxf",0, // add rectangle
// "sub","punchout",45,73,-.1,"bottom",[0,0,0],30,11,5,2,6,"slot",0, // sub punchout
// "sub","punchout",75,50,-.1,"bottom",[0,0,0],15,15,5,2,2,"rectangle",0, // sub punchout
// "sub","punchout",55,25,-.1,"bottom",[0,0,0],15,15,5,2,2,"round",0, // sub punchout
// "sub","vent",50,120,10,"bottom",[0,0,0],10,2,4,4,3,"vertical",1, // sub vent
"add2","access_port",50,-1.51,-0.01,"bottom",[0,0,0],30,80,2,0,0,"portrait",0, // access port
"model","access_cover",50,-1.51,-0.01,"bottom",[0,0,0],30,80,2,0,0,"portrait",0, // access port
// "sub","vent",5,100,-.1,"bottom",[0,0,0],10,2,4,4,3,"horizontal",1, // sub vent
// "sub","fan",60,78,-.1,"bottom",[0,0,0],40,0,3,2,0,"",0, // sub fan
"sub","vent",60,120,10,"bottom",[0,0,0],2,15,4,1,4,"vertical",1] // sub vent
]; ];

View File

@@ -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 = "c4_tray_boombox"; // 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)
@@ -584,12 +584,12 @@ module case_bottom(case_design) {
pcb_hole_y = sbc_data[s[0]][i+1]+pcb_loc_y; pcb_hole_y = sbc_data[s[0]][i+1]+pcb_loc_y;
pcb_hole_size = sbc_data[s[0]][i+2]; pcb_hole_size = sbc_data[s[0]][i+2];
if (pcb_hole_x!=0 && pcb_hole_y!=0 && i == 7 || i == 13) { if (pcb_hole_x!=0 && pcb_hole_y!=0 && i == 7 || i == 13) {
translate([pcb_hole_x-1, pcb_hole_y-(bottom_standoff[0]/2)-(gap+adjust),0]) translate([pcb_hole_x-1, pcb_hole_y-(bottom_standoff[0]/2)-(gap+adjust)-1,0])
cube([2,gap+.6,bottom_standoff[1]]); cube([2,gap+1.6,bottom_standoff[1]]);
} }
if (pcb_hole_x!=0 && pcb_hole_y!=0 && i == 10 || i == 16) { if (pcb_hole_x!=0 && pcb_hole_y!=0 && i == 10 || i == 16) {
translate([pcb_hole_x-1, pcb_hole_y+(bottom_standoff[0]/2)-.6+adjust,0]) translate([pcb_hole_x-1, pcb_hole_y+(bottom_standoff[0]/2)-.6+adjust,0])
cube([2,gap+1,bottom_standoff[1]]); cube([2,gap+1.6,bottom_standoff[1]]);
} }
} }
} }
@@ -923,12 +923,12 @@ module case_top(case_design) {
pcb_hole_y = sbc_data[s[0]][i+1]+pcb_loc_y; pcb_hole_y = sbc_data[s[0]][i+1]+pcb_loc_y;
pcb_hole_size = sbc_data[s[0]][i+2]; pcb_hole_size = sbc_data[s[0]][i+2];
if (pcb_hole_x!=0 && pcb_hole_y!=0 && i == 7 || i == 13) { if (pcb_hole_x!=0 && pcb_hole_y!=0 && i == 7 || i == 13) {
translate([pcb_hole_x-1, pcb_hole_y-(top_standoff[0]/2)-(gap-adjust)-.4, translate([pcb_hole_x-1, pcb_hole_y-(top_standoff[0]/2)-(gap-adjust)-1.4,
-top_height-bottom_height]) cube([2,gap+.6,top_standoff[1]]); -top_height-bottom_height]) cube([2,gap+1.6,top_standoff[1]]);
} }
if (pcb_hole_x!=0 && pcb_hole_y!=0 && i == 10 || i == 16) { if (pcb_hole_x!=0 && pcb_hole_y!=0 && i == 10 || i == 16) {
translate([pcb_hole_x-1, pcb_hole_y+(top_standoff[0]/2)-.6+adjust, translate([pcb_hole_x-1, pcb_hole_y+(top_standoff[0]/2)-.6+adjust,
-top_height-bottom_height]) cube([2,gap+.6,top_standoff[1]]); -top_height-bottom_height]) cube([2,gap+1.6,top_standoff[1]]);
} }
} }
} }
@@ -1450,8 +1450,8 @@ module open_io() {
if(side == "top" && class == "gpio" && type == "header_40" && rotation == 90) { if(side == "top" && class == "gpio" && type == "header_40" && rotation == 90) {
if(gpio_opening == "vent") { if(gpio_opening == "vent") {
for(r=[loc_y-2:4:50+loc_y]) { for(r=[loc_y-2:4:50+loc_y]) {
translate([width-(2*wallthick)-adjust,depth+15-r,bottom_height+2]) translate([width-2*(wallthick+gap)-adjust,depth-r,bottom_height+2])
rotate([0,0,0]) cube([2,wallthick+(2*adjust),top_height-floorthick-4]); rotate([0,0,0]) cube([6,wallthick+(2*adjust),top_height-floorthick-7]);
} }
} }
if(gpio_opening == "open") { if(gpio_opening == "open") {

View File

@@ -1436,6 +1436,7 @@ module hk_vu7c(gpio_ext, tabs) {
translate([59,52.69,-1.59]) ic(9); translate([59,52.69,-1.59]) ic(9);
} }
// hk vu8m lcd display // hk vu8m lcd display
module hk_vu8m(brackets) { module hk_vu8m(brackets) {
$fn = 90; $fn = 90;
@@ -2340,11 +2341,11 @@ module hdmi_open() {
union() { union() {
difference() { difference() {
translate([.25,-5,1]) cube([15, 11.5, 5.5]); translate([.25,-5,1]) cube([15, 8, 5.5]);
translate([0.5,-5.2,.5]) rotate ([-90,0,0]) cylinder(d=3, h=13.5,$fn=30); translate([0.5,-5.2,.5]) rotate ([-90,0,0]) cylinder(d=3, h=13.5,$fn=30);
translate([15,-5.2,.5]) rotate ([-90,0,0]) cylinder(d=3, h=13.5,$fn=30); translate([15,-5.2,.5]) rotate ([-90,0,0]) cylinder(d=3, h=13.5,$fn=30);
} }
translate([2,-5,.5]) cube([11.5, 11.5, .5]); translate([2,-5,.5]) cube([11.5, 8, .5]);
} }
} }
@@ -2353,8 +2354,8 @@ module microusb_open() {
translate([0,0,.5])rotate([90,0,0]) translate([0,0,.5])rotate([90,0,0])
hull() { hull() {
translate([6,1.5,-5]) cylinder(d=3,h=10); translate([6,1.5,-5]) cylinder(d=3.5,h=8);
translate([1,1.5,-5]) cylinder(d=3,h=10); translate([1,1.5,-5]) cylinder(d=3.5,h=8);
} }
} }
@@ -2460,37 +2461,98 @@ module mask(loc_x,loc_y,loc_z,rotation,side,class,type,wallthick,gap,floorthick,
if(type == "hdmi_a" && side == "bottom") { if(type == "hdmi_a" && side == "bottom") {
place(loc_x,loc_y-1,loc_z-pcb_z,15,11.5,rotation,side) hdmi_open(); place(loc_x,loc_y-1,loc_z-pcb_z,15,11.5,rotation,side) hdmi_open();
} }
if(type == "hdmi_a" && side == "top") { if(type == "hdmi_a" && side == "top" && rotation == 0) {
place(loc_x-.375,loc_y-1,loc_z,15,11.5,rotation,side) hdmi_open(); place(loc_x-.5,loc_y-1,loc_z,15,11.5,rotation,side) hdmi_open();
}
if(type == "hdmi_a" && side == "top" && rotation == 90) {
place(loc_x-1,loc_y,loc_z,15,11.5,rotation,side) hdmi_open();
}
if(type == "hdmi_a" && side == "top" && rotation == 180) {
place(loc_x,loc_y+1,loc_z,15,11.5,rotation,side) hdmi_open();
}
if(type == "hdmi_a" && side == "top" && rotation == 270) {
place(loc_x+1,loc_y-.5,loc_z,15,11.5,rotation,side) hdmi_open();
} }
// micro usb opening // micro usb opening
if(class == "usb2" && type == "micro" && rotation == 0) { if(class == "usb2" && type == "micro" && rotation == 0) {
place(loc_x,loc_y-1,loc_z,8,3,rotation,side) microusb_open(); place(loc_x,loc_y-3,loc_z,8,3,rotation,side) microusb_open();
}
if(class == "usb2" && type == "micro" && rotation == 90) {
place(loc_x-3,loc_y-1,loc_z,8,3,rotation,side) microusb_open();
} }
if(class == "usb2" && type == "micro" && rotation == 180) { if(class == "usb2" && type == "micro" && rotation == 180) {
place(loc_x-1,loc_y+1,loc_z,8,3,rotation,side) microusb_open(); place(loc_x-1,loc_y+4.5,loc_z,8,3,rotation,side) microusb_open();
}
if(class == "usb2" && type == "micro" && rotation == 270) {
place(loc_x+4.5,loc_y,loc_z,8,3,rotation,side) microusb_open();
} }
// power plug openings // power plug openings
if(type == "pwr5.5_7.5x11.5") { if(type == "pwr5.5_7.5x11.5" && rotation == 0) {
place(loc_x,loc_y+(2*(wallthick+gap+adjust)),loc_z,7.5,7.5,rotation,side) place(loc_x,loc_y,loc_z,7,7,rotation,side)
// cube([7.5,7.5,10]); translate([3.5,2,6.5]) rotate([90,0,0]) cylinder(d=7, h=8);
translate([4,-5,6.5]) rotate([90,0,0]) cylinder(d=7, h=9);
} }
if(type == "pwr2.5_5x7.5") { if(type == "pwr5.5_7.5x11.5" && rotation == 90) {
place(loc_x,loc_y,loc_z,7,7,rotation,side)
translate([3.5,2,6.5]) rotate([90,0,0]) cylinder(d=7, h=8);
}
if(type == "pwr5.5_7.5x11.5" && rotation == 180) {
place(loc_x,loc_y,loc_z,7,7,rotation,side)
translate([3.5,-2.5,6.5]) rotate([90,0,0]) cylinder(d=7, h=8);
}
if(type == "pwr5.5_7.5x11.5" && rotation == 270) {
place(loc_x-2,loc_y,loc_z,7,7,rotation,side)
translate([3.5,-4.5,6.5]) rotate([90,0,0]) cylinder(d=7, h=8);
}
if(type == "pwr2.5_5x7.5" && rotation == 0) {
place(loc_x,loc_y,loc_z,3,3,rotation,side) place(loc_x,loc_y,loc_z,3,3,rotation,side)
// cube([5,7.5,4]); translate([2.75,2,2]) rotate([90,0,0]) cylinder(d=3, h=8);
translate([2.75,0,2]) rotate([90,0,0]) cylinder(d=3, h=9); }
if(type == "pwr2.5_5x7.5" && rotation == 90) {
place(loc_x,loc_y,loc_z,3,3,rotation,side)
translate([.25,2,2]) rotate([90,0,0]) cylinder(d=3, h=8);
}
if(type == "pwr2.5_5x7.5" && rotation == 180) {
place(loc_x,loc_y,loc_z,3,3,rotation,side)
translate([.5,-2.5,2]) rotate([90,0,0]) cylinder(d=3, h=8);
}
if(type == "pwr2.5_5x7.5" && rotation == 270) {
place(loc_x,loc_y,loc_z,3,3,rotation,side)
translate([2.75,-2.5,2]) rotate([90,0,0]) cylinder(d=3, h=8);
}
// pwr5.5_10x10 opening
if(type == "pwr5.5_10x10" && rotation == 0) {
place(loc_x-.25,loc_y-6,loc_z,10.5,13.5,rotation,side)
cube([10.5,8,10.5]);
}
// pwr5.5_10x10 opening
if(type == "pwr5.5_10x10" && rotation == 90) {
place(loc_x-6,loc_y-.25,loc_z,10.5,13.5,rotation,side)
cube([10.5,8,10.5]);
}
// pwr5.5_10x10 opening
if(type == "pwr5.5_10x10" && rotation == 180) {
place(loc_x-.25,loc_y+6,loc_z,10.5,13.5,rotation,side)
cube([10.5,8,10.5]);
}
// pwr5.5_10x10 opening
if(type == "pwr5.5_10x10" && rotation == 270) {
place(loc_x+6,loc_y-.25,loc_z,10.5,13.5,rotation,side)
cube([10.5,8,10.5]);
} }
// 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,floorthick+adjust,14.5,19,rotation,side)
cube([14.5,19,floorthick+(2*adjust)]); cube([14.5,19,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,loc_y-.5,floorthick+adjust,14.5,19,rotation,side)
cube([14.5,19,floorthick+(2*adjust)]); cube([14.5,19,floorthick+(2*adjust)]);
} }
// sd storage // sd storage
if(type == "sdcard" && side == "bottom" && rotation == 0) {
place(loc_x,loc_y,loc_z,12,15.5,rotation,side)
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+(2*(wallthick+gap+adjust)),loc_y,loc_z-2.75,12,15.5,rotation,side)
cube([12,15.5,2]); cube([12,15.5,2]);
@@ -2503,9 +2565,9 @@ module mask(loc_x,loc_y,loc_z,rotation,side,class,type,wallthick,gap,floorthick,
place(loc_x,loc_y+(2*(wallthick+gap+adjust)),floorthick+adjust+4,12,18.5,rotation,side) 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]); cube([12,18.5,floorthick+(2*adjust)+4]);
} }
if(type == "sdcard" && side == "bottom" && (rotation == 0 || rotation == 270)) { if(type == "sdcard" && side == "bottom" && rotation == 270) {
place(loc_x,loc_y-18,loc_z+2.75,12,15.5,rotation,side) place(loc_x,loc_y,loc_z,12,15.5,rotation,side)
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-17,loc_z,12,15.5,rotation,side)
@@ -2517,30 +2579,54 @@ module mask(loc_x,loc_y,loc_z,rotation,side,class,type,wallthick,gap,floorthick,
} }
// rj45 opening // rj45 opening
if(type == "rj45_single" && rotation == 0) { if(type == "rj45_single" && rotation == 0) {
place(loc_x,loc_y-wallthick-gap-1-adjust,loc_z,16,17.5,rotation,side) place(loc_x,loc_y-6,loc_z,16,17.5,rotation,side)
cube([16,17.5,14]); cube([16,8,14]);
}
if(type == "rj45_single" && rotation == 90) {
place(loc_x-6,loc_y,loc_z,16,17.5,rotation,side)
cube([16,8,14]);
}
if(type == "rj45_single" && rotation == 180) {
place(loc_x,loc_y+10,loc_z,16,17.5,rotation,side)
cube([16,8,14]);
} }
if(type == "rj45_single" && rotation == 270) { if(type == "rj45_single" && rotation == 270) {
place(loc_x+4*(wallthick+gap)+adjust,loc_y,loc_z,16,17.5,rotation,side) place(loc_x+10,loc_y,loc_z,16,17.5,rotation,side)
cube([16.5,17.5,14]); cube([16.5,8,14]);
} }
// double stack usb3 opening // double stack usb opening
if(type == "double_stacked_a" && rotation == 0) { if(type == "double_stacked_a" && rotation == 0) {
place(loc_x-1,loc_y-2*(wallthick+gap)-adjust,loc_z,15.5,16,rotation,side) place(loc_x-1,loc_y-6,loc_z,15.5,16,rotation,side)
cube([15.5,16,16.5]); cube([15.5,8,16.5]);
}
if(type == "double_stacked_a" && rotation == 90) {
place(loc_x-6,loc_y-1.25,loc_z,15.5,16,rotation,side)
cube([15.5,8,16.5]);
} }
if(type == "double_stacked_a" && rotation == 180) { if(type == "double_stacked_a" && rotation == 180) {
place(loc_x-1,loc_y+2*(wallthick+gap)+adjust,loc_z,15.5,16,rotation,side) place(loc_x-1,loc_y+7.5,loc_z,15.5,16,rotation,side)
cube([15.5,16,16.5]); cube([15.5,8,16.5]);
} }
if(type == "double_stacked_a" && rotation == 270) { if(type == "double_stacked_a" && rotation == 270) {
place(loc_x+3*(wallthick+gap)+adjust,loc_y-1,loc_z,15.5,16,rotation,side) place(loc_x+7.5,loc_y-1,loc_z,15.5,16,rotation,side)
cube([15.5,16,16.5]); cube([15.5,8,16.5]);
} }
// single vert usb2 opening // single vert usb2 opening
if(type == "single_vert_a") { if(type == "single_vert_a" && rotation == 0) {
place(loc_x-.5,loc_y-wallthick-gap-1-adjust,loc_z,6.5,19.5,rotation,side) place(loc_x-.5,loc_y-6,loc_z,6.5,19.5,rotation,side)
cube([6.5,19.5,15]); cube([6.5,8,15]);
}
if(type == "single_vert_a" && rotation == 90) {
place(loc_x-6,loc_y-.25,loc_z,6.5,19.5,rotation,side)
cube([6.5,8,15]);
}
if(type == "single_vert_a" && rotation == 180) {
place(loc_x-.5,loc_y+6,loc_z,6.5,19.5,rotation,side)
cube([6.5,8,15]);
}
if(type == "single_vert_a" && rotation == 270) {
place(loc_x+6.5,loc_y,loc_z,6.5,19.5,rotation,side)
cube([6.5,8,15]);
} }
// ir opening // ir opening
if(type == "ir_1") { if(type == "ir_1") {
@@ -2556,11 +2642,6 @@ module mask(loc_x,loc_y,loc_z,rotation,side,class,type,wallthick,gap,floorthick,
place(loc_x,loc_y,loc_z,4,9.1,rotation,side) place(loc_x,loc_y,loc_z,4,9.1,rotation,side)
translate([0,0,.5]) cube([15.75,9.1,4]); translate([0,0,.5]) cube([15.75,9.1,4]);
} }
// pwr5.5_10x10 opening
if(type == "pwr5.5_10x10" && rotation == 0) {
place(loc_x,loc_y-2*(wallthick+gap)-adjust,loc_z,10.5,13.5,rotation,side)
cube([10.5,13.5,10.5]);
}
// 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-2*(wallthick+gap)-adjust,loc_z,19,28,rotation,side)
@@ -2591,11 +2672,19 @@ module mask(loc_x,loc_y,loc_z,rotation,side,class,type,wallthick,gap,floorthick,
place(loc_x,loc_y+wallthick+gap,loc_z,7.5,7.5,rotation,side) place(loc_x,loc_y+wallthick+gap,loc_z,7.5,7.5,rotation,side)
translate([4,0,2.25]) rotate([90,0,0]) cylinder(d=5, h=9); translate([4,0,2.25]) rotate([90,0,0]) cylinder(d=5, h=9);
} }
// buttom opening if(type == "jack_3.5" && rotation == 270) {
place(loc_x,loc_y+wallthick+gap,loc_z,5,5,rotation,side)
translate([-.5,-6,2]) rotate([90,0,0]) cylinder(d=5, h=9);
}
// 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,5]) rotate([0,0,0]) cylinder(d=5, h=50);
} }
if(type == "momentary_6x6x4_90" && rotation == 270) {
place(loc_x,loc_y,loc_z,6,6,rotation,side)
translate([3,-3,3]) rotate([90,0,0]) cylinder(d=5, h=10);
}
} }