completed library masks for access_port, standoff, hc4_olded, hc4_oled_holder, hk_netcard
This commit is contained in:
@@ -25,63 +25,85 @@
|
||||
DESCRIPTION: creates opening and structure for access openings
|
||||
TODO: none
|
||||
|
||||
USAGE: access_port(size[], orientation)
|
||||
USAGE: access_port(size[], orientation, mask)
|
||||
|
||||
size[0] = size_x
|
||||
size[1] = size_y
|
||||
size[2] = floor thickness
|
||||
orientation = "landscape", "portrait"
|
||||
mask[0] = true enables component mask
|
||||
mask[1] = mask length
|
||||
mask[2] = mask setback
|
||||
mask[3] = mstyle "default"
|
||||
|
||||
*/
|
||||
|
||||
module access_port(size, orientation) {
|
||||
module access_port(size, orientation, mask) {
|
||||
|
||||
size_x = size[0];
|
||||
size_y = size[1];
|
||||
floorthick = size[2];
|
||||
enablemask = mask[0];
|
||||
mlength = mask[1];
|
||||
msetback = mask[2];
|
||||
mstyle = mask[3];
|
||||
|
||||
adj = .01;
|
||||
$fn = 90;
|
||||
|
||||
if(orientation == "portrait") {
|
||||
difference() {
|
||||
union() {
|
||||
cube([size[0], size[1], size[2]]);
|
||||
// access panel support
|
||||
translate([(size[0]/2)+.25, size[1]-6.5, 0]) cylinder(d=9, h=floorthick+(adj*2)+5);
|
||||
translate([(size[0]/2)-10, size[1]-11, floorthick-adj]) cube([20, 9.5, floorthick]);
|
||||
translate([1, 0, floorthick-adj]) cube([size[0]-2, 5, 4.5]);
|
||||
}
|
||||
// access opening
|
||||
translate([.5, 6, -adj]) cube([size[0]-1.15, size[1]-17, floorthick+(adj*2)]);
|
||||
translate([(size[0]/2)-5, size[1]-12, -adj]) slab([10.5, 5.5, floorthick], 5.5);
|
||||
translate([(size[0]/2)+.25, size[1]-6.5, floorthick+2])
|
||||
cylinder(r=3.2, h=floorthick+(adj*2)+5, $fn=6);
|
||||
translate([(size[0]/2)+.25, size[1]-6.5, -adj])
|
||||
cylinder(d=3.2, h=floorthick+(adj*2)+5);
|
||||
translate([4, 2+adj, floorthick]) cube([7.75, 3, 2.75]);
|
||||
translate([size[0]-13, 2+adj, floorthick]) cube([7.75, 3, 2.75]);
|
||||
if(size[0] > 100) {
|
||||
translate([(size[0]/2), 2+adj, floorthick]) cube([7.75, 3, 2.75]);
|
||||
}
|
||||
if(enablemask == true && mstyle == "default") {
|
||||
if(orientation == "portrait") {
|
||||
translate([0,0,floorthick+adj-mlength+msetback]) cube([size_x, size_y, mlength]);
|
||||
}
|
||||
if(orientation == "landscape") {
|
||||
translate([0, -1, floorthick+adj-mlength+msetback]) cube([size_x, size_y, mlength]);
|
||||
}
|
||||
}
|
||||
if(orientation == "landscape") {
|
||||
difference() {
|
||||
union() {
|
||||
translate([0, -1, 0]) cube([size[0], size[1], size[2]]);
|
||||
// access panel support
|
||||
translate([size[0]-6.5, (size[1]/2)-.5, 0]) cylinder(d=9, h=floorthick+(adj*2)+5);
|
||||
translate([size[0]-11, (size[1]/2)-10.5, floorthick-adj]) cube([9.5, 20, floorthick]);
|
||||
translate([0, 0, floorthick-adj]) cube([5, size[1]-2, 4.5]);
|
||||
if(enablemask == false) {
|
||||
if(orientation == "portrait") {
|
||||
difference() {
|
||||
union() {
|
||||
cube([size_x, size_y, floorthick]);
|
||||
// access panel support
|
||||
translate([(size_x/2)+.25, size_y-6.5, 0]) cylinder(d=9, h=floorthick+(adj*2)+5);
|
||||
translate([(size_x/2)-10, size_y-11, floorthick-adj]) cube([20, 9.5, floorthick]);
|
||||
translate([1, 0, floorthick-adj]) cube([size_x-2, 5, 4.5]);
|
||||
}
|
||||
// access opening
|
||||
translate([.5, 6, -adj]) cube([size_x-1.15, size_y-17, floorthick+(adj*2)]);
|
||||
translate([(size_x/2)-5, size_y-12, -adj]) slab([10.5, 5.5, floorthick], 5.5);
|
||||
translate([(size_x/2)+.25, size_y-6.5, floorthick+2])
|
||||
cylinder(r=3.2, h=floorthick+(adj*2)+5, $fn=6);
|
||||
translate([(size_x/2)+.25, size_y-6.5, -adj])
|
||||
cylinder(d=3.2, h=floorthick+(adj*2)+5);
|
||||
translate([4, 2+adj, floorthick]) cube([7.75, 3, 2.75]);
|
||||
translate([size_x-13, 2+adj, floorthick]) cube([7.75, 3, 2.75]);
|
||||
if(size_x > 100) {
|
||||
translate([(size_x/2), 2+adj, floorthick]) cube([7.75, 3, 2.75]);
|
||||
}
|
||||
}
|
||||
// access opening
|
||||
translate([6, -.5, -adj]) cube([size[0]-17, size[1]-1.15, floorthick+(adj*3)]);
|
||||
translate([size[0]-12, (size[1]/2)-6, -adj]) slab([5.5, 10.5, floorthick], 5.5);
|
||||
translate([size[0]-6.5, (size[1]/2)-.5, floorthick+2]) rotate([0, 0, 30])
|
||||
cylinder(r=3.2, h=floorthick+(adj*2)+5, $fn=6);
|
||||
translate([size[0]-6.5, (size[1]/2)-.5, -adj])
|
||||
cylinder(d=3.2, h=floorthick+(adj*2)+5);
|
||||
translate([2+adj, 3, floorthick]) cube([3, 8.25, 2.75]);
|
||||
translate([2+adj, size[1]-13, floorthick]) cube([3, 8.25, 2.75]);
|
||||
if(size[1] > 100) {
|
||||
translate([2+adj, (size[1]/2)-(7.75/2)-1.25, floorthick]) cube([3, 7.75, 2.5]);
|
||||
}
|
||||
if(orientation == "landscape") {
|
||||
difference() {
|
||||
union() {
|
||||
translate([0, -1, 0]) cube([size_x, size_y, floorthick]);
|
||||
// access panel support
|
||||
translate([size_x-6.5, (size_y/2)-.5, 0]) cylinder(d=9, h=floorthick+(adj*2)+5);
|
||||
translate([size_x-11, (size_y/2)-10.5, floorthick-adj]) cube([9.5, 20, floorthick]);
|
||||
translate([0, 0, floorthick-adj]) cube([5, size_y-2, 4.5]);
|
||||
}
|
||||
// access opening
|
||||
translate([6, -.5, -adj]) cube([size_x-17, size_y-1.15, floorthick+(adj*3)]);
|
||||
translate([size_x-12, (size_y/2)-6, -adj]) slab([5.5, 10.5, floorthick], 5.5);
|
||||
translate([size_x-6.5, (size_y/2)-.5, floorthick+2]) rotate([0, 0, 30])
|
||||
cylinder(r=3.2, h=floorthick+(adj*2)+5, $fn=6);
|
||||
translate([size_x-6.5, (size_y/2)-.5, -adj])
|
||||
cylinder(d=3.2, h=floorthick+(adj*2)+5);
|
||||
translate([2+adj, 3, floorthick]) cube([3, 8.25, 2.75]);
|
||||
translate([2+adj, size_y-13, floorthick]) cube([3, 8.25, 2.75]);
|
||||
if(size_y > 100) {
|
||||
translate([2+adj, (size_y/2)-(7.75/2)-1.25, floorthick]) cube([3, 7.75, 2.5]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -103,42 +125,44 @@ module access_port(size, orientation) {
|
||||
|
||||
module access_cover(size, orientation) {
|
||||
|
||||
size_x = size[0];
|
||||
size_y = size[1];
|
||||
floorthick = size[2];
|
||||
adj = .01;
|
||||
$fn = 90;
|
||||
if(orientation == "portrait") {
|
||||
difference() {
|
||||
union() {
|
||||
translate([1, 6.25, 0]) cube([size[0]-2.15, size[1]-17.5, floorthick]);
|
||||
translate([(size[0]/2)-4.75, size[1]-12.25, 0]) slab([10, 5, floorthick], 5);
|
||||
translate([1, 6.25, floorthick-adj]) cube([size[0]-2.15, 6, floorthick]);
|
||||
translate([1, 6.25, 0]) cube([size_x-2.15, size_y-17.5, floorthick]);
|
||||
translate([(size_x/2)-4.75, size_y-12.25, 0]) slab([10, 5, floorthick], 5);
|
||||
translate([1, 6.25, floorthick-adj]) cube([size_x-2.15, 6, floorthick]);
|
||||
translate([4.25, 3, floorthick]) cube([7.25, 4, 2]);
|
||||
translate([size[0]-12.75, 3, floorthick]) cube([7.25, 4, 2]);
|
||||
if(size[0] > 100) {
|
||||
translate([(size[0]/2)+.25, 3, floorthick]) cube([7.25, 4, 2]);
|
||||
translate([size_x-12.75, 3, floorthick]) cube([7.25, 4, 2]);
|
||||
if(size_x > 100) {
|
||||
translate([(size_x/2)+.25, 3, floorthick]) cube([7.25, 4, 2]);
|
||||
}
|
||||
}
|
||||
translate([(size[0]/2)+.25, size[1]-6.5, -floorthick-adj])
|
||||
translate([(size_x/2)+.25, size_y-6.5, -floorthick-adj])
|
||||
cylinder(d=3.2, h=(floorthick*2)+(adj*2));
|
||||
translate([(size[0]/2)+.25, size[1]-6.5, -adj])
|
||||
translate([(size_x/2)+.25, size_y-6.5, -adj])
|
||||
cylinder(d1=6, d2=3.2, h=floorthick);
|
||||
}
|
||||
}
|
||||
if(orientation == "landscape") {
|
||||
difference() {
|
||||
union() {
|
||||
translate([6.25, 0, 0]) cube([size[0]-17.75, size[1]-2, floorthick]);
|
||||
translate([size[0]-12.25, (size[1]/2)-5.75, 0]) slab([5, 10, floorthick], 5);
|
||||
translate([6.25, 0, floorthick-adj]) cube([6,size[1]-2.15, floorthick]);
|
||||
translate([6.25, 0, 0]) cube([size_x-17.75, size_y-2, floorthick]);
|
||||
translate([size_x-12.25, (size_y/2)-5.75, 0]) slab([5, 10, floorthick], 5);
|
||||
translate([6.25, 0, floorthick-adj]) cube([6,size_y-2.15, floorthick]);
|
||||
translate([3.5+adj, 3.25, floorthick]) cube([4, 7.25, 2]);
|
||||
translate([3.5+adj, size[1]-12.75, floorthick]) cube([4, 7.25, 2]);
|
||||
if(size[1] > 100) {
|
||||
translate([3.5+adj, (size[1]/2)-(7.75/2)-1, floorthick]) cube([4, 7.25, 2]);
|
||||
translate([3.5+adj, size_y-12.75, floorthick]) cube([4, 7.25, 2]);
|
||||
if(size_y > 100) {
|
||||
translate([3.5+adj, (size_y/2)-(7.75/2)-1, floorthick]) cube([4, 7.25, 2]);
|
||||
}
|
||||
}
|
||||
translate([size[0]-6.5, (size[1]/2)-.75, -floorthick-adj])
|
||||
translate([size_x-6.5, (size_y/2)-.75, -floorthick-adj])
|
||||
cylinder(d=3.2, h=(floorthick*2)+(adj*2));
|
||||
translate([size[0]-6.5, (size[1]/2)-.75, -adj])
|
||||
translate([size_x-6.5, (size_y/2)-.75, -adj])
|
||||
cylinder(d1=6, d2=3.2, h=floorthick);
|
||||
}
|
||||
}
|
||||
|
||||
545
lib/oem_hk.scad
545
lib/oem_hk.scad
@@ -15,16 +15,17 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
hk_uart_holder()
|
||||
hk_uart(mask)
|
||||
hk_uart_holder(mask)
|
||||
hk_uart_strap ()
|
||||
hc4_oled_holder(side, floorthick)
|
||||
hk_wb2()
|
||||
hc4_oled()
|
||||
h2_netcard()
|
||||
hc4_oled(mask)
|
||||
hc4_oled_holder(side, floorthick, mask)
|
||||
hk35_lcd()
|
||||
hk_uart()
|
||||
hk_vu7c(gpio_ext, tabs)
|
||||
hk_vu8m(bracket)
|
||||
hk_vu8s()
|
||||
hk_wb2()
|
||||
hk_netcard(mask)
|
||||
u_bracket()
|
||||
m1_hdmount()
|
||||
hk_speaker()
|
||||
@@ -43,38 +44,94 @@
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
NAME: hk_uart
|
||||
DESCRIPTION: hardkernel micro-usb console uart
|
||||
TODO: none
|
||||
|
||||
USAGE: hk_uart(mask)
|
||||
|
||||
mask[0] = enablemask
|
||||
mask[1] = mask length
|
||||
mask[2] = mask setback
|
||||
mask[3] = mask style, "default"
|
||||
*/
|
||||
|
||||
module hk_uart(mask) {
|
||||
|
||||
size = [22,13,1.25];
|
||||
enablemask = mask[0];
|
||||
mlength = mask[1];
|
||||
msetback = mask[2];
|
||||
mstyle = mask[3];
|
||||
|
||||
adj = .01;
|
||||
$fn = 90;
|
||||
|
||||
if(enablemask == true) {
|
||||
translate([23-msetback,3.75,3]) rotate([90,0,90]) slot(4, 5, mlength);
|
||||
}
|
||||
if(enablemask == false) {
|
||||
color("#008066") cube([size[0],size[1],size[2]]);
|
||||
translate([6.75,3,-2+adj])cylinder(d=.62, 2);
|
||||
translate([6.75,5.25,-2+adj])cylinder(d=.62, 2);
|
||||
translate([6.75,7.5,-2+adj])cylinder(d=.62, 2);
|
||||
translate([6.75,9.75,-2+adj])cylinder(d=.62, 2);
|
||||
uart("molex_5268",.5,.25,0,"top", 90, [0,0,0], [0], size[2], false, [false,0,0,"none"]);
|
||||
usb2("micro",18.5, 2.5, 0, "top", 270, [0,0,0], [0], size[2], false, [false,0,0,"none"]);
|
||||
ic("generic", 13, 4.5, 0, "top", 0, [4,4,1], ["dimgrey"], size[2], false, [false,0,0,"none"]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: hk_uart_holder
|
||||
DESCRIPTION: hardkernel micro-usb uart holder
|
||||
TODO: none
|
||||
|
||||
USAGE: hk_uart_holder()
|
||||
USAGE: hk_uart_holder(mask)
|
||||
|
||||
mask[0] = enablemask
|
||||
mask[1] = mask length
|
||||
mask[2] = mask setback
|
||||
mask[3] = mask style, "default"
|
||||
*/
|
||||
|
||||
module hk_uart_holder() {
|
||||
module hk_uart_holder(mask) {
|
||||
|
||||
enablemask = mask[0];
|
||||
mlength = mask[1];
|
||||
msetback = mask[2];
|
||||
mstyle = mask[3];
|
||||
|
||||
if(enablemask == true) {
|
||||
translate([23-msetback,3.75,3]) rotate([90,0,90]) slot(4, 5, mlength);
|
||||
}
|
||||
if(enablemask == false) {
|
||||
translate([22,-2.5,-3]) rotate([0,0,90])
|
||||
union () {
|
||||
difference () {
|
||||
translate ([0,0,0]) cube([18,24,9]);
|
||||
cube([18,21.75,9]);
|
||||
translate ([2,-2,3]) cube([14,27,7]);
|
||||
//pin slot
|
||||
translate ([3.5,16,-1]) cube([11,1,5]);
|
||||
translate ([3.5,14.75,-1]) cube([11,1,5]);
|
||||
//component bed
|
||||
translate ([3.5,1.5,2]) cube ([11,14,2]);
|
||||
//side trim
|
||||
translate ([-1,-1,6]) cube([20,18,4]);
|
||||
translate ([-1,-2.5,6]) cube([20,18,4]);
|
||||
}
|
||||
difference (){
|
||||
translate ([-1.5,20,0]) cylinder(r=3,h=9, $fn=90);
|
||||
translate ([-1.5,20,-1]) cylinder (r=1.375, h=11, $fn=90);
|
||||
translate ([-1.5,18.5,0]) cylinder(r=3,h=9, $fn=90);
|
||||
translate ([-1.5,18.5,-1]) cylinder (r=1.375, h=11, $fn=90);
|
||||
}
|
||||
difference (){
|
||||
translate ([19.5,20,0]) cylinder(r=3,h=9, $fn=90);
|
||||
translate ([19.5,20,-1]) cylinder (r=1.375, h=11,$fn=90);
|
||||
translate ([19.5,18.5,0]) cylinder(r=3,h=9, $fn=90);
|
||||
translate ([19.5,18.5,-1]) cylinder (r=1.375, h=11,$fn=90);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@@ -87,115 +144,21 @@ module hk_uart_holder() {
|
||||
*/
|
||||
|
||||
module hk_uart_strap() {
|
||||
difference () {
|
||||
translate ([-4.5,17,9]) cube([27,6,3]);
|
||||
translate ([-1.5,20,8]) cylinder (r=1.6, h=5, $fn=90);
|
||||
translate ([19.5,20,8]) cylinder (r=1.6, h=5, $fn=90);
|
||||
}
|
||||
difference (){
|
||||
translate ([-1.5,20,12]) cylinder(r=3,h=1, $fn=90);
|
||||
translate ([-1.5,20,11]) cylinder (r=1.6, h=7, $fn=90);
|
||||
}
|
||||
difference (){
|
||||
translate ([19.5,20,12]) cylinder(r=3,h=1, $fn=90);
|
||||
translate ([19.5,20,11]) cylinder (r=1.6, h=7, $fn=90);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: hk_wb2
|
||||
DESCRIPTION: hardkernel weather board 2
|
||||
TODO: none
|
||||
|
||||
USAGE: hk_wb2()
|
||||
|
||||
*/
|
||||
|
||||
module hk_wb2() {
|
||||
difference () {
|
||||
union() {
|
||||
color("tan") cube([16.5,16.5,1]);
|
||||
translate([1.75,15.75,.75]) rotate([180,0,0]) header_f(6,9);
|
||||
color("silver") translate([11.5,11.5,1]) cube([2,3,.5]);
|
||||
color("silver") translate([11.5,3,1]) cube([2,3,.5]);
|
||||
translate([22,-2.5,-3]) rotate([0,0,90])
|
||||
union() {
|
||||
difference () {
|
||||
translate ([-4.5,15.5,9]) cube([27,6,3]);
|
||||
translate ([-1.5,18.5,8]) cylinder (r=1.6, h=5, $fn=90);
|
||||
translate ([19.5,18.5,8]) cylinder (r=1.6, h=5, $fn=90);
|
||||
}
|
||||
difference (){
|
||||
translate ([-1.5,18.5,12]) cylinder(r=3,h=1, $fn=90);
|
||||
translate ([-1.5,18.5,11]) cylinder (r=1.6, h=7, $fn=90);
|
||||
}
|
||||
translate([9.6,8.33,-1])
|
||||
color("tan") hull() {
|
||||
cylinder(d=1, h=3);
|
||||
translate([5,0,0]) cylinder(d=1, h=3);
|
||||
}
|
||||
translate([7.36,2,-1]) rotate([0,0,90])
|
||||
color("tan") hull() {
|
||||
cylinder(d=1, h=3);
|
||||
translate([5,0,0]) cylinder(d=1, h=3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: hc4_oled_holder
|
||||
DESCRIPTION: hardkernel odroid-hc4 oled holder
|
||||
TODO: none
|
||||
|
||||
USAGE: hc4_oled_holder(side, wallthick)
|
||||
|
||||
side = "top", "bottom"
|
||||
wallthick = wall thickness
|
||||
*/
|
||||
|
||||
module hc4_oled_holder(side, wallthick) {
|
||||
|
||||
adj=.01;
|
||||
$fn = 90;
|
||||
|
||||
difference() {
|
||||
union() {
|
||||
if(side == "top") {
|
||||
translate([-1.85,-1.75,-4]) cube([32,5,4]);
|
||||
translate([30.15,-3.75,1])
|
||||
rotate([0,-90,0])
|
||||
linear_extrude(height = 32)
|
||||
polygon(points = [ [-wallthick/2,-wallthick/2],
|
||||
[-4,wallthick],
|
||||
[-4,2],
|
||||
[-wallthick/2,2]]);
|
||||
translate([-1.85,4,1])
|
||||
rotate([0,-90,180])
|
||||
linear_extrude(height = 32)
|
||||
polygon(points = [ [-wallthick/2,-wallthick/2],
|
||||
[-4,wallthick],
|
||||
[-4,2],
|
||||
[-wallthick/2,2]]);
|
||||
}
|
||||
if(side == "bottom") {
|
||||
translate([-1.85,-1.75,0]) cube([32,5,4]);
|
||||
translate([30.15,-3.75,1])
|
||||
rotate([0,-90,0])
|
||||
linear_extrude(height = 32)
|
||||
polygon(points = [ [-wallthick/2,-wallthick/2],
|
||||
[2,wallthick],
|
||||
[2,2],
|
||||
[-wallthick/2,2]]);
|
||||
translate([-1.85,4,1])
|
||||
rotate([0,-90,180])
|
||||
linear_extrude(height = 32)
|
||||
polygon(points = [ [-wallthick/2,-wallthick/2],
|
||||
[2,wallthick],
|
||||
[2,2],
|
||||
[-wallthick/2,2]]);
|
||||
}
|
||||
}
|
||||
if(side == "top") {
|
||||
translate([-.5,0,wallthick-8]) cube([29.5,1.9,5]);
|
||||
translate([(32.75/2-(15/2))-1.85,-adj-3-1.75,-wallthick-2.5]) cube([15,12,wallthick+3]);
|
||||
}
|
||||
if(side == "bottom") {
|
||||
translate([-.5,0,-adj]) cube([29.5,1.42,5]);
|
||||
translate([(32.75/2-(15/2))-1.85,-adj-3-1.75,-adj]) cube([15,12,8]);
|
||||
translate([2.5,-adj-3-1.75,-adj]) cube([6,3,8]);
|
||||
translate([12.5,adj,10]) rotate([90,0,0]) cylinder(d=21, h=2);
|
||||
difference (){
|
||||
translate ([19.5,18.5,12]) cylinder(r=3,h=1, $fn=90);
|
||||
translate ([19.5,18.5,11]) cylinder (r=1.6, h=7, $fn=90);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -206,10 +169,10 @@ module hc4_oled_holder(side, wallthick) {
|
||||
DESCRIPTION: hardkernel odroid-hc4 oled
|
||||
TODO: none
|
||||
|
||||
USAGE: hc4_oled_holder()
|
||||
USAGE: hc4_oled_holder(mask)
|
||||
*/
|
||||
|
||||
module hc4_oled() {
|
||||
module hc4_oled(mask) {
|
||||
|
||||
adj = .01;
|
||||
$fn=90;
|
||||
@@ -219,75 +182,117 @@ module hc4_oled() {
|
||||
oled_open_x = 29;
|
||||
oled_open_y = 1.5;
|
||||
|
||||
difference() {
|
||||
union() {
|
||||
// pcb board
|
||||
color("Tan", 1) translate([0,0,0]) cube([oled_x,oled_y,oled_z]);
|
||||
// oled
|
||||
color("Black", 1) translate([.5,1.25,25.5]) cube([oled_x-1,.625,15]);
|
||||
color("DarkGrey", 1) translate([.5,1.25,40.5]) cube([oled_x-1,.625,4]);
|
||||
}
|
||||
translate([2.8,0,46.7]) {
|
||||
translate([-.6,1.26,0]) rotate([90,0,0])
|
||||
hull() {
|
||||
translate([1.2,0,0]) cylinder(d=1.8, h=1.25+(adj*2));
|
||||
cylinder(d=1.8, h=1.25+(adj*2));
|
||||
}
|
||||
}
|
||||
translate([25.7,0,46.7]) {
|
||||
translate([-.6,1.26,0]) rotate([90,0,0])
|
||||
hull() {
|
||||
translate([1.2,0,0]) cylinder(d=1.8, h=1.25+(adj*2));
|
||||
cylinder(d=1.8, h=1.25+(adj*2));
|
||||
}
|
||||
enablemask = mask[0];
|
||||
mlength = mask[1];
|
||||
msetback = mask[2];
|
||||
mstyle = mask[3];
|
||||
|
||||
if(enablemask == true) {
|
||||
translate([.5,2-msetback+mlength,25.25]) rotate([90,0,0]) slab([27.5,15.5,mlength], .25);
|
||||
}
|
||||
if(enablemask == false) {
|
||||
|
||||
difference() {
|
||||
union() {
|
||||
// pcb board
|
||||
color("#008066", 1) translate([0,0,0]) cube([oled_x,oled_y,oled_z]);
|
||||
// oled
|
||||
color("Black", 1) translate([.5,1.25,25.5]) cube([oled_x-1,.625,15]);
|
||||
color("DarkGrey", 1) translate([.5,1.25,40.5]) cube([oled_x-1,.625,4]);
|
||||
}
|
||||
color("#008066", 1) translate([2.8,0,46.7]) {
|
||||
translate([-.6,1.26,0]) rotate([90,0,0])
|
||||
hull() {
|
||||
translate([1.2,0,0]) cylinder(d=1.8, h=1.25+(adj*2));
|
||||
cylinder(d=1.8, h=1.25+(adj*2));
|
||||
}
|
||||
}
|
||||
color("#008066", 1) translate([25.7,0,46.7]) {
|
||||
translate([-.6,1.26,0]) rotate([90,0,0])
|
||||
hull() {
|
||||
translate([1.2,0,0]) cylinder(d=1.8, h=1.25+(adj*2));
|
||||
cylinder(d=1.8, h=1.25+(adj*2));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: h2_netcard
|
||||
DESCRIPTION: hardkernel m.2 network card
|
||||
NAME: hc4_oled_holder
|
||||
DESCRIPTION: hardkernel odroid-hc4 oled holder
|
||||
TODO: none
|
||||
|
||||
USAGE: h2_netcard()
|
||||
USAGE: hc4_oled_holder(side, wallthick, mask)
|
||||
|
||||
side = "top", "bottom"
|
||||
wallthick = wall thickness
|
||||
*/
|
||||
|
||||
module h2_netcard() {
|
||||
module hc4_oled_holder(side, wallthick, mask) {
|
||||
|
||||
adj = .01;
|
||||
adj=.01;
|
||||
$fn = 90;
|
||||
difference() {
|
||||
union() {
|
||||
color("tan") translate ([0,0,0]) linear_extrude(height = 1) import("./dxf/hk-network-card.dxf");
|
||||
color("goldenrod") translate([3.75,17.85,1-adj]) cylinder(d=6,h=3);
|
||||
color("goldenrod") translate([106,24.85,1-adj]) cylinder(d=6,h=3);
|
||||
}
|
||||
translate([20.85,3.85,-adj]) cylinder(d=3,h=4);
|
||||
translate([3.75,17.85,-adj]) cylinder(d=3,h=6);
|
||||
translate([3.75,51.1,-adj]) cylinder(d=3,h=4);
|
||||
translate([20.15,43.85,-adj]) cylinder(d=3,h=4);
|
||||
translate([106,24.85,-adj]) cylinder(d=3,h=6);
|
||||
translate([96.5,3.85,-adj]) cylinder(d=3,h=4);
|
||||
}
|
||||
rj45(26,-1,0,"bottom",1);
|
||||
rj45(43,-1,0,"bottom",1);
|
||||
rj45(60,-1,0,"bottom",1);
|
||||
rj45(77,-1,0,"bottom",1);
|
||||
place(30,25,0,6,6,0,"bottom") color("dimgray") translate([0,0,0]) cube([6,6,.8]);
|
||||
place(47,25,0,6,6,0,"bottom") color("dimgray") translate([0,0,0]) cube([6,6,.8]);
|
||||
place(64,25,0,6,6,0,"bottom") color("dimgray") translate([0,0,0]) cube([6,6,.8]);
|
||||
place(79,25,0,6,6,0,"bottom") color("dimgray") translate([0,0,0]) cube([6,6,.8]);
|
||||
place(56.5,41,0,5,9.75,0,"bottom") color("dimgray") translate([0,0,0]) cube([5,9.75,.8]);
|
||||
for (i=[34.65:.5:48.5]) {
|
||||
color("gold") translate([98,i,1]) cube([2,.25,.25]);
|
||||
color("gold") translate([98,i,-.24]) cube([2,.25,.25]);
|
||||
}
|
||||
for (i=[51:.5:53]) {
|
||||
color("gold") translate([98,i,1]) cube([2,.25,.25]);
|
||||
color("gold") translate([98,i,-.24]) cube([2,.25,.25]);
|
||||
}
|
||||
|
||||
enablemask = mask[0];
|
||||
mlength = mask[1];
|
||||
msetback = mask[2];
|
||||
mstyle = mask[3];
|
||||
|
||||
if(enablemask == true) {
|
||||
translate([.5,2-msetback+mlength,25.25]) rotate([90,0,0]) slab([27.5,15.5,mlength], .25);
|
||||
}
|
||||
if(enablemask == false) {
|
||||
difference() {
|
||||
union() {
|
||||
if(side == "top") {
|
||||
translate([-1.85,-1.75,-4]) cube([32,5,4]);
|
||||
translate([30.15,-3.75,1])
|
||||
rotate([0,-90,0])
|
||||
linear_extrude(height = 32)
|
||||
polygon(points = [ [-wallthick/2,-wallthick/2],
|
||||
[-4,wallthick],
|
||||
[-4,2],
|
||||
[-wallthick/2,2]]);
|
||||
translate([-1.85,4,1])
|
||||
rotate([0,-90,180])
|
||||
linear_extrude(height = 32)
|
||||
polygon(points = [ [-wallthick/2,-wallthick/2],
|
||||
[-4,wallthick],
|
||||
[-4,2],
|
||||
[-wallthick/2,2]]);
|
||||
}
|
||||
if(side == "bottom") {
|
||||
translate([-1.85,-1.75,0]) cube([32,5,4]);
|
||||
translate([30.15,-3.75,1])
|
||||
rotate([0,-90,0])
|
||||
linear_extrude(height = 32)
|
||||
polygon(points = [ [-wallthick/2,-wallthick/2],
|
||||
[2,wallthick],
|
||||
[2,2],
|
||||
[-wallthick/2,2]]);
|
||||
translate([-1.85,4,1])
|
||||
rotate([0,-90,180])
|
||||
linear_extrude(height = 32)
|
||||
polygon(points = [ [-wallthick/2,-wallthick/2],
|
||||
[2,wallthick],
|
||||
[2,2],
|
||||
[-wallthick/2,2]]);
|
||||
}
|
||||
}
|
||||
if(side == "top") {
|
||||
translate([-.5,0,wallthick-8]) cube([29.5,1.9,5]);
|
||||
translate([(32.75/2-(15/2))-1.85,-adj-3-1.75,-wallthick-2.5]) cube([15,12,wallthick+3]);
|
||||
}
|
||||
if(side == "bottom") {
|
||||
translate([-.5,0,-adj]) cube([29.5,1.42,5]);
|
||||
translate([(32.75/2-(15/2))-1.85,-adj-3-1.75,-adj]) cube([15,12,8]);
|
||||
translate([2.5,-adj-3-1.75,-adj]) cube([6,3,8]);
|
||||
translate([12.5,adj,10]) rotate([90,0,0]) cylinder(d=21, h=2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -305,7 +310,7 @@ module hk35_lcd() {
|
||||
$fn = 90;
|
||||
difference() {
|
||||
union() {
|
||||
color("tan") translate ([0,0,0]) slab([95,56,1.7],3.5);
|
||||
color("#008066") translate ([0,0,0]) slab([95,56,1.7],3.5);
|
||||
color("black",1) translate([10.5,0,1.7]) cube([74.75,54.5,4]);
|
||||
color("white",1) translate([8.5,0,5.7-adj]) cube([82.75,54.5,2]);
|
||||
color("grey",1) translate([8.5,0,7.7-adj]) cube([82.75,54.5,.8]);
|
||||
@@ -323,30 +328,6 @@ module hk35_lcd() {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: hk35_lcd
|
||||
DESCRIPTION: hardkernel micro-usb console uart
|
||||
TODO: none
|
||||
|
||||
USAGE: hk_uart()
|
||||
*/
|
||||
|
||||
module hk_uart() {
|
||||
|
||||
size = [22,13,1.25];
|
||||
adj = .01;
|
||||
$fn = 90;
|
||||
color("tan") cube([size[0],size[1],size[2]]);
|
||||
translate([6.5,.25,6.25-adj]) rotate([90,180,-90]) uart_micro();
|
||||
translate([6.75,3,-2+adj])cylinder(d=1, 2);
|
||||
translate([6.75,5.25,-2+adj])cylinder(d=1, 2);
|
||||
translate([6.75,7.5,-2+adj])cylinder(d=1, 2);
|
||||
translate([6.75,9.75,-2+adj])cylinder(d=1, 2);
|
||||
translate([23,2.75,1.25]) rotate([0,0,90]) usb_micro();
|
||||
translate([13,4.5,1.25]) rotate([0,0,90]) ic([4,4,1]);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: hk_vu7c
|
||||
DESCRIPTION: hardkernel vu7c lcd display
|
||||
@@ -672,6 +653,94 @@ module hk_vu8s() {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: hk_wb2
|
||||
DESCRIPTION: hardkernel weather board 2
|
||||
TODO: none
|
||||
|
||||
USAGE: hk_wb2()
|
||||
|
||||
*/
|
||||
|
||||
module hk_wb2() {
|
||||
difference () {
|
||||
union() {
|
||||
color("#008066") cube([16.5,16.5,1]);
|
||||
translate([1.75,15.75,.75]) rotate([180,0,0]) header_f(6,9);
|
||||
color("silver") translate([11.5,11.5,1]) cube([2,3,.5]);
|
||||
color("silver") translate([11.5,3,1]) cube([2,3,.5]);
|
||||
}
|
||||
translate([9.6,8.33,-1])
|
||||
color("#008066") hull() {
|
||||
cylinder(d=1, h=3);
|
||||
translate([5,0,0]) cylinder(d=1, h=3);
|
||||
}
|
||||
translate([7.36,2,-1]) rotate([0,0,90])
|
||||
color("#008066") hull() {
|
||||
cylinder(d=1, h=3);
|
||||
translate([5,0,0]) cylinder(d=1, h=3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: hk_netcard
|
||||
DESCRIPTION: hardkernel m.2 network card
|
||||
TODO: none
|
||||
|
||||
USAGE: hk_netcard(mask)
|
||||
*/
|
||||
|
||||
module hk_netcard(mask) {
|
||||
|
||||
enablemask = mask[0];
|
||||
mlength = mask[1];
|
||||
msetback = mask[2];
|
||||
mstyle = mask[3];
|
||||
|
||||
adj = .01;
|
||||
$fn = 90;
|
||||
|
||||
if(enablemask == true) {
|
||||
translate([25.5, msetback-1,-14]) rotate([90, 0, 0]) slab([68, 14.5, mlength], .25);
|
||||
}
|
||||
if(enablemask == false) {
|
||||
|
||||
difference() {
|
||||
union() {
|
||||
color("#008066") translate ([0,0,0]) linear_extrude(height = 1) import("./dxf/hk-network-card.dxf");
|
||||
color("goldenrod") translate([3.75,17.85,1-adj]) cylinder(d=6,h=3);
|
||||
color("goldenrod") translate([106,24.85,1-adj]) cylinder(d=6,h=3);
|
||||
}
|
||||
translate([20.85,3.85,-adj]) cylinder(d=3,h=4);
|
||||
translate([3.75,17.85,-adj]) cylinder(d=3,h=6);
|
||||
translate([3.75,51.1,-adj]) cylinder(d=3,h=4);
|
||||
translate([20.15,43.85,-adj]) cylinder(d=3,h=4);
|
||||
translate([106,24.85,-adj]) cylinder(d=3,h=6);
|
||||
translate([96.5,3.85,-adj]) cylinder(d=3,h=4);
|
||||
}
|
||||
network("rj45_single", 26, -1, 0, "bottom", 0, [6, 6, .8], [0], 1, false, [false, 0, 0, "none"]);
|
||||
network("rj45_single", 43, -1, 0, "bottom", 0, [6, 6, .8], [0], 1, false, [false, 0, 0, "none"]);
|
||||
network("rj45_single", 60, -1, 0, "bottom", 0, [6, 6, .8], [0], 1, false, [false, 0, 0, "none"]);
|
||||
network("rj45_single", 77, -1, 0, "bottom", 0, [6, 6, .8], [0], 1, false, [false, 0, 0, "none"]);
|
||||
ic("generic", 30, 25, 0, "bottom", 0, [6, 6, .8], ["dimgrey"], 1, false, [false, 0, 0, "none"]);
|
||||
ic("generic", 47, 25, 0, "bottom", 0, [6, 6, .8], ["dimgrey"], 1, false, [false, 0, 0, "none"]);
|
||||
ic("generic", 64, 25, 0, "bottom", 0, [6, 6, .8], ["dimgrey"], 1, false, [false, 0, 0, "none"]);
|
||||
ic("generic", 79, 25, 0, "bottom", 0, [6, 6, .8], ["dimgrey"], 1, false, [false, 0, 0, "none"]);
|
||||
ic("generic", 56.5, 41, 0, "bottom", 0, [5, 9.75, .8], ["dimgrey"], 1, false, [false, 0, 0, "none"]);
|
||||
for (i=[34.65:.5:48.5]) {
|
||||
color("gold") translate([98,i,1]) cube([2,.25,.25]);
|
||||
color("gold") translate([98,i,-.24]) cube([2,.25,.25]);
|
||||
}
|
||||
for (i=[51:.5:53]) {
|
||||
color("gold") translate([98,i,1]) cube([2,.25,.25]);
|
||||
color("gold") translate([98,i,-.24]) cube([2,.25,.25]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: m1_hdmount
|
||||
DESCRIPTION: hardkernel odroid-m1 2.5" sata hdd mounting kit
|
||||
@@ -823,40 +892,40 @@ module hk_boom(speakers, orientation) {
|
||||
|
||||
difference() {
|
||||
union() {
|
||||
color("tan") translate ([0,0,0]) slab([60,35,1.6],.5);
|
||||
color("#008066") translate ([0,0,0]) slab([60,35,1.6],.5);
|
||||
if(speakers == true) {
|
||||
color("tan") translate ([-31.5,0,0]) slab([31.5,35,1.6],.5);
|
||||
color("#008066") translate ([-31.5,0,0]) slab([31.5,35,1.6],.5);
|
||||
color("white") translate ([-0.25,0,0]) cube([.5,35,1.6]);
|
||||
color("tan") translate ([60,0,0]) slab([31.5,35,1.6],.5);
|
||||
color("#008066") translate ([60,0,0]) slab([31.5,35,1.6],.5);
|
||||
color("white") translate ([60,0,0]) cube([.5,35,1.6]);
|
||||
}
|
||||
}
|
||||
// pcb holes
|
||||
color("tan") translate([3.5,3.5,-adj]) cylinder(d=3,h=6);
|
||||
color("tan") translate([3.5,31.5,-adj]) cylinder(d=3,h=6);
|
||||
color("tan") translate([56.5,3.5,-adj]) cylinder(d=3,h=4);
|
||||
color("tan") translate([56.5,31.5,-adj]) cylinder(d=3,h=4);
|
||||
color("#008066") translate([3.5,3.5,-adj]) cylinder(d=3,h=6);
|
||||
color("#008066") translate([3.5,31.5,-adj]) cylinder(d=3,h=6);
|
||||
color("#008066") translate([56.5,3.5,-adj]) cylinder(d=3,h=4);
|
||||
color("#008066") translate([56.5,31.5,-adj]) cylinder(d=3,h=4);
|
||||
if(speakers == true) {
|
||||
// left
|
||||
color("tan") translate([-28,3.5,-adj]) cylinder(d=3,h=6);
|
||||
color("tan") translate([-28,31.5,-adj]) cylinder(d=3,h=6);
|
||||
color("tan") translate([-3.5,3.5,-adj]) cylinder(d=3,h=6);
|
||||
color("tan") translate([-3.5,31.5,-adj]) cylinder(d=3,h=6);
|
||||
color("#008066") translate([-28,3.5,-adj]) cylinder(d=3,h=6);
|
||||
color("#008066") translate([-28,31.5,-adj]) cylinder(d=3,h=6);
|
||||
color("#008066") translate([-3.5,3.5,-adj]) cylinder(d=3,h=6);
|
||||
color("#008066") translate([-3.5,31.5,-adj]) cylinder(d=3,h=6);
|
||||
// right
|
||||
color("tan") translate([64.5,3.5,-adj]) cylinder(d=3,h=4);
|
||||
color("tan") translate([64.5,31.5,-adj]) cylinder(d=3,h=4);
|
||||
color("tan") translate([88,3.5,-adj]) cylinder(d=3,h=4);
|
||||
color("tan") translate([88,31.5,-adj]) cylinder(d=3,h=4);
|
||||
color("#008066") translate([64.5,3.5,-adj]) cylinder(d=3,h=4);
|
||||
color("#008066") translate([64.5,31.5,-adj]) cylinder(d=3,h=4);
|
||||
color("#008066") translate([88,3.5,-adj]) cylinder(d=3,h=4);
|
||||
color("#008066") translate([88,31.5,-adj]) cylinder(d=3,h=4);
|
||||
// left speaker openings
|
||||
color("tan") translate([-31.5/2,35/2,-adj]) cylinder(d=23.5, h=3);
|
||||
color("tan") translate([-4-31.5/2,35/2+(23.5/2)-.5,-adj]) cube([6,3,3]);
|
||||
color("tan") translate([-4-31.5/2,35/2-(23.5/2)-2.5,-adj]) cube([6,3,3]);
|
||||
color("tan") translate([-4-31.5/2+(23.5/2)+1,-2+35/2,-adj]) cube([6,3,3]);
|
||||
color("#008066") translate([-31.5/2,35/2,-adj]) cylinder(d=23.5, h=3);
|
||||
color("#008066") translate([-4-31.5/2,35/2+(23.5/2)-.5,-adj]) cube([6,3,3]);
|
||||
color("#008066") translate([-4-31.5/2,35/2-(23.5/2)-2.5,-adj]) cube([6,3,3]);
|
||||
color("#008066") translate([-4-31.5/2+(23.5/2)+1,-2+35/2,-adj]) cube([6,3,3]);
|
||||
// right speaker openings
|
||||
color("tan") translate([60+(31.5/2),35/2,-adj]) cylinder(d=23.5, h=3);
|
||||
color("tan") translate([60-3+31.5/2,35/2+(23.5/2)-.5,-adj]) cube([6,3,3]);
|
||||
color("tan") translate([60-3+31.5/2,35/2-(23.5/2)-2.5,-adj]) cube([6,3,3]);
|
||||
color("tan") translate([60+1.25,-2+35/2,-adj]) cube([6,3,3]);
|
||||
color("#008066") translate([60+(31.5/2),35/2,-adj]) cylinder(d=23.5, h=3);
|
||||
color("#008066") translate([60-3+31.5/2,35/2+(23.5/2)-.5,-adj]) cube([6,3,3]);
|
||||
color("#008066") translate([60-3+31.5/2,35/2-(23.5/2)-2.5,-adj]) cube([6,3,3]);
|
||||
color("#008066") translate([60+1.25,-2+35/2,-adj]) cube([6,3,3]);
|
||||
}
|
||||
}
|
||||
// headers
|
||||
@@ -914,21 +983,21 @@ module hk_boom_speaker(side, speaker, pcb) {
|
||||
|
||||
if(pcb == true) {
|
||||
difference() {
|
||||
color("tan") slab([31.5,35,1.6],.5);
|
||||
color("tan") translate([27.5,4,-adj]) cylinder(d=3,h=6);
|
||||
color("tan") translate([27.5,31,-adj]) cylinder(d=3,h=6);
|
||||
color("tan") translate([4,4,-adj]) cylinder(d=3,h=6);
|
||||
color("tan") translate([4,31,-adj]) cylinder(d=3,h=6);
|
||||
color("#008066") slab([31.5,35,1.6],.5);
|
||||
color("#008066") translate([27.5,4,-adj]) cylinder(d=3,h=6);
|
||||
color("#008066") translate([27.5,31,-adj]) cylinder(d=3,h=6);
|
||||
color("#008066") translate([4,4,-adj]) cylinder(d=3,h=6);
|
||||
color("#008066") translate([4,31,-adj]) cylinder(d=3,h=6);
|
||||
|
||||
// speaker openings
|
||||
color("tan") translate([(31.5/2),35/2,-adj]) cylinder(d=23.5, h=3);
|
||||
color("tan") translate([-3+31.5/2,35/2+(23.5/2)-.5,-adj]) cube([6,3,3]);
|
||||
color("tan") translate([-3+31.5/2,35/2-(23.5/2)-2.5,-adj]) cube([6,3,3]);
|
||||
color("#008066") translate([(31.5/2),35/2,-adj]) cylinder(d=23.5, h=3);
|
||||
color("#008066") translate([-3+31.5/2,35/2+(23.5/2)-.5,-adj]) cube([6,3,3]);
|
||||
color("#008066") translate([-3+31.5/2,35/2-(23.5/2)-2.5,-adj]) cube([6,3,3]);
|
||||
if(side == "right") {
|
||||
color("tan") translate([.5,-2+35/2,-adj]) cube([6,3,3]);
|
||||
color("#008066") translate([.5,-2+35/2,-adj]) cube([6,3,3]);
|
||||
}
|
||||
if(side == "left") {
|
||||
color("tan") translate([31.5/2+(23.5/2)-2.5,-2+35/2,-adj]) cube([6,3,3]);
|
||||
color("#008066") translate([31.5/2+(23.5/2)-2.5,-2+35/2,-adj]) cube([6,3,3]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,25 +19,32 @@
|
||||
DESCRIPTION: create standoffs
|
||||
TODO: none
|
||||
|
||||
USAGE: standoff(stand_off)
|
||||
USAGE: standoff(stand_off, mask)
|
||||
|
||||
stand_off[radius, height, supportsize, supportheight, sink, pillarstyle, pillarsupport, reverse, insert_e, i_dia, i_depth])
|
||||
radius = pillar radius
|
||||
height = total height
|
||||
holesize = hole diameter
|
||||
supportsize = support size for sink
|
||||
supportheight = height of support for sink
|
||||
sink = none, countersunk, recessed, nut holder, blind
|
||||
pillarstyle = hex, round style of pillar
|
||||
pillarsupport = none, left, rear, front, right
|
||||
reverse = true or false
|
||||
insert_e = true or false
|
||||
i_dia = insert diameter
|
||||
i_depth = insert hole depth
|
||||
stand_off[radius, height, supportsize, supportheight, sink, pillarstyle,
|
||||
pillarsupport, reverse, insert_e, i_dia, i_depth], mask)
|
||||
|
||||
radius = pillar radius
|
||||
height = total height
|
||||
holesize = hole diameter
|
||||
supportsize = support size for sink
|
||||
supportheight = height of support for sink
|
||||
sink = none, countersunk, recessed, nut holder, blind
|
||||
pillarstyle = hex, round
|
||||
pillarsupport = none, left, rear, front, right
|
||||
reverse = true or false
|
||||
insert_e = true or false
|
||||
i_dia = insert diameter
|
||||
i_depth = insert hole depth
|
||||
|
||||
mask[0] = enablemask
|
||||
mask[1] = mlength
|
||||
mask[2] = msetback
|
||||
mask[3] = mstyle
|
||||
|
||||
*/
|
||||
|
||||
module standoff(stand_off){
|
||||
module standoff(stand_off, mask){
|
||||
|
||||
radius = stand_off[0];
|
||||
height = stand_off[1];
|
||||
@@ -51,94 +58,109 @@ module standoff(stand_off){
|
||||
insert_e = stand_off[9];
|
||||
i_dia = stand_off[10];
|
||||
i_depth = stand_off[11];
|
||||
enablemask = mask[0];
|
||||
mlength = mask[1];
|
||||
msetback = mask[2];
|
||||
mstyle = mask[3];
|
||||
|
||||
adj = 0.1;
|
||||
$fn = 90;
|
||||
|
||||
difference (){
|
||||
union () {
|
||||
if(pillarstyle == "hex" && reverse == false) {
|
||||
rotate([0,0,30]) cylinder(d=radius*2/sqrt(3),h=height,$fn=6);
|
||||
}
|
||||
if(pillarstyle == "hex" && reverse == true) {
|
||||
translate([0,0,-height]) rotate([0,0,30]) cylinder(d=radius*2/sqrt(3),h=height,$fn=6);
|
||||
}
|
||||
if(pillarstyle == "round" && reverse == false) {
|
||||
cylinder(d=radius,h=height,$fn=90);
|
||||
}
|
||||
if(pillarstyle == "round" && reverse == true) {
|
||||
translate([0,0,-height]) cylinder(d=radius,h=height,$fn=90);
|
||||
}
|
||||
if(reverse == true) {
|
||||
translate([0,0,-supportheight]) cylinder(d=(supportsize),h=supportheight,$fn=60);
|
||||
}
|
||||
else {
|
||||
cylinder(d=(supportsize),h=supportheight,$fn=60);
|
||||
}
|
||||
if(pillarsupport == "rear" && reverse == true) {
|
||||
translate([-1,-supportsize/2,-height]) cube([2,supportsize/2,height]);
|
||||
}
|
||||
if(pillarsupport == "rear" && reverse == false) {
|
||||
translate([-1,-supportsize/2,0]) cube([2,supportsize/2,height]);
|
||||
}
|
||||
if(pillarsupport == "front" && reverse == true) {
|
||||
translate([-1,0,-height]) cube([2,supportsize/2,height]);
|
||||
}
|
||||
if(pillarsupport == "front" && reverse == false) {
|
||||
translate([-1,0,0]) cube([2,supportsize/2,height]);
|
||||
}
|
||||
if(pillarsupport == "left" && reverse == true) {
|
||||
translate([-supportsize/2,-1,-height]) cube([supportsize/2,2,height]);
|
||||
}
|
||||
if(pillarsupport == "left" && reverse == false) {
|
||||
translate([-supportsize/2,-1,0]) cube([supportsize/2,2,height]);
|
||||
}
|
||||
if(pillarsupport == "right" && reverse == true) {
|
||||
translate([0,-1,-height]) cube([supportsize/2,2,height]);
|
||||
}
|
||||
if(pillarsupport == "right" && reverse == false) {
|
||||
translate([0,-1,0]) cube([supportsize/2,2,height]);
|
||||
}
|
||||
if(enablemask == true && mstyle == "default") {
|
||||
if(reverse == true) {
|
||||
translate([0,0,-msetback-adj]) cylinder(d=supportsize-2*adj,h=mlength);
|
||||
}
|
||||
// hole
|
||||
if(sink != "blind" && reverse == false) {
|
||||
translate([0,0,-adj]) cylinder(d=holesize, h=height+(adj*2),$fn=90);
|
||||
else {
|
||||
translate([0,0,-mlength+msetback+adj]) cylinder(d=supportsize-2*adj,h=mlength);
|
||||
}
|
||||
if(sink != "blind" && reverse == true) {
|
||||
translate([0,0,-adj-height]) cylinder(d=holesize, h=height+(adj*2),$fn=90);
|
||||
}
|
||||
// countersink hole
|
||||
if(sink == "countersunk" && reverse == false) {
|
||||
translate([0,0,-adj]) cylinder(d1=6.5, d2=(holesize), h=3);
|
||||
}
|
||||
if(sink == "countersunk" && reverse == true) {
|
||||
translate([0,0,+adj-2.5]) cylinder(d1=(holesize), d2=6.5, h=3);
|
||||
}
|
||||
// recessed hole
|
||||
if(sink == "recessed" && reverse == false) {
|
||||
translate([0,0,-adj]) cylinder(d=6.5, h=supportheight-2);
|
||||
}
|
||||
if(sink == "recessed" && reverse == true) {
|
||||
translate([0,0,+adj-supportheight+2]) cylinder(d=6.5, h=supportheight-2);
|
||||
}
|
||||
// nut holder
|
||||
if(sink == "nut holder" && reverse == false) {
|
||||
translate([0,0,-adj]) cylinder(r=3.3,h=3,$fn=6);
|
||||
}
|
||||
if(sink == "nut holder" && reverse == true) {
|
||||
translate([0,0,+adj-3]) cylinder(r=3.3,h=3,$fn=6);
|
||||
}
|
||||
// blind hole
|
||||
if(sink == "blind" && reverse == false) {
|
||||
translate([0,0,2]) cylinder(d=holesize, h=height,$fn=90);
|
||||
}
|
||||
if(sink == "blind" && reverse == true) {
|
||||
translate([0,0,-height-2-adj]) cylinder(d=holesize, h=height,$fn=90);
|
||||
}
|
||||
if(insert_e == true && reverse == false) {
|
||||
translate([0,0,height-i_depth]) cylinder(d=i_dia, h=i_depth+adj,$fn=90);
|
||||
}
|
||||
if(insert_e == true && reverse == true) {
|
||||
translate([0,0,-height-adj]) cylinder(d=i_dia, h=i_depth+adj,$fn=90);
|
||||
}
|
||||
if(enablemask == false) {
|
||||
difference (){
|
||||
union () {
|
||||
if(pillarstyle == "hex" && reverse == false) {
|
||||
rotate([0,0,30]) cylinder(d=radius*2/sqrt(3),h=height,$fn=6);
|
||||
}
|
||||
if(pillarstyle == "hex" && reverse == true) {
|
||||
translate([0,0,-height]) rotate([0,0,30]) cylinder(d=radius*2/sqrt(3),h=height,$fn=6);
|
||||
}
|
||||
if(pillarstyle == "round" && reverse == false) {
|
||||
cylinder(d=radius,h=height);
|
||||
}
|
||||
if(pillarstyle == "round" && reverse == true) {
|
||||
translate([0,0,-height]) cylinder(d=radius,h=height);
|
||||
}
|
||||
if(reverse == true) {
|
||||
translate([0,0,-supportheight]) cylinder(d=supportsize,h=supportheight);
|
||||
}
|
||||
else {
|
||||
cylinder(d=(supportsize),h=supportheight);
|
||||
}
|
||||
if(pillarsupport == "rear" && reverse == true) {
|
||||
translate([-1,-supportsize/2,-height]) cube([2,supportsize/2,height]);
|
||||
}
|
||||
if(pillarsupport == "rear" && reverse == false) {
|
||||
translate([-1,-supportsize/2,0]) cube([2,supportsize/2,height]);
|
||||
}
|
||||
if(pillarsupport == "front" && reverse == true) {
|
||||
translate([-1,0,-height]) cube([2,supportsize/2,height]);
|
||||
}
|
||||
if(pillarsupport == "front" && reverse == false) {
|
||||
translate([-1,0,0]) cube([2,supportsize/2,height]);
|
||||
}
|
||||
if(pillarsupport == "left" && reverse == true) {
|
||||
translate([-supportsize/2,-1,-height]) cube([supportsize/2,2,height]);
|
||||
}
|
||||
if(pillarsupport == "left" && reverse == false) {
|
||||
translate([-supportsize/2,-1,0]) cube([supportsize/2,2,height]);
|
||||
}
|
||||
if(pillarsupport == "right" && reverse == true) {
|
||||
translate([0,-1,-height]) cube([supportsize/2,2,height]);
|
||||
}
|
||||
if(pillarsupport == "right" && reverse == false) {
|
||||
translate([0,-1,0]) cube([supportsize/2,2,height]);
|
||||
}
|
||||
}
|
||||
// hole
|
||||
if(sink != "blind" && reverse == false) {
|
||||
translate([0,0,-adj]) cylinder(d=holesize, h=height+(adj*2));
|
||||
}
|
||||
if(sink != "blind" && reverse == true) {
|
||||
translate([0,0,-adj-height]) cylinder(d=holesize, h=height+(adj*2));
|
||||
}
|
||||
// countersink hole
|
||||
if(sink == "countersunk" && reverse == false) {
|
||||
translate([0,0,-adj]) cylinder(d1=6.5, d2=holesize, h=3.25);
|
||||
}
|
||||
if(sink == "countersunk" && reverse == true) {
|
||||
translate([0,0,+adj-2.5]) cylinder(d1=holesize, d2=6.5, h=3.25);
|
||||
}
|
||||
// recessed hole
|
||||
if(sink == "recessed" && reverse == false) {
|
||||
translate([0,0,-adj]) cylinder(d=6.5, h=supportheight-2);
|
||||
}
|
||||
if(sink == "recessed" && reverse == true) {
|
||||
translate([0,0,+adj-supportheight+2]) cylinder(d=6.5, h=supportheight-2);
|
||||
}
|
||||
// nut holder
|
||||
if(sink == "nut holder" && reverse == false) {
|
||||
translate([0,0,-adj]) cylinder(r=3.3,h=3,$fn=6);
|
||||
}
|
||||
if(sink == "nut holder" && reverse == true) {
|
||||
translate([0,0,+adj-3]) cylinder(r=3.3,h=3,$fn=6);
|
||||
}
|
||||
// blind hole
|
||||
if(sink == "blind" && reverse == false) {
|
||||
translate([0,0,2]) cylinder(d=holesize, h=height);
|
||||
}
|
||||
if(sink == "blind" && reverse == true) {
|
||||
translate([0,0,-height-2-adj]) cylinder(d=holesize, h=height);
|
||||
}
|
||||
if(insert_e == true && reverse == false) {
|
||||
translate([0,0,height-i_depth]) cylinder(d=i_dia, h=i_depth+adj);
|
||||
}
|
||||
if(insert_e == true && reverse == true) {
|
||||
translate([0,0,-height-adj]) cylinder(d=i_dia, h=i_depth+adj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -362,8 +362,6 @@ module case_bottom(case_design) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// extended standoff holes
|
||||
if(ext_bottom_standoffs == true) {
|
||||
// right-rear standoff
|
||||
@@ -396,6 +394,15 @@ module case_bottom(case_design) {
|
||||
cylinder(d=6.5, h=bottom_height);
|
||||
}
|
||||
}
|
||||
// bottom cover pattern
|
||||
if(bottom_cover_pattern != "solid") {
|
||||
if(bottom_cover_pattern == "hex_5mm") {
|
||||
translate([1,0,-2]) vent_hex((width)/3.75,(depth)/6,floorthick+4,5,1.5,"horizontal");
|
||||
}
|
||||
if(bottom_cover_pattern == "hex_8mm") {
|
||||
translate([1,2,-2]) vent_hex((width)/5.5,(depth)/9.5,floorthick+4,8,1.5,"horizontal");
|
||||
}
|
||||
}
|
||||
}
|
||||
// pcb standoffs
|
||||
if(sbc_bottom_standoffs == true) {
|
||||
@@ -536,7 +543,6 @@ module case_bottom(case_design) {
|
||||
(pcb_loc_x <= 10 && depth-(pcb_loc_y+pcb_depth) >= 10) ||
|
||||
(pcb_loc_x >= 10 && depth-(pcb_loc_y+pcb_depth) <= 10)) &&
|
||||
ext_bottom_front_left_enable == true) {
|
||||
echo(ext_bottom_front_left_enable);
|
||||
normal_standoff = [ext_bottom_standoff[0],
|
||||
bottom_height+pcb_loc_z+ext_bottom_front_left_adjust,
|
||||
ext_bottom_standoff[2],
|
||||
@@ -657,6 +663,10 @@ echo(ext_bottom_front_left_enable);
|
||||
}
|
||||
}
|
||||
}
|
||||
// ui access port
|
||||
if(bottom_access_port_enable == true) {
|
||||
// translate([access_port_location[0],access_port_location[1], floorthick+.12])
|
||||
}
|
||||
// sbc openings
|
||||
if(sbc_highlight == true) {
|
||||
#translate([pcb_loc_x ,pcb_loc_y,bottom_height-pcb_z+pcb_loc_z-adj])
|
||||
|
||||
@@ -329,6 +329,22 @@ module case_top(case_design) {
|
||||
cylinder(d=6.5, h=top_height+1);
|
||||
}
|
||||
}
|
||||
// top cover pattern
|
||||
if(top_cover_pattern != "solid") {
|
||||
if(top_cover_pattern == "hex_5mm") {
|
||||
translate([1,0,case_z-2]) vent_hex((width)/3.75,(depth)/6,floorthick+4,5,1.5,"horizontal");
|
||||
}
|
||||
if(top_cover_pattern == "hex_8mm") {
|
||||
translate([1,2,case_z-2]) vent_hex((width)/5.5,(depth)/9.5,floorthick+4,8,1.5,"horizontal");
|
||||
}
|
||||
if(top_cover_pattern == "astroid") {
|
||||
for(c=[3:12:depth-8]) {
|
||||
for(r=[4:12:width-8]) {
|
||||
translate([r,c,case_z-4]) linear_extrude(floorthick+5) import("./dxf/astroid_8mm.dxf");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// pcb standoffs
|
||||
|
||||
|
||||
@@ -228,9 +228,9 @@ flat_blank_section = false;
|
||||
|
||||
/* [Features and Accessories] */
|
||||
// top cover pattern
|
||||
top_cover_pattern = "solid"; //[solid,hex_5mm,hex_8mm,embedded,Apollonian]
|
||||
top_cover_pattern = "solid"; //[solid,hex_5mm,hex_8mm,deltoid,astroid,apollonian]
|
||||
// bottom cover pattern
|
||||
bottom_cover_pattern = "solid"; //[solid,hex_5mm,hex_8mm,embedded,Apollonian]
|
||||
bottom_cover_pattern = "solid"; //[solid,hex_5mm,hex_8mm,deltoid,astroid,apollonian]
|
||||
bottom_access_port_enable = false;
|
||||
access_port_size = [30,70]; //[10:.01:120]
|
||||
access_port_orientation = "landscape"; //[landscape,portrait]
|
||||
|
||||
Reference in New Issue
Block a user