rework of mask ioopen() addition of jetsonnano and rockpro64
This commit is contained in:
187
lib/sbc_library.scad
Normal file → Executable file
187
lib/sbc_library.scad
Normal file → Executable file
@@ -47,8 +47,9 @@
|
||||
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,
|
||||
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,
|
||||
momentary_6x6x4, fixed color for usb2 micro otg, adjust all header heights
|
||||
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,
|
||||
added mipi_csi, mipi_dsi, m.2_stud
|
||||
*/
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
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") {
|
||||
size_x = 4;
|
||||
size_y = 2;
|
||||
@@ -599,7 +613,7 @@ module video(x,y,rotation,side,type,pcbsize_z) {
|
||||
difference() {
|
||||
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([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]){
|
||||
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,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([17.9,0,13]) cube([.6,.5,4.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)
|
||||
union() {
|
||||
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;
|
||||
place(x,y,size_x,size_y,rotation,side,type,pcbsize_z)
|
||||
union() {
|
||||
difference() {
|
||||
color("black") translate([0,0,0]) cube([size_x, size_y, 2]);
|
||||
}
|
||||
color("black") cube([size_x, 1.5, 2]);
|
||||
color("saddlebrown") translate([0,1.5,0]) cube([size_x, 1.5, 2]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 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") {
|
||||
size_x = 90;
|
||||
size_y = 90;
|
||||
size_y = 122;
|
||||
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") {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user