Compare commits
218 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e73d4550f | ||
|
|
821deb2445 | ||
|
|
e6cb0b3b8c | ||
|
|
045aa2874a | ||
|
|
74084eebde | ||
|
|
0807d49dbb | ||
|
|
42593fa92f | ||
|
|
2eef11f03f | ||
|
|
125ec3a477 | ||
|
|
50f71b69e3 | ||
|
|
f56302f7a8 | ||
|
|
5c7f917b9f | ||
|
|
3277cc8d07 | ||
|
|
4f7aa53050 | ||
|
|
dc12d7f6a1 | ||
|
|
8e89257759 | ||
|
|
40e8e6bfff | ||
|
|
f5130023f0 | ||
|
|
6a855e1ef6 | ||
|
|
de063b31f8 | ||
|
|
88691a6b61 | ||
|
|
8a0e9f17a0 | ||
|
|
f71bc2e2d0 | ||
|
|
0fb0f4daef | ||
|
|
8bf424b99b | ||
|
|
2dc8e16f1e | ||
|
|
e7b85fa217 | ||
|
|
9e8fe8006f | ||
|
|
c1aa6bb353 | ||
|
|
e46ac774e4 | ||
|
|
d5d23fba18 | ||
|
|
2c61849665 | ||
|
|
0b99ea5805 | ||
|
|
2b430275cb | ||
|
|
b6eb06f97c | ||
|
|
7b03aa1922 | ||
|
|
fd688d53c3 | ||
|
|
543162c61c | ||
|
|
506d29f34e | ||
|
|
8c0e333450 | ||
|
|
7b9a18279d | ||
|
|
a288a924d5 | ||
|
|
6262684252 | ||
|
|
7559d48140 | ||
|
|
5c43d0961d | ||
|
|
0d5f8ef357 | ||
|
|
1b549ac761 | ||
|
|
5514029edc | ||
|
|
90a15ea4c9 | ||
|
|
66aeb943c6 | ||
|
|
2697bc7648 | ||
|
|
5fde770566 | ||
|
|
b336115556 | ||
|
|
3eaaf6f03c | ||
|
|
56b392b082 | ||
|
|
4a58ab823e | ||
|
|
ebcafd0f05 | ||
|
|
e5b9e8263c | ||
|
|
a33450ac21 | ||
|
|
b866bd73db | ||
|
|
e968bbe384 | ||
|
|
d084cab29f | ||
|
|
adf72494a1 | ||
|
|
d5674f9f24 | ||
|
|
390df175b3 | ||
|
|
0c96b1247a | ||
|
|
7cec418b69 | ||
|
|
59b894d738 | ||
|
|
2e7cd76f20 | ||
|
|
7eab4fe790 | ||
|
|
501da93cad | ||
|
|
c83301debf | ||
|
|
c2d7cc3352 | ||
|
|
20ab01b924 | ||
|
|
0770c17468 | ||
|
|
3a1ba0f811 | ||
|
|
572293170d | ||
|
|
b59f99c0b6 | ||
|
|
a6795b3383 | ||
|
|
00648a52e9 | ||
|
|
f24d3e918b | ||
|
|
b4189a6cee | ||
|
|
6aa68c568e | ||
|
|
efed91db76 | ||
|
|
30d709a00e | ||
|
|
bb5fb69cab | ||
|
|
f7d06bb311 | ||
|
|
2aad1fef87 | ||
|
|
adf4101e3c | ||
|
|
fa1d426130 | ||
|
|
3af7520d67 | ||
|
|
d5f718ca59 | ||
|
|
236be28bdd | ||
|
|
6ef186018f | ||
|
|
bf7377efbb | ||
|
|
addb512b7f | ||
|
|
6cb1ad2e5d | ||
|
|
eb01bb2829 | ||
|
|
8b11dea464 | ||
|
|
489e953d09 | ||
|
|
dca4858007 | ||
|
|
4b24af0f4b | ||
|
|
33e9c04da1 | ||
|
|
c0da9dc727 | ||
|
|
36e6538090 | ||
|
|
8d1d9bdaf0 | ||
|
|
17e4e9dd97 | ||
|
|
44a0697e2b | ||
|
|
a068940140 | ||
|
|
e109837ae7 | ||
|
|
51f453be04 | ||
|
|
c23033d819 | ||
|
|
c29341d1d6 | ||
|
|
61446a322f | ||
|
|
949af488aa | ||
|
|
d565be1614 | ||
|
|
000724340b | ||
|
|
79985241c0 | ||
|
|
d070e829f0 | ||
|
|
e9b5d5508e | ||
|
|
c330f3fcad | ||
|
|
610a432a86 | ||
|
|
7806e8d578 | ||
|
|
6c46501c69 | ||
|
|
7fbb5d5f12 | ||
|
|
2f32d3c3b5 | ||
|
|
2ed95c20d1 | ||
|
|
788c6568ed | ||
|
|
dd2162b480 | ||
|
|
934f88523a | ||
|
|
98b8baa08d | ||
|
|
1d2826d015 | ||
|
|
2ccca31882 | ||
|
|
3a757b95a4 | ||
|
|
d59191109e | ||
|
|
1cbc923d2c | ||
|
|
b0a82b3519 | ||
|
|
4ab67184aa | ||
|
|
98c3f02294 | ||
|
|
cfab47dd60 | ||
|
|
5f775d3f39 | ||
|
|
06516ff821 | ||
|
|
6e5842f8a8 | ||
|
|
e7fb885769 | ||
|
|
5fa96e3e32 | ||
|
|
af5bb195d5 | ||
|
|
fb0ee1f361 | ||
|
|
e0ae29f0fb | ||
|
|
33bace995f | ||
|
|
138171c638 | ||
|
|
9ca1c2d425 | ||
|
|
7051bf871d | ||
|
|
861c2231fc | ||
|
|
ac3d1b7993 | ||
|
|
a2fbf8d17b | ||
|
|
97f1c4c26e | ||
|
|
8b7092c859 | ||
|
|
363c9698d1 | ||
|
|
d0cd8f6c99 | ||
|
|
f0c5106801 | ||
|
|
a2e78bd4da | ||
|
|
057145e7e8 | ||
|
|
71702e2435 | ||
|
|
fb41a52214 | ||
|
|
d3b19d09ba | ||
|
|
1f154229c2 | ||
|
|
76fb895b64 | ||
|
|
73e70ccf6f | ||
|
|
acc6ef9d9a | ||
|
|
f589cc70c1 | ||
|
|
9238ca6d8c | ||
|
|
3357afbf86 | ||
|
|
3226156e13 | ||
|
|
0c7e482576 | ||
|
|
6c00bb37b4 | ||
|
|
63161e5145 | ||
|
|
c573e3e9f7 | ||
|
|
9fd72e357c | ||
|
|
3b0465bc73 | ||
|
|
7ae702fc6e | ||
|
|
884261a56c | ||
|
|
edfe3a4056 | ||
|
|
c607f1e094 | ||
|
|
bcda274cb4 | ||
|
|
dd71020fc6 | ||
|
|
1aa242375a | ||
|
|
7f09be5e0b | ||
|
|
34acbbd295 | ||
|
|
a49bb6473a | ||
|
|
f658b458ef | ||
|
|
2d5d3a7c31 | ||
|
|
82c1d908b6 | ||
|
|
51b6e7d141 | ||
|
|
a67c0ea64c | ||
|
|
44bf215ff6 | ||
|
|
3eb91c0b39 | ||
|
|
2e9f05f8bd | ||
|
|
3c8abbdcd8 | ||
|
|
0792cb7981 | ||
|
|
7307a131eb | ||
|
|
18ac05627d | ||
|
|
ba574aba8a | ||
|
|
f4c9078d85 | ||
|
|
ba027dbae4 | ||
|
|
b47cf5d845 | ||
|
|
03c60b8d1f | ||
|
|
6430829c9d | ||
|
|
5858340e51 | ||
|
|
11337b6a71 | ||
|
|
fa8c94c6e7 | ||
|
|
f4c2f765a1 | ||
|
|
086ff0766c | ||
|
|
e621df86af | ||
|
|
625050370f | ||
|
|
551c4736db | ||
|
|
97936f16a2 | ||
|
|
f80f4e9516 | ||
|
|
260752a32d |
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[submodule "SBC_Model_Framework"]
|
||||
path = SBC_Model_Framework
|
||||
url = https://github.com/hominoids/SBC_Model_Framework.git
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 3.8 MiB |
1
SBC_Model_Framework
Submodule
1
SBC_Model_Framework
Submodule
Submodule SBC_Model_Framework added at a81d9cf373
24632
dxf/astroid_8mm.dxf
Normal file
24632
dxf/astroid_8mm.dxf
Normal file
File diff suppressed because it is too large
Load Diff
17
get_customizer_values.scad
Normal file
17
get_customizer_values.scad
Normal file
@@ -0,0 +1,17 @@
|
||||
// Gets a list of SBCs from the SBC Model Framework and Accessory sets
|
||||
// for use with SBC Case Builder.
|
||||
// After running this script, copy the output from the first Echo command into the
|
||||
// list of SBC boards in `sbc_case_builder.scad:32`
|
||||
// Also copy the output from the second Echo command into the list of case acceessory
|
||||
// sets in `sbc_case_builder.scad:196`
|
||||
|
||||
include <./SBC_Model_Framework/sbc_models.cfg>;
|
||||
include <./sbc_case_builder_accessories.cfg>;
|
||||
|
||||
boards = [for(i=[0:1:len(sbc_data)-1]) sbc_data[i][0]];
|
||||
echo("Copy the following to `sbc_case_builder.scad` for the `sbc_model` variable");
|
||||
echo(boards);
|
||||
|
||||
accessory_sets = [for(i=[0:1:len(accessory_data)-1]) accessory_data[i][0]];
|
||||
echo("Copy the following to `sbc_case_builder.scad` for the `accessory_name` variable");
|
||||
echo(accessory_sets);
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
170
lib/access_panel.scad
Normal file
170
lib/access_panel.scad
Normal file
@@ -0,0 +1,170 @@
|
||||
/*
|
||||
This file is part of SBC Case Builder https://github.com/hominoids/SBC_Case_Builder
|
||||
Copyright 2022,2023,2024 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
access_cover(size, orientation)
|
||||
access_panel(size, orientation, mask)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
NAME: access_cover
|
||||
DESCRIPTION: creates covers for access port openings
|
||||
TODO: none
|
||||
|
||||
USAGE: access_panel(size[], orientation)
|
||||
|
||||
size[0] = size_x
|
||||
size[1] = size_y
|
||||
size[2] = floor thickness
|
||||
orientation = "landscape", "portrait"
|
||||
*/
|
||||
|
||||
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_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_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_x/2)+.25, size_y-6.5, -floorthick-adj])
|
||||
cylinder(d=3.2, h=(floorthick*2)+(adj*2));
|
||||
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_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_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_x-6.5, (size_y/2)-.75, -floorthick-adj])
|
||||
cylinder(d=3.2, h=(floorthick*2)+(adj*2));
|
||||
translate([size_x-6.5, (size_y/2)-.75, -adj])
|
||||
cylinder(d1=6, d2=3.2, h=floorthick);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: access_panel
|
||||
DESCRIPTION: creates opening and structure for access openings
|
||||
TODO: none
|
||||
|
||||
USAGE: access_panel(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_panel(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(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-1, size_y, mlength]);
|
||||
}
|
||||
}
|
||||
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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
59
lib/art.scad
Normal file
59
lib/art.scad
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
This file is part of SBC Case Builder https://github.com/hominoids/SBC_Case_Builder
|
||||
Copyright 2022,2023,2024 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
art(scale_d1, size_z, filename)
|
||||
stl_model(scale_d1, filename)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
NAME: art
|
||||
DESCRIPTION: create 2d artwork using dxf or svf
|
||||
TODO: none
|
||||
|
||||
USAGE: art(scale_d1, size_z, filename)
|
||||
|
||||
scale_d1 = amount to scale file
|
||||
size_z = floor thickness
|
||||
filename = file name
|
||||
|
||||
*/
|
||||
|
||||
module art(scale_d1, size_z, filename) {
|
||||
|
||||
linear_extrude(height = size_z) import(file = filename, scale=scale_d1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: stl_model
|
||||
DESCRIPTION: import 3d artwork using stl
|
||||
TODO: none
|
||||
|
||||
USAGE: stl_model(scale_d1, filename)
|
||||
|
||||
scale_d1 = amount to scale file
|
||||
filename = file name
|
||||
*/
|
||||
|
||||
module stl_model(scale_d1, filename) {
|
||||
|
||||
import(file = filename, scale=scale_d1);
|
||||
|
||||
}
|
||||
132
lib/batteries.scad
Normal file
132
lib/batteries.scad
Normal file
@@ -0,0 +1,132 @@
|
||||
/*
|
||||
This file is part of SBC Case Builder https://github.com/hominoids/SBC_Case_Builder
|
||||
Copyright 2022,2023,2024 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
battery(type)
|
||||
battery_clip(bat_dia = 18.4)
|
||||
batt_holder(tolerance)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
NAME: battery
|
||||
DESCRIPTION: creates 18650 and 21700 batteries
|
||||
TODO: none
|
||||
|
||||
USAGE: battery(type)
|
||||
|
||||
type = "18650", "18650_convex", "21700"
|
||||
*/
|
||||
|
||||
module battery(type) {
|
||||
|
||||
adj = .01;
|
||||
|
||||
if(type == "18650") {
|
||||
difference() {
|
||||
color("#73bc73") cylinder(d=18.4, h=65);
|
||||
translate([0,0,65-4]) difference() {
|
||||
cylinder(d=18.5, h=2);
|
||||
cylinder(d=17.5, h=3);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(type == "18650_convex") {
|
||||
difference() {
|
||||
color("#73bc73") cylinder(d=18.4, h=68);
|
||||
translate([0,0,65-4]) difference() {
|
||||
color("#73bc73") cylinder(d=18.5, h=2);
|
||||
color("#73bc73") cylinder(d=17.5, h=3);
|
||||
}
|
||||
translate([0,0,65-adj]) difference() {
|
||||
color("silver") cylinder(d=18.5, h=3+2*adj);
|
||||
color("silver") cylinder(d=14.4, h=3+2*adj);
|
||||
}
|
||||
color("silver") translate([0,0,68-adj]) cylinder(d=14.4, h=.1);
|
||||
}
|
||||
}
|
||||
if(type == "21700") {
|
||||
difference() {
|
||||
color("#73bc73") cylinder(d=21, h=70);
|
||||
translate([0,0,70-4]) difference() {
|
||||
cylinder(d=21.1, h=2);
|
||||
cylinder(d=20.1, h=3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: battery_clip
|
||||
DESCRIPTION: creates 18650 and 21700 batteries
|
||||
TODO: none
|
||||
|
||||
USAGE: battery_clip(bat_dia = 18.4)
|
||||
*/
|
||||
|
||||
module battery_clip(bat_dia = 18.4) {
|
||||
|
||||
mat = .38;
|
||||
width = 9.5;
|
||||
tab = 8.9;
|
||||
bat_holder = bat_dia+2*mat;
|
||||
adj = .1;
|
||||
|
||||
translate([-5.5,0,10.5]) {
|
||||
difference() {
|
||||
translate([0,width,0]) rotate([90,0,0]) cylinder(d=bat_holder, h=9.5);
|
||||
translate([0,width+adj,0]) rotate([90,0,0]) cylinder(d=bat_dia, h=10.5);
|
||||
translate([mat/2-11.1/2,-adj,mat-1.3-bat_dia/2]) cube([11.1-mat,width+2*adj,3]);
|
||||
translate([0,width+adj,0]) rotate([90,-45,0]) cube([bat_dia,bat_dia,bat_holder]);
|
||||
}
|
||||
difference() {
|
||||
translate([-11.1/2,0,-1.3-bat_dia/2]) cube([11.1,width,3]);
|
||||
translate([mat-11.1/2,-adj,mat/2-1.3-bat_dia/2]) cube([11.1-2*mat,width+2*adj,3]);
|
||||
}
|
||||
difference() {
|
||||
translate([-(tab/2),-3.5,-1-bat_dia/2]) rotate([-5,0,0]) cube([tab,3.5,10]);
|
||||
translate([-(tab/2)-adj,-3.5+mat,mat-1-bat_dia/2]) rotate([-5,0,0]) cube([tab+2*adj,3.5+mat,10]);
|
||||
}
|
||||
translate([0,-2.225,0]) rotate([85,0,0]) cylinder(d=tab, h=mat);
|
||||
difference() {
|
||||
translate([0,-2.75,0]) sphere(d=3);
|
||||
translate([-5,-2.75,-5]) rotate([85,0,0]) cube([tab,10,10]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: battery_holder
|
||||
DESCRIPTION: creates cr2032 friction fit coinstyle holder
|
||||
TODO: none
|
||||
|
||||
USAGE: batt_holder(tolerance)
|
||||
*/
|
||||
|
||||
module batt_holder(tolerance) {
|
||||
|
||||
$fn = 90;
|
||||
difference () {
|
||||
cylinder(d=25.5,h=6);
|
||||
translate ([0,0,-1]) cylinder(d=20.4+tolerance,h=8);
|
||||
cube([14,26,13], true);
|
||||
}
|
||||
cylinder(r=12.75, h=2);
|
||||
}
|
||||
|
||||
206
lib/buttons.scad
Normal file
206
lib/buttons.scad
Normal file
@@ -0,0 +1,206 @@
|
||||
/*
|
||||
This file is part of SBC Case Builder https://github.com/hominoids/SBC_Case_Builder
|
||||
Copyright 2022,2023,2024 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
buttons(style, diameter, height, mask)
|
||||
button_assembly(style, diameter, height)
|
||||
button_clip(style)
|
||||
button_plunger(style, diameter, height)
|
||||
button_top(style, diameter, height)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
NAME: buttons
|
||||
DESCRIPTION: creates different button bodys and styles
|
||||
TODO: none
|
||||
|
||||
USAGE: buttons(style, size, radius, post, mask)
|
||||
|
||||
style = "recess", "cutout"
|
||||
size[0] = diameter of button body
|
||||
size[2] = height above button
|
||||
radius = radius for cutout style
|
||||
post = button post size for cutout style
|
||||
mask[0] = true enables component mask
|
||||
mask[1] = mask length
|
||||
mask[2] = mask setback
|
||||
mask[3] = mstyle "default"
|
||||
*/
|
||||
|
||||
module buttons(style, size, radius, post, mask) {
|
||||
|
||||
size_x = size[0];
|
||||
size_y = size[1];
|
||||
size_z = size[2];
|
||||
diameter = size[0];
|
||||
height = size[2];
|
||||
gap = 1.5;
|
||||
enablemask = mask[0];
|
||||
mlength = mask[1];
|
||||
msetback = mask[2];
|
||||
mstyle = mask[3];
|
||||
|
||||
adj = .01;
|
||||
$fn = 90;
|
||||
|
||||
if(enablemask == true && mstyle == "default") {
|
||||
if(style == "recess") {
|
||||
translate([0, 0, -adj-msetback]) cylinder(d = diameter-2*adj, h = mlength);
|
||||
}
|
||||
if(style == "cutout") {
|
||||
translate([-size[0]+2.5, -2.5-size[1]/2, -adj-msetback]) cube([size[0]+1, size[1]+5, mlength]);
|
||||
}
|
||||
}
|
||||
if(enablemask == false) {
|
||||
if(style == "recess") {
|
||||
difference() {
|
||||
union() {
|
||||
sphere(d=diameter);
|
||||
translate([0,0,-height+3]) cylinder(d=6, h=height-6);
|
||||
}
|
||||
translate([-(diameter/2)-1,-(diameter/2)-1,0]) cube([diameter+2,diameter+2,(diameter/2)+2]);
|
||||
difference() {
|
||||
union() {
|
||||
sphere(d=diameter-2);
|
||||
}
|
||||
}
|
||||
translate([-1.75, -1.25, -height-1]) cube([3.5, 2.5, height+2]);
|
||||
translate([0,0,-(diameter/2)]) cylinder(d=5, h=2);
|
||||
}
|
||||
}
|
||||
if(style == "cutout") {
|
||||
difference() {
|
||||
translate([-size[0]+2, -3-size[1]/2, 0]) slab_r([size[0]+2,size[1]+6,size[2]-2*adj], [.1,.1,.1,.1]);
|
||||
difference() {
|
||||
translate([-size[0]+3, -size[1]/2, -adj])
|
||||
slab_r([size[0],size[1],size[2]], [radius[0],radius[1],radius[2],radius[3]]);
|
||||
translate([-size[0]+3+(gap/2), -size[1]/2+(gap/2), -1]) slab_r([size[0]-gap,size[1]-gap,1+size[2]+2*adj],
|
||||
[radius[0],radius[1],radius[2]-gap/2,radius[3]-gap/2]);
|
||||
translate([3-size[0]-gap, -1, -1]) cube([gap*2, 2, 1+height+2*adj]);
|
||||
}
|
||||
translate([0, 0, 2]) sphere(d=3);
|
||||
}
|
||||
translate([0, 0, adj-post]) cylinder(d=3, h=post);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: button_assembly
|
||||
DESCRIPTION: creates button assembly of plunger,top,clip
|
||||
TODO: none
|
||||
|
||||
USAGE: button_assembly(style, diameter, height)
|
||||
|
||||
style = "recess", "cutout"
|
||||
diameter = diameter of button body
|
||||
height = height above button
|
||||
*/
|
||||
|
||||
module button_assembly(style, diameter, height) {
|
||||
|
||||
adj = .01;
|
||||
$fn = 90;
|
||||
|
||||
if(style == "recess") {
|
||||
button_plunger(style, diameter, height);
|
||||
button_top(style, diameter, height);
|
||||
translate([0,0,-height]) button_clip(style);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: button_clip
|
||||
DESCRIPTION: creates button c-clip
|
||||
TODO: none
|
||||
|
||||
USAGE: button_clip(style)
|
||||
|
||||
style = "recess", "cutout"
|
||||
*/
|
||||
|
||||
module button_clip(style) {
|
||||
|
||||
adj = .01;
|
||||
$fn = 90;
|
||||
|
||||
if(style == "recess") {
|
||||
difference() {
|
||||
cylinder(d=8.5, h=.8);
|
||||
translate([-1.5,-1.75,-adj]) cube([2.75,3.5,1]);
|
||||
translate([-.75,-.75,-adj]) cube([5,1.25,1.25]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: button_plunger
|
||||
DESCRIPTION: creates button plunger
|
||||
TODO: none
|
||||
|
||||
USAGE: button_plunger(style, diameter, height)
|
||||
|
||||
style = "recess", "cutout"
|
||||
diameter = diameter of button body
|
||||
height = height above button
|
||||
*/
|
||||
|
||||
module button_plunger(style, diameter, height) {
|
||||
|
||||
adj = .01;
|
||||
$fn = 90;
|
||||
|
||||
if(style == "recess") {
|
||||
difference() {
|
||||
translate([-1.5,-1,-(height)-2]) cube([3,2,height+1]);
|
||||
translate([-1.5-adj,-1.5,-height]) cube([.5,3,1]);
|
||||
translate([1+adj,-1.5,-height]) cube([.5,3,1]);
|
||||
translate([-1.5-adj,-1.5,-4]) cube([.5,3,4]);
|
||||
translate([1+adj,-1.5,-4]) cube([.5,3,4]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: button_top
|
||||
DESCRIPTION: creates button top
|
||||
TODO: none
|
||||
|
||||
USAGE: button_top(style, diameter, height)
|
||||
|
||||
style = "recess", "cutout"
|
||||
diameter = diameter of button body
|
||||
height = height above button
|
||||
*/
|
||||
|
||||
module button_top(style, diameter, height) {
|
||||
|
||||
adj = .01;
|
||||
$fn = 90;
|
||||
|
||||
if(style == "recess") {
|
||||
difference() {
|
||||
translate([0,0,-3]) cylinder(d=5, h=2.75);
|
||||
translate([-1.25,-1.25,-3-adj]) cube([2.5,2.5,2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
43
lib/cable_holder.scad
Normal file
43
lib/cable_holder.scad
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
This file is part of SBC Case Builder https://github.com/hominoids/SBC_Case_Builder
|
||||
Copyright 2022,2023,2024 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
cableholder_spacer()
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
NAME: cableholder_spacer
|
||||
DESCRIPTION: creates spacer and cable holder for drive mounts
|
||||
TODO: none
|
||||
|
||||
USAGE: cableholder_spacer()
|
||||
|
||||
*/
|
||||
|
||||
module cableholder_spacer() {
|
||||
|
||||
size = [9.4,16,6];
|
||||
$fn = 90;
|
||||
translate([0,size[2]/2,-5]) rotate([90,0,0])
|
||||
difference() {
|
||||
translate([size[0]/2,size[0]/2,0]) rotate([0,0,90]) slot(size[0],size[1],size[2]);
|
||||
translate([-1,5,3]) rotate([0,90,0]) cylinder(d=3.2, h=12);
|
||||
translate([-1,7.5,-1]) cube([2,20,9]);
|
||||
translate([5,9.5,-1]) rotate([0,0,90]) slot(4.5,11,9);
|
||||
translate([3,20,-1]) rotate([0,0,45]) cube([2,6,9]);
|
||||
}
|
||||
}
|
||||
138
lib/custom.scad
Normal file
138
lib/custom.scad
Normal file
@@ -0,0 +1,138 @@
|
||||
/*
|
||||
This file is part of SBC Case Builder https://github.com/hominoids/SBC_Case_Builder
|
||||
Copyright 2022,2023,2024 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
hk_h3_port_extender(style, mask)
|
||||
hk_h3_port_extender_holder(part, offset)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
NAME: hk_h3_port_extender
|
||||
DESCRIPTION: @mctom's odroid-h3 gpio port extender
|
||||
TODO: none
|
||||
|
||||
USAGE: hk_h3_port_extender(style, mask)
|
||||
|
||||
style = "header", "remote"
|
||||
mask[0] = true enables component mask
|
||||
mask[1] = mask length
|
||||
mask[2] = mask setback
|
||||
mask[3] = mstyle "default"
|
||||
*/
|
||||
|
||||
module hk_h3_port_extender(style, mask) {
|
||||
|
||||
enablemask = mask[0];
|
||||
mlength = mask[1];
|
||||
msetback = mask[2];
|
||||
mstyle = mask[3];
|
||||
|
||||
adj=.01;
|
||||
$fn = 90;
|
||||
|
||||
if(style == "header") {
|
||||
if(enablemask == true && mstyle == "default") {
|
||||
translate([0, 14.5, 12-msetback]) cube([7.75, 15.75, mlength]);
|
||||
translate([9.5, 14.5, 12-msetback]) cube([7.75, 15.75, mlength]);
|
||||
translate([19, 14.5, 12-msetback]) cube([7.75, 15.75, mlength]);
|
||||
translate([16, 32.2, 12-msetback]) cylinder(d=3, h=12);
|
||||
}
|
||||
if(enablemask == false) {
|
||||
// gpio 24 pin front position
|
||||
header("angled", -1.75, .1, 0, "top", 0, [12,2,8], ["thruhole","black","female",2.54,"silver"],
|
||||
1.6, false, [true,10,2,"default"]);
|
||||
difference() {
|
||||
color("#008066") slab([33,35.25,1.6], .25);
|
||||
color("#008066") translate([15.95,4.6,-1]) cylinder(d=3, h=6);
|
||||
color("#008066") translate([15.95,32.15,-1]) cylinder(d=3, h=6);
|
||||
}
|
||||
header("angled", 27.65, 29.6, 0, "bottom", 90, [2,2,6], ["thruhole","black","male",2.54,"silver"],
|
||||
1.6, false, [true,10,2,"default"]);
|
||||
header("angled", 30.5, 16.5, 0, "bottom", 90, [5,2,6], ["thruhole","black","male",2.54,"silver"],
|
||||
1.6, false, [true,10,2,"default"]);
|
||||
usb2("single_up_a", .925, 15.375, 0, "top", 180, [0,10.5,0], [0], 1.6, false, [true,10,2,"default"]);
|
||||
usb2("single_up_a", 10.395, 15.375, 0, "top", 180, [0,10.5,0], [0], 1.6, false, [true,10,2,"default"]);
|
||||
usb2("single_up_a", 19.925, 15.375, 0, "top", 180, [0,10.5,0], [0], 1.6, false, [true,10,2,"default"]);
|
||||
}
|
||||
}
|
||||
if(style == "remote") {
|
||||
if(enablemask == true && mstyle == "default") {
|
||||
translate([0, 14.5, 12-msetback]) cube([7.75, 15.75, mlength]);
|
||||
translate([9.5, 14.5, 12-msetback]) cube([7.75, 15.75, mlength]);
|
||||
translate([19, 14.5, 12-msetback]) cube([7.75, 15.75, mlength]);
|
||||
translate([16, 32.2, 12-msetback]) cylinder(d=3, h=12);
|
||||
translate([16, 4.6, 12-msetback]) cylinder(d=3, h=mlength);
|
||||
}
|
||||
if(enablemask == false) {
|
||||
difference() {
|
||||
color("#008066") slab([33,35.25,1.6], .25);
|
||||
color("#008066") translate([15.95,4.6,-1]) cylinder(d=3, h=6);
|
||||
color("#008066") translate([15.95,32.15,-1]) cylinder(d=3, h=6);
|
||||
}
|
||||
// gpio 24 pin front position
|
||||
header("open", .75, 9, 0, "bottom", 0, [12,2,6], ["thruhole","black","male",2.54,"silver"],
|
||||
1.6, false, [true,10,2,"default"]);
|
||||
header("angled", 27.65, 29.6, 0, "bottom", 90, [2,2,6], ["thruhole","black","male",2.54,"silver"],
|
||||
1.6, false, [true,10,2,"default"]);
|
||||
header("angled", 30.5, 16.5, 0, "bottom", 90, [5,2,6], ["thruhole","black","male",2.54,"silver"],
|
||||
1.6, false, [true,10,2,"default"]);
|
||||
usb2("single_up_a", .925, 15.375, 0, "top", 180, [0,10.5,0], [0], 1.6, false, [true,10,2,"default"]);
|
||||
usb2("single_up_a", 10.395, 15.375, 0, "top", 180, [0,10.5,0], [0], 1.6, false, [true,10,2,"default"]);
|
||||
usb2("single_up_a", 19.925, 15.375, 0, "top", 180, [0,10.5,0], [0], 1.6, false, [true,10,2,"default"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: hk_h3_port_extender_holder
|
||||
DESCRIPTION: holder for the @mctom's remote h3 port extender
|
||||
TODO: none
|
||||
|
||||
USAGE: hk_h3_port_extender_holder(part, offset)
|
||||
|
||||
part = "top","bottom","both"
|
||||
offset = distance from mount face
|
||||
*/
|
||||
|
||||
module hk_h3_port_extender_holder(part,offset=2) {
|
||||
|
||||
size = [16-offset,40,5.5];
|
||||
adj = .01;
|
||||
|
||||
if(part == "bottom" || part == "both") {
|
||||
difference() {
|
||||
translate([-10+offset,-3.5,2]) cube(size);
|
||||
translate([-.25,-.25,-adj]) cube([2.5, 33.25, 12]);
|
||||
translate([2, 2, -adj]) cube([10, 28, 12]);
|
||||
translate([-12,(33.25/2)+.25,4.5]) rotate([0,90,0]) cylinder(d=2.7, h=20, $fn=60);
|
||||
// translate([-7,-1.,-adj]) cylinder(d=4.25, h=20);
|
||||
}
|
||||
}
|
||||
if(part == "top" || part == "both") {
|
||||
difference() {
|
||||
translate([-10+offset,-3.5,29.5]) cube(size);
|
||||
translate([-.25,-.25,28]) cube([2.5, 33.25, 12]);
|
||||
translate([1.5, 2, 27.5-adj]) cube([10, 28.5, 12]);
|
||||
translate([-12, -4, 28]) cube([20, 13, 10]);
|
||||
translate([1.35, 20, 25.5]) cube([10, 13, 5]);
|
||||
translate([-12,(33.25/2)+.25,32]) rotate([0,90,0]) cylinder(d=2.7, h=20, $fn=60);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
107
lib/dsub.scad
Normal file
107
lib/dsub.scad
Normal file
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
This file is part of SBC Case Builder https://github.com/hominoids/SBC_Case_Builder
|
||||
Copyright 2022,2023,2024 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
dsub(style, gender, mask)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
NAME: dsub
|
||||
DESCRIPTION: creates dsub connectors
|
||||
TODO: 9db male, 25db male and female
|
||||
|
||||
USAGE: dsub(style, gender, mask)
|
||||
|
||||
style = "db9"
|
||||
gender = "female","male"
|
||||
mask[0] = true enables component mask
|
||||
mask[1] = mask length
|
||||
mask[2] = mask setback
|
||||
mask[3] = mstyle "default"
|
||||
*/
|
||||
|
||||
module dsub(style, gender, mask) {
|
||||
|
||||
enablemask = mask[0];
|
||||
mlength = mask[1];
|
||||
msetback = mask[2];
|
||||
mstyle = mask[3];
|
||||
|
||||
adj = .01;
|
||||
$fn = 90;
|
||||
|
||||
if(enablemask == true && mstyle == "default") {
|
||||
translate([0,0,-msetback]) union() {
|
||||
hull() {
|
||||
translate([-7,3,-5]) cylinder(d=3, h=11+mlength);
|
||||
translate([7,3,-5]) cylinder(d=3, h=11+mlength);
|
||||
translate([-6.25,-3,-5]) cylinder(d=3, h=11+mlength);
|
||||
translate([6.25,-3,-5]) cylinder(d=3, h=11+mlength);
|
||||
}
|
||||
// mount holes
|
||||
translate([-12.5,0,-5]) cylinder(d=3.5, h=11+mlength);
|
||||
translate([12.5,0,-5]) cylinder(d=3.5, h=11+mlength);
|
||||
}
|
||||
}
|
||||
if(enablemask == false) {
|
||||
if(style == "db9" && gender =="female") {
|
||||
difference() {
|
||||
union() {
|
||||
color("silver") hull() {
|
||||
translate([-6.5,2.5,-5]) cylinder(d=3, h=11);
|
||||
translate([6.5,2.5,-5]) cylinder(d=3, h=11);
|
||||
translate([-5.75,-2.5,-5]) cylinder(d=3, h=11);
|
||||
translate([5.75,-2.5,-5]) cylinder(d=3, h=11);
|
||||
}
|
||||
color("black") hull() {
|
||||
translate([-6,2.25,-6]) cylinder(d=3, h=12.25);
|
||||
translate([6,2.25,-6]) cylinder(d=3, h=12.25);
|
||||
translate([-5.25,-2.25,-6]) cylinder(d=3, h=12.25);
|
||||
translate([5.25,-2.25,-6]) cylinder(d=3, h=12.25);
|
||||
}
|
||||
// mount plate
|
||||
translate([-15.5,-6.5,-.25]) slab([31,13,.5], 2);
|
||||
// rear pins
|
||||
color("silver") translate([-5.48,1.4,-8]) cylinder(d=1.5, h=9);
|
||||
color("silver") translate([-2.74,1.4,-8]) cylinder(d=1.5, h=9);
|
||||
color("silver") translate([0,1.4,-8]) cylinder(d=1.5, h=9);
|
||||
color("silver") translate([2.74,1.4,-8]) cylinder(d=1.5, h=9);
|
||||
color("silver") translate([5.48,1.4,-8]) cylinder(d=1.5, h=9);
|
||||
color("silver") translate([-4.12,-1.4,-8]) cylinder(d=1.5, h=9);
|
||||
color("silver") translate([-1.38,-1.4,-8]) cylinder(d=1.5, h=9);
|
||||
color("silver") translate([1.36,-1.4,-8]) cylinder(d=1.5, h=9);
|
||||
color("silver") translate([4,-1.4,-8]) cylinder(d=1.5, h=9);
|
||||
|
||||
}
|
||||
// mount holes
|
||||
color("silver") translate([-12.5,0,-3]) cylinder(d=3.2, h=6);
|
||||
color("silver") translate([12.5,0,-3]) cylinder(d=3.2, h=6);
|
||||
// pin holes
|
||||
color("silver") translate([-5.48,1.4,-9]) cylinder(d=1, h=16);
|
||||
color("silver") translate([-2.74,1.4,-9]) cylinder(d=1, h=16);
|
||||
color("silver") translate([0,1.4,-9]) cylinder(d=1, h=16);
|
||||
color("silver") translate([2.74,1.4,-9]) cylinder(d=1, h=16);
|
||||
color("silver") translate([5.48,1.4,-9]) cylinder(d=1, h=16);
|
||||
color("silver") translate([-4.12,-1.4,-9]) cylinder(d=1, h=16);
|
||||
color("silver") translate([-1.38,-1.4,-9]) cylinder(d=1, h=16);
|
||||
color("silver") translate([1.36,-1.4,-9]) cylinder(d=1, h=16);
|
||||
color("silver") translate([4,-1.4,-9]) cylinder(d=1, h=16);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
377
lib/fans.scad
Normal file
377
lib/fans.scad
Normal file
@@ -0,0 +1,377 @@
|
||||
/*
|
||||
This file is part of SBC Case Builder https://github.com/hominoids/SBC_Case_Builder
|
||||
Copyright 2022,2023,2024 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
fans(style, mask)
|
||||
fan_cover(size, thick)
|
||||
fan_mask(size, thick, style)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
NAME: fans
|
||||
DESCRIPTION: creates different fan styles and sizes
|
||||
TODO: add efficient vanes
|
||||
|
||||
USAGE: fans(style, mask)
|
||||
|
||||
style = "box",
|
||||
mask[0] = true enables component mask
|
||||
mask[1] = mask length
|
||||
mask[2] = mask setback
|
||||
mask[3] = mstyle "default", "fan_open", "fan_1", "fan_2", "fan_hex"
|
||||
*/
|
||||
|
||||
module fans(style, mask) {
|
||||
|
||||
// size, thick, hole-spacing, hole-size, hub-size
|
||||
fan_data = [
|
||||
["box140x25", 140, 25, 124.5, 4.3, 40, "#353535"],
|
||||
["box120x25", 120, 25, 105, 4.3, 40, "#353535"],
|
||||
["box92x25", 92, 25, 82.5, 4.3, 40, "#353535"],
|
||||
["box92x10", 92, 10, 82.5, 4.3, 40, "#353535"],
|
||||
["box80x25", 80, 25, 72.5, 4.3, 35, "#353535"],
|
||||
["box80x10", 80, 10, 72.5, 4.3, 35, "#353535"],
|
||||
["box60x25", 60, 25, 50, 4.3, 30, "#353535"],
|
||||
["box60x10", 60, 10, 50, 4.3, 30, "#353535"],
|
||||
["box50x10", 60, 10, 40, 4.3, 20, "#353535"],
|
||||
["box40x10", 40, 10, 32, 4.3, 18, "#353535"],
|
||||
["box30x10", 30, 10, 24, 3.2, 12, "#353535"]
|
||||
];
|
||||
|
||||
f = search([style],fan_data);
|
||||
|
||||
diameter = fan_data[f[0]][1];
|
||||
thickness = fan_data[f[0]][2];
|
||||
hole_space = fan_data[f[0]][3];
|
||||
hole_size = fan_data[f[0]][4];
|
||||
hole_offset = (diameter-hole_space)/2;
|
||||
hub_size = fan_data[f[0]][5];
|
||||
fan_color = fan_data[f[0]][6];
|
||||
enablemask = mask[0];
|
||||
mlength = mask[1];
|
||||
msetback = mask[2];
|
||||
mstyle = mask[3];
|
||||
|
||||
|
||||
adj = .01;
|
||||
$fn = 90;
|
||||
|
||||
if(enablemask == true) {
|
||||
if(mstyle == "fan_open") {
|
||||
translate([0, 0, thickness-msetback+1]) fan_mask(diameter, mlength, "fan_open");
|
||||
}
|
||||
if(mstyle == "default" || mstyle == "fan_1") {
|
||||
translate([0, 0, thickness-msetback+1]) fan_mask(diameter, mlength, "fan_1");
|
||||
}
|
||||
if(mstyle == "fan_2") {
|
||||
translate([0, 0, thickness-msetback+1]) fan_mask(diameter, mlength, "fan_2");
|
||||
}
|
||||
if(mstyle == "fan_hex") {
|
||||
translate([0, 0, thickness-msetback+1]) fan_mask(diameter, mlength, "fan_hex");
|
||||
}
|
||||
}
|
||||
if(enablemask == false) {
|
||||
difference() {
|
||||
union() {
|
||||
color(fan_color) slab([diameter, diameter, 3], 4);
|
||||
color(fan_color) translate([0, 0, thickness-3]) slab([diameter, diameter, 3], 4);
|
||||
color(fan_color) translate([diameter/2, diameter/2, 0]) cylinder(d=diameter+2, h=thickness);
|
||||
|
||||
}
|
||||
// holes
|
||||
color(fan_color) translate([diameter/2, diameter/2, -1]) cylinder(d=diameter-2, h=thickness+2);
|
||||
color(fan_color) translate([hole_offset,hole_offset,-1]) cylinder(d=hole_size, h=thickness+2);
|
||||
color(fan_color) translate([hole_offset,diameter-hole_offset,-1]) cylinder(d=hole_size, h=thickness+2);
|
||||
color(fan_color) translate([diameter-hole_offset,hole_offset,-1]) cylinder(d=hole_size, h=thickness+2);
|
||||
color(fan_color) translate([diameter-hole_offset,diameter-hole_offset,-1]) cylinder(d=hole_size, h=thickness+2);
|
||||
// trim sides
|
||||
color(fan_color) translate([-4,-4, -1]) cube([4, diameter+8, thickness+2]);
|
||||
color(fan_color) translate([diameter,-4, -1]) cube([4, diameter+8, thickness+2]);
|
||||
color(fan_color) translate([-4,-4, -1]) cube([diameter+8, 4, thickness+2]);
|
||||
color(fan_color) translate([-4,diameter, -1]) cube([diameter+8, 4, thickness+2]);
|
||||
}
|
||||
color(fan_color) translate([diameter/2, diameter/2, thickness/2]) rotate([0,0,30])
|
||||
cylinder_fillet_inside(h=thickness, r=hub_size/2, top=1, bottom=1, $fn=90, fillet_fn=90, center=true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: fan_cover
|
||||
DESCRIPTION: creates fan covers for fan openings
|
||||
TODO: none
|
||||
|
||||
USAGE: fan_cover(size, thick, style)
|
||||
|
||||
size = size of fan
|
||||
thick = thickness of cover
|
||||
style = "fan_open", "fan_1", "fan_2", "fan_hex"
|
||||
*/
|
||||
|
||||
module fan_cover(size, thick, style) {
|
||||
difference() {
|
||||
color("grey", 1) slab([size, size, thick], 3);
|
||||
color("grey", 1) fan_mask(size, thick, style);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
DESCRIPTION: creates fan masks for openings
|
||||
TODO:
|
||||
|
||||
USAGE: fan_mask(size, thick, style)
|
||||
|
||||
size = size of fan
|
||||
thick = thickness of cover
|
||||
style = "fan_open", "fan_1", "fan_2", "fan_hex"
|
||||
*/
|
||||
|
||||
module fan_mask(size, thick, style) {
|
||||
|
||||
hole_pos = size == 30 ? 3 :
|
||||
size == 40 ? 4 :
|
||||
size == 50 || size == 60 || size == 70 ? 5 :
|
||||
size >= 80 ? 3.75 : 3.75;
|
||||
$fn = 90;
|
||||
adj = .01;
|
||||
|
||||
if(style == "fan_open") {
|
||||
|
||||
translate([size/2, size/2, -1]) cylinder(h=thick+2, d=size-1);
|
||||
// mount holes
|
||||
translate([size-hole_pos, size-hole_pos, -1]) cylinder(h=thick+2, d=3);
|
||||
translate([size-hole_pos, hole_pos, -1]) cylinder(h=thick+2, d=3);
|
||||
translate([hole_pos, size-hole_pos, -1]) cylinder(h=thick+2, d=3);
|
||||
translate([hole_pos, hole_pos, -1]) cylinder(h=thick+2, d=3);
|
||||
}
|
||||
if(style == "fan_1" && size == 30) {
|
||||
|
||||
union() {
|
||||
difference() {
|
||||
union () {
|
||||
difference() {
|
||||
translate([size/2, size/2, -1]) cylinder(h=thick+2, d=size-2);
|
||||
translate([size/2, size/2, -2]) cylinder(h=thick+4, d=size-8);
|
||||
}
|
||||
difference() {
|
||||
translate([size/2, size/2, -1]) cylinder(h=thick+2, d=size-11);
|
||||
translate([size/2, size/2, -2]) cylinder(h=thick+4, d=size-17);
|
||||
}
|
||||
difference() {
|
||||
translate([size/2, size/2, -1]) cylinder(h=thick+2, d=size-20);
|
||||
translate([size/2, size/2, -2]) cylinder(h=thick+4, d=size-25);
|
||||
}
|
||||
// mount holes
|
||||
translate([size-hole_pos, size-hole_pos, -1]) cylinder(h=thick+2, d=3);
|
||||
translate([size-hole_pos, hole_pos, -1]) cylinder(h=thick+2, d=3);
|
||||
translate([hole_pos, size-hole_pos, -1]) cylinder(h=thick+2, d=3);
|
||||
translate([hole_pos, hole_pos, -1]) cylinder(h=thick+2, d=3);
|
||||
}
|
||||
translate([5, 4, -2]) rotate([0, 0, 45]) cube([size, 1.5, thick+4]);
|
||||
translate([4, size-5, -2]) rotate([0, 0, -45]) cube([size, 1.5, thick+4]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(style == "fan_1" && size == 40) {
|
||||
|
||||
union() {
|
||||
difference() {
|
||||
union () {
|
||||
difference() {
|
||||
translate([size/2, size/2, -1]) cylinder(h=thick+2, d=size-2);
|
||||
translate([size/2, size/2, -2]) cylinder(h=thick+4, d=size-8);
|
||||
}
|
||||
difference() {
|
||||
translate([size/2, size/2, -1]) cylinder(h=thick+2, d=size-11);
|
||||
translate([size/2, size/2, -2]) cylinder(h=thick+4, d=size-17);
|
||||
}
|
||||
difference() {
|
||||
translate([size/2, size/2, -1]) cylinder(h=thick+2, d=size-20);
|
||||
translate([size/2, size/2, -2]) cylinder(h=thick+4, d=size-25);
|
||||
}
|
||||
difference() {
|
||||
translate([size/2, size/2, -1]) cylinder(h=thick+2, d=size-28);
|
||||
translate([size/2, size/2, -2]) cylinder(h=thick+4, d=size-35);
|
||||
}
|
||||
// mount holes
|
||||
translate([size-hole_pos, size-hole_pos, -1]) cylinder(h=thick+2, d=3);
|
||||
translate([size-hole_pos, hole_pos, -1]) cylinder(h=thick+2, d=3);
|
||||
translate([hole_pos, size-hole_pos, -1]) cylinder(h=thick+2, d=3);
|
||||
translate([hole_pos, hole_pos, -1]) cylinder(h=thick+2, d=3);
|
||||
}
|
||||
translate([6.5, 5.5, -2]) rotate([0, 0, 45]) cube([size, 1.5, thick+4]);
|
||||
translate([5, size-6, -2]) rotate([0, 0, -45]) cube([size, 1.5, thick+4]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(style == "fan_1" && (size == 50 || size == 60 || size == 70)) {
|
||||
|
||||
union() {
|
||||
difference() {
|
||||
union () {
|
||||
difference() {
|
||||
translate([size/2, size/2, -1]) cylinder(h=thick+2, d=size-2);
|
||||
translate([size/2, size/2, -2]) cylinder(h=thick+4, d=size-14);
|
||||
}
|
||||
difference() {
|
||||
translate([size/2, size/2, -1]) cylinder(h=thick+2, d=size-18);
|
||||
translate([size/2, size/2, -2]) cylinder(h=thick+4, d=size-30);
|
||||
}
|
||||
difference() {
|
||||
translate([size/2, size/2, -1]) cylinder(h=thick+2, d=size-34);
|
||||
translate([size/2, size/2, -2]) cylinder(h=thick+4, d=size-46);
|
||||
}
|
||||
if(size > 50) {
|
||||
difference() {
|
||||
translate([size/2, size/2, -1]) cylinder(h=thick+2, d=size-50);
|
||||
translate([size/2, size/2, -2]) cylinder(h=thick+4, d=size-59);
|
||||
}
|
||||
}
|
||||
// mount holes
|
||||
translate([size-hole_pos, size-hole_pos, -1]) cylinder(h=thick+2, d=3);
|
||||
translate([size-hole_pos, hole_pos, -1]) cylinder(h=thick+2, d=3);
|
||||
translate([hole_pos, size-hole_pos, -1]) cylinder(h=thick+2, d=3);
|
||||
translate([hole_pos, hole_pos, -1]) cylinder(h=thick+2, d=3);
|
||||
}
|
||||
translate([8.5, 7, -2]) rotate([0, 0, 45]) cube([size > 60 ? size+4 : size+1, 2, thick+4]);
|
||||
translate([6.5, size-8, -2]) rotate([0, 0, -45]) cube([size > 60 ? size+4 : size+1, 2, thick+4]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(style == "fan_1" && size >= 80) {
|
||||
|
||||
union() {
|
||||
difference() {
|
||||
union () {
|
||||
difference() {
|
||||
translate([size/2, size/2, -1]) cylinder(h=thick+2, d=size-2);
|
||||
translate([size/2, size/2, -2]) cylinder(h=thick+4, d=size-9);
|
||||
}
|
||||
difference() {
|
||||
translate([size/2, size/2, -1]) cylinder(h=thick+2, d=size-14);
|
||||
translate([size/2, size/2, -2]) cylinder(h=thick+4, d=size-21);
|
||||
}
|
||||
difference() {
|
||||
translate([size/2, size/2, -1]) cylinder(h=thick+2, d=size-26);
|
||||
translate([size/2, size/2, -2]) cylinder(h=thick+4, d=size-33);
|
||||
}
|
||||
difference() {
|
||||
translate([size/2, size/2, -1]) cylinder(h=thick+2, d=size-38);
|
||||
translate([size/2, size/2, -2]) cylinder(h=thick+4, d=size-45);
|
||||
}
|
||||
difference() {
|
||||
translate([size/2, size/2, -1]) cylinder(h=thick+2, d=size-50);
|
||||
translate([size/2, size/2, -2]) cylinder(h=thick+4, d=size-57);
|
||||
}
|
||||
difference() {
|
||||
translate([size/2, size/2, -1]) cylinder(h=thick+2, d=size-62);
|
||||
translate([size/2, size/2, -2]) cylinder(h=thick+4, d=size-68);
|
||||
}
|
||||
if(size == 92) {
|
||||
difference() {
|
||||
translate([size/2, size/2, -1]) cylinder(h=thick+2, d=size-74);
|
||||
translate([size/2, size/2, -2]) cylinder(h=thick+4, d=size-80);
|
||||
}
|
||||
difference() {
|
||||
translate([size/2, size/2, -1]) cylinder(h=thick+2, d=size-85);
|
||||
translate([size/2, size/2, -2]) cylinder(h=thick+4, d=size-91);
|
||||
}
|
||||
}
|
||||
// mount holes
|
||||
translate([size-hole_pos, size-hole_pos, -1]) cylinder(h=thick+2, d=3);
|
||||
translate([size-hole_pos, hole_pos, -1]) cylinder(h=thick+2, d=3);
|
||||
translate([hole_pos, size-hole_pos, -1]) cylinder(h=thick+2, d=3);
|
||||
translate([hole_pos, hole_pos, -1]) cylinder(h=thick+2, d=3);
|
||||
}
|
||||
translate([6.5, 4.25, -2]) rotate([0, 0, 45]) cube([size*1.2, 3, thick+4]);
|
||||
translate([4.25, size-6.5, -2]) rotate([0, 0, -45]) cube([size*1.2, 3, thick+4]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(style == "fan_2") {
|
||||
|
||||
inner = size == 30 ? 24 :
|
||||
size == 40 ? 32 :
|
||||
size == 50 ? 40 :
|
||||
size == 60 ? 50 :
|
||||
size == 70 ? 61.9 :
|
||||
size == 80 ? 71.5 :
|
||||
size * 0.8; // Use 80% as default
|
||||
|
||||
rings = size <= 40 ? 4 : 6;
|
||||
bar_size = size <= 40 ? 2 : 3;
|
||||
|
||||
screw_offset = inner / 2;
|
||||
center_point = size * 0.5;
|
||||
base_ring_size = size * 0.95;
|
||||
rings_spacing = size / rings;
|
||||
|
||||
translate([size/2, size/2, -1])
|
||||
union() {
|
||||
translate([screw_offset, screw_offset, (thick+2)/2]) cylinder(d=3, h=thick+2, center=true);
|
||||
translate([-screw_offset, screw_offset, (thick+2)/2]) cylinder(d=3, h=thick+2, center=true);
|
||||
translate([screw_offset, -screw_offset, (thick+2)/2]) cylinder(d=3, h=thick+2, center=true);
|
||||
translate([-screw_offset, -screw_offset, (thick+2)/2]) cylinder(d=3, h=thick+2, center=true);
|
||||
|
||||
difference() {
|
||||
union() {
|
||||
for(i=[inner:-rings_spacing:0]) {
|
||||
difference() {
|
||||
cylinder(d=base_ring_size - i, h=thick+2);
|
||||
translate([0, 0, -1]) cylinder(d=base_ring_size - i - (rings_spacing/2), h=thick+4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
translate([0, 0, 11])
|
||||
union() {
|
||||
cylinder(d=bar_size*2+0.1, thick+2); // Add a circle to prevent any tiny holes around cross bar
|
||||
rotate([0, 0, 45]) cube([size, bar_size, thick+4], center=true);
|
||||
rotate([0, 0, 45]) cube([bar_size, size, thick+4], center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(style == "fan_hex") {
|
||||
|
||||
hex_pos = size == 30 ? [-11.75, -4.5, 0] :
|
||||
size == 40 ? [-14, -11.25, 0] :
|
||||
size == 50 ? [-16, -6.5, 0] :
|
||||
size == 60 ? [-11, -1.5, 0] :
|
||||
size == 70 ? [-13, -3.5, 0] :
|
||||
size >= 80 ? [-8.25, -3.5, 0] : [-9, -4, 0];
|
||||
|
||||
union() {
|
||||
difference () {
|
||||
translate([1+(size-2)/2, 1+(size-2)/2, -1]) cylinder(h=thick+2, d=size-2);
|
||||
union() {
|
||||
difference() {
|
||||
translate([1+(size-2)/2, 1+(size-2)/2, -1-adj]) cylinder(h=thick+3, d=size-2);
|
||||
translate(hex_pos) vent_hex(15, 8, thick+4, 12, 2, "horizontal");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// mount holes
|
||||
translate([size-hole_pos, size-hole_pos, -1]) cylinder(h=thick+2, d=3);
|
||||
translate([size-hole_pos, hole_pos, -1]) cylinder(h=thick+2, d=3);
|
||||
translate([hole_pos, size-hole_pos, -1]) cylinder(h=thick+2, d=3);
|
||||
translate([hole_pos, hole_pos, -1]) cylinder(h=thick+2, d=3);
|
||||
}
|
||||
}
|
||||
48
lib/fastener.scad
Normal file
48
lib/fastener.scad
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
This file is part of SBC Case Builder https://github.com/hominoids/SBC_Case_Builder
|
||||
Copyright 2022,2023,2024 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
m_insert(type="M3", icolor = "#ebdc8b")
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
NAME: fan_cover
|
||||
DESCRIPTION: creates fan covers for fan openings
|
||||
TODO: none
|
||||
|
||||
USAGE: m_insert(type="M3", icolor = "#ebdc8b")
|
||||
|
||||
type = "M3"
|
||||
icolor = color of insert
|
||||
*/
|
||||
|
||||
module m_insert(type="M3", icolor = "#ebdc8b") { //#f4e6c3, #ebdc8b
|
||||
|
||||
odiam = type == "M3" ? 4.2 : 3.5;
|
||||
idiam = type == "M3" ? 3 : 2.5;
|
||||
iheight = 4;
|
||||
|
||||
difference() {
|
||||
color(icolor,.6) cylinder(d=odiam, h=iheight);
|
||||
color(icolor,.6) translate([0,0,-1]) cylinder(d=idiam, h=iheight+2);
|
||||
}
|
||||
for(bearing = [0:10:360]) {
|
||||
color(icolor) translate([-.25+(odiam/2)*cos(bearing), -.25+(odiam/2)*sin(bearing), iheight-1.5])
|
||||
cube([.5, .5, 1.5]);
|
||||
}
|
||||
}
|
||||
42
lib/feet.scad
Normal file
42
lib/feet.scad
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
This file is part of SBC Case Builder https://github.com/hominoids/SBC_Case_Builder
|
||||
Copyright 2022,2023,2024 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
feet (diameter, height)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
NAME: feet
|
||||
DESCRIPTION: creates simple case feet
|
||||
TODO: none
|
||||
|
||||
USAGE: feet (diameter, height)
|
||||
|
||||
diameter = size of fan
|
||||
height = thickness of cover
|
||||
|
||||
*/
|
||||
|
||||
module feet (diameter, height) {
|
||||
|
||||
difference (){
|
||||
cylinder (d=diameter,h=height);
|
||||
translate([0,0,-1]) cylinder (d=3, h=height+2,$fn=90);
|
||||
translate ([0,0,-1]) cylinder(r=3.35,h=height-3,$fn=6);
|
||||
}
|
||||
}
|
||||
820
lib/hd.scad
Normal file
820
lib/hd.scad
Normal file
@@ -0,0 +1,820 @@
|
||||
/*
|
||||
This file is part of SBC Case Builder https://github.com/hominoids/SBC_Case_Builder
|
||||
Copyright 2022,2023,2024 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
hd25(orientation, height, mask)
|
||||
hd25_tab(side)
|
||||
hd25_vtab(side)
|
||||
hd35(orientation, mask)
|
||||
hdd35_25holder(length)
|
||||
hd35_tab(side)
|
||||
hd35_vtab(side)
|
||||
hd_bottom_holes(hd, orientation, side, thick)
|
||||
hd_mount(hd, orientation, position, side)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
NAME: hd25
|
||||
DESCRIPTION: creates 2.5" hard drive model
|
||||
TODO: none
|
||||
|
||||
USAGE: hd25(orientation, height, mask)
|
||||
|
||||
orientation = "landscape", "portrait"
|
||||
height = drive height
|
||||
mask[0] = true enables component mask
|
||||
mask[1] = mask length
|
||||
mask[2] = mask setback
|
||||
mask[3] = mstyle "default", "bottom", "side", "both"
|
||||
*/
|
||||
|
||||
module hd25(orientation, height, mask) {
|
||||
|
||||
hd25_x = 100;
|
||||
hd25_y = 69.85;
|
||||
hd25_z = height;
|
||||
enablemask = mask[0];
|
||||
mlength = mask[1];
|
||||
msetback = mask[2];
|
||||
mstyle = mask[3];
|
||||
|
||||
adj = .01;
|
||||
$fn = 90;
|
||||
|
||||
if(enablemask == true) {
|
||||
if(orientation == "landscape" && (mstyle == "side" || mstyle == "both" || mstyle == "default")) {
|
||||
translate([0, msetback, 0]) hd_holes(2.5, "landscape", "left", mlength);
|
||||
translate([0, -msetback, 0]) hd_holes(2.5, "landscape", "right", mlength);
|
||||
}
|
||||
if(orientation == "landscape" && (mstyle == "bottom" || mstyle == "both")) {
|
||||
translate([0, 0, msetback]) hd_holes(2.5, "landscape", "bottom", mlength);
|
||||
}
|
||||
if(orientation == "portrait" && (mstyle == "side" || mstyle == "both" || mstyle == "default")) {
|
||||
translate([msetback, 0, 0]) hd_holes(2.5, "portrait", "left", mlength);
|
||||
translate([-msetback, 0, 0]) hd_holes(2.5, "portrait", "right", mlength);
|
||||
}
|
||||
if(orientation == "portrait" && (mstyle == "bottom" || mstyle == "both")) {
|
||||
translate([0, 0, -mlength+msetback]) hd_holes(2.5, "portrait", "bottom", mlength);
|
||||
}
|
||||
}
|
||||
if(enablemask == false) {
|
||||
if(orientation == "landscape") {
|
||||
difference() {
|
||||
color("LightGrey",.6) cube([hd25_x,hd25_y,hd25_z]);
|
||||
|
||||
// bottom screw holes
|
||||
color("Black",.6) translate([9.4,4.07,-adj]) cylinder(d=3,h=3);
|
||||
color("Black",.6) translate([86,4.07,-adj]) cylinder(d=3,h=3);
|
||||
color("Black",.6) translate([86,65.79,-adj]) cylinder(d=3,h=4);
|
||||
color("Black",.6) translate([9.4,65.79,-adj]) cylinder(d=3,h=4);
|
||||
|
||||
// side screw holes
|
||||
color("Black",.6) translate([9.4,-adj,3]) rotate([-90,0,0]) cylinder(d=3,h=3);
|
||||
color("Black",.6) translate([86,-adj,3]) rotate([-90,0,0]) cylinder(d=3,h=3);
|
||||
color("Black",.6) translate([86,hd25_y+adj,3]) rotate([90,0,0]) cylinder(d=3,h=3);
|
||||
color("Black",.6) translate([9.4,hd25_y+adj,3]) rotate([90,0,0]) cylinder(d=3,h=3);
|
||||
|
||||
// connector opening
|
||||
color("LightSlateGray",.6) translate([hd25_x-5,11,-1]) cube([5+adj,32,5+adj]);
|
||||
}
|
||||
}
|
||||
if(orientation == "portrait") {
|
||||
translate([0,hd25_x,0]) rotate([0,0,270])
|
||||
difference() {
|
||||
color("LightGrey",.6) cube([hd25_x,hd25_y,hd25_z]);
|
||||
|
||||
// bottom screw holes
|
||||
color("Black",.6) translate([9.4,4.07,-adj]) cylinder(d=3,h=3);
|
||||
color("Black",.6) translate([86,4.07,-adj]) cylinder(d=3,h=3);
|
||||
color("Black",.6) translate([86,65.79,-adj]) cylinder(d=3,h=4);
|
||||
color("Black",.6) translate([9.4,65.79,-adj]) cylinder(d=3,h=4);
|
||||
|
||||
// side screw holes
|
||||
color("Black",.6) translate([9.4,-adj,3]) rotate([-90,0,0]) cylinder(d=3,h=3);
|
||||
color("Black",.6) translate([86,-adj,3]) rotate([-90,0,0]) cylinder(d=3,h=3);
|
||||
color("Black",.6) translate([86,hd25_y+adj,3]) rotate([90,0,0]) cylinder(d=3,h=3);
|
||||
color("Black",.6) translate([9.4,hd25_y+adj,3]) rotate([90,0,0]) cylinder(d=3,h=3);
|
||||
|
||||
// connector opening
|
||||
color("LightSlateGray",.6) translate([hd25_x-5,11,-1]) cube([5+adj,32,5+adj]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: hd25_tab
|
||||
DESCRIPTION: creates 2.5" hard drive tabs for horizontal mounting
|
||||
TODO: none
|
||||
|
||||
USAGE: hd25_tab(side)
|
||||
|
||||
side = "left", "right"
|
||||
*/
|
||||
|
||||
module hd25_tab(side) {
|
||||
|
||||
width = 15;
|
||||
l_width = 26;
|
||||
depth = 15;
|
||||
height = 4;
|
||||
fillet = 2;
|
||||
hole = 3.6;
|
||||
length = 3;
|
||||
|
||||
adj = .01;
|
||||
$fn = 90;
|
||||
|
||||
if(side == "left") {
|
||||
difference() {
|
||||
union() {
|
||||
translate([0,-depth/2,0]) rotate([0,-90,0])
|
||||
slab_r([l_width,depth,height], [fillet,fillet,fillet,fillet]);
|
||||
translate([-height,-depth/2,0]) cube([height,depth,height]);
|
||||
translate([adj,-5.5,depth])
|
||||
rotate([90,0,0])
|
||||
linear_extrude(height = 2)
|
||||
polygon(points = [ [-height,height],
|
||||
[-depth+4,-depth],
|
||||
[-height,-depth]]);
|
||||
translate([adj,7.5,depth])
|
||||
rotate([90,0,0])
|
||||
linear_extrude(height = 2)
|
||||
polygon(points = [ [-height,height],
|
||||
[-depth+4,-depth],
|
||||
[-height,-depth]]);
|
||||
}
|
||||
translate([4.07,0,-adj]) rotate([0,0,0]) cylinder(d=hole, h=3);
|
||||
translate([-height-adj,(width/2)-(length/2)-depth/2,3]) rotate([90,0,90]) slot(hole,length,height+(2*adj));
|
||||
translate([-height-adj,(width/2)-(length/2)-depth/2,21]) rotate([90,0,90]) slot(hole,length,height+(2*adj));
|
||||
}
|
||||
}
|
||||
if(side == "right") {
|
||||
difference() {
|
||||
union() {
|
||||
translate([height,-depth/2,0]) rotate([0,-90,0])
|
||||
slab_r([l_width,depth,height], [fillet,fillet,fillet,fillet]);
|
||||
translate([0,-depth/2,0]) cube([height,depth,height]);
|
||||
translate([adj,-7.5,depth])
|
||||
rotate([90,0,180])
|
||||
linear_extrude(height = 2)
|
||||
polygon(points = [ [-height,height],
|
||||
[-depth+4,-depth],
|
||||
[-height,-depth]]);
|
||||
translate([adj,5.5,depth])
|
||||
rotate([90,0,180])
|
||||
linear_extrude(height = 2)
|
||||
polygon(points = [ [-height,height],
|
||||
[-depth+4,-depth],
|
||||
[-height,-depth]]);
|
||||
}
|
||||
translate([-4.07,0,-adj]) rotate([0,0,0]) cylinder(d=hole, h=3);
|
||||
translate([-adj,(width/2)-(length/2)-depth/2,3]) rotate([90,0,90]) slot(hole,length,height+(2*adj));
|
||||
translate([-adj,(width/2)-(length/2)-depth/2,21]) rotate([90,0,90]) slot(hole,length,height+(2*adj));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: hd25_vtab
|
||||
DESCRIPTION: creates 2.5" hard drive tabs for vertical mounting
|
||||
TODO: none
|
||||
|
||||
USAGE: hd25_vtab(side)
|
||||
|
||||
side = "left", "right"
|
||||
*/
|
||||
|
||||
module hd25_vtab(side) {
|
||||
|
||||
width = 15;
|
||||
l_width = 16;
|
||||
depth = 15;
|
||||
height = 4;
|
||||
fillet = 2;
|
||||
hole = 3.6;
|
||||
length = 3;
|
||||
|
||||
adj = .01;
|
||||
$fn = 90;
|
||||
|
||||
if(side == "left") {
|
||||
difference() {
|
||||
union() {
|
||||
translate([0,-depth/2,0]) rotate([0,-90,0])
|
||||
slab_r([l_width,depth,height], [fillet,fillet,fillet,fillet]);
|
||||
translate([-height,-depth/2,0]) cube([height,depth,height]);
|
||||
translate([adj,-5.5,depth])
|
||||
rotate([90,0,0])
|
||||
linear_extrude(height = 2)
|
||||
polygon(points = [ [-height,height-5],
|
||||
[-depth+4,-depth],
|
||||
[-height,-depth]]);
|
||||
translate([adj,7.5,depth])
|
||||
rotate([90,0,0])
|
||||
linear_extrude(height = 2)
|
||||
polygon(points = [ [-height,height-5],
|
||||
[-depth+4,-depth],
|
||||
[-height,-depth]]);
|
||||
}
|
||||
translate([3,0,-adj]) rotate([0,0,0]) cylinder(d=hole, h=3);
|
||||
translate([-height-adj,1.5+(width/2)-(length/2)-depth/2,5.57]) rotate([90,90,90]) slot(hole,length,height+(2*adj));
|
||||
}
|
||||
}
|
||||
if(side == "right") {
|
||||
difference() {
|
||||
union() {
|
||||
translate([height,-depth/2,0]) rotate([0,-90,0])
|
||||
slab_r([l_width,depth,height], [fillet,fillet,fillet,fillet]);
|
||||
translate([0,-depth/2,0]) cube([height,depth,height]);
|
||||
translate([adj,-7.5,depth])
|
||||
rotate([90,0,180])
|
||||
linear_extrude(height = 2)
|
||||
polygon(points = [ [-height,height-5],
|
||||
[-depth+4,-depth],
|
||||
[-height,-depth]]);
|
||||
translate([adj,5.5,depth])
|
||||
rotate([90,0,180])
|
||||
linear_extrude(height = 2)
|
||||
polygon(points = [ [-height,height-5],
|
||||
[-depth+4,-depth],
|
||||
[-height,-depth]]);
|
||||
}
|
||||
translate([-3,0,-adj]) rotate([0,0,0]) cylinder(d=hole, h=3);
|
||||
translate([-adj,1.5+(width/2)-(length/2)-depth/2,5.57]) rotate([90,90,90]) slot(hole,length,height+(2*adj));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: hd35
|
||||
DESCRIPTION: creates 3.5" hard drive model
|
||||
TODO: none
|
||||
|
||||
USAGE: hd35(orientation, mask)
|
||||
|
||||
orientation = "landscape", "portrait"
|
||||
mask[0] = true enables component mask
|
||||
mask[1] = mask length
|
||||
mask[2] = mask setback
|
||||
mask[3] = mstyle "default", "bottom", "side", "both"
|
||||
*/
|
||||
|
||||
module hd35(orientation, mask) {
|
||||
|
||||
hd35_x = 147;
|
||||
hd35_y = 101.6;
|
||||
hd35_z = 26.1;
|
||||
enablemask = mask[0];
|
||||
mlength = mask[1];
|
||||
msetback = mask[2];
|
||||
mstyle = mask[3];
|
||||
|
||||
adj = .01;
|
||||
$fn = 90;
|
||||
|
||||
if(enablemask == true) {
|
||||
if(orientation == "landscape" && (mstyle == "side" || mstyle == "both" || mstyle == "default")) {
|
||||
translate([0, msetback, 0]) hd_holes(3.5, "landscape", "left", mlength);
|
||||
translate([0, -msetback, 0]) hd_holes(3.5, "landscape", "right", mlength);
|
||||
}
|
||||
if(orientation == "landscape" && (mstyle == "bottom" || mstyle == "both")) {
|
||||
translate([0, 0, msetback]) hd_holes(3.5, "landscape", "bottom", mlength);
|
||||
}
|
||||
if(orientation == "portrait" && (mstyle == "side" || mstyle == "both" || mstyle == "default")) {
|
||||
translate([msetback, 0, 0]) hd_holes(3.5, "portrait", "left", mlength);
|
||||
translate([-msetback, 0, 0]) hd_holes(3.5, "portrait", "right", mlength);
|
||||
}
|
||||
if(orientation == "portrait" && (mstyle == "bottom" || mstyle == "both")) {
|
||||
translate([0, 0, -mlength+msetback]) hd_holes(3.5, "portrait", "bottom", mlength);
|
||||
}
|
||||
}
|
||||
if(enablemask == false) {
|
||||
if(orientation == "landscape") {
|
||||
difference() {
|
||||
color("LightGrey",.6) cube([hd35_x,hd35_y,hd35_z]);
|
||||
|
||||
// bottom screw holes
|
||||
color("Black",.6) translate([29.52,3.18,-adj]) cylinder(d=3,h=3+adj);
|
||||
color("Black",.6) translate([61.27,3.18,-adj]) cylinder(d=3,h=3+adj);
|
||||
color("Black",.6) translate([105.72,3.18,-adj]) cylinder(d=3,h=3+adj);
|
||||
color("Black",.6) translate([29.52,98.43,-adj]) cylinder(d=3,h=3+adj);
|
||||
color("Black",.6) translate([61.27,98.43,-adj]) cylinder(d=3,h=3+adj);
|
||||
color("Black",.6) translate([105.72,98.43,-adj]) cylinder(d=3,h=3+adj);
|
||||
|
||||
// side screw holes
|
||||
color("Black",.6) translate([16.9,-adj,6.35]) rotate([-90,0,0]) cylinder(d=3,h=3);
|
||||
color("Black",.6) translate([76.6,-adj,6.35]) rotate([-90,0,0]) cylinder(d=3,h=3);
|
||||
color("Black",.6) translate([118.5,-adj,6.35]) rotate([-90,0,0]) cylinder(d=3,h=3);
|
||||
color("Black",.6) translate([118.5,hd35_y+adj,6.35]) rotate([90,0,0]) cylinder(d=3,h=3);
|
||||
color("Black",.6) translate([76.6,hd35_y+adj,6.35]) rotate([90,0,0]) cylinder(d=3,h=3);
|
||||
color("Black",.6) translate([16.9,hd35_y+adj,6.35]) rotate([90,0,0]) cylinder(d=3,h=3);
|
||||
|
||||
// connector opening
|
||||
color("LightSlateGray",.6) translate([hd35_x-5,11,-1]) cube([5+adj,32,5+adj]);
|
||||
}
|
||||
}
|
||||
if(orientation == "portrait") {
|
||||
translate([0,hd35_x,0]) rotate([0,0,270])
|
||||
difference() {
|
||||
color("LightGrey",.6) cube([hd35_x,hd35_y,hd35_z]);
|
||||
|
||||
// bottom screw holes
|
||||
color("Black",.6) translate([29.52,3.18,-adj]) cylinder(d=3,h=3+adj);
|
||||
color("Black",.6) translate([61.27,3.18,-adj]) cylinder(d=3,h=3+adj);
|
||||
color("Black",.6) translate([105.72,3.18,-adj]) cylinder(d=3,h=3+adj);
|
||||
color("Black",.6) translate([29.52,98.43,-adj]) cylinder(d=3,h=3+adj);
|
||||
color("Black",.6) translate([61.27,98.43,-adj]) cylinder(d=3,h=3+adj);
|
||||
color("Black",.6) translate([105.72,98.43,-adj]) cylinder(d=3,h=3+adj);
|
||||
|
||||
// side screw holes
|
||||
color("Black",.6) translate([16.9,-adj,6.35]) rotate([-90,0,0]) cylinder(d=3,h=3);
|
||||
color("Black",.6) translate([76.6,-adj,6.35]) rotate([-90,0,0]) cylinder(d=3,h=3);
|
||||
color("Black",.6) translate([118.5,-adj,6.35]) rotate([-90,0,0]) cylinder(d=3,h=3);
|
||||
color("Black",.6) translate([118.5,hd35_y+adj,6.35]) rotate([90,0,0]) cylinder(d=3,h=3);
|
||||
color("Black",.6) translate([76.6,hd35_y+adj,6.35]) rotate([90,0,0]) cylinder(d=3,h=3);
|
||||
color("Black",.6) translate([16.9,hd35_y+adj,6.35]) rotate([90,0,0]) cylinder(d=3,h=3);
|
||||
|
||||
// connector opening
|
||||
color("LightSlateGray",.6) translate([hd35_x-5,11,-1]) cube([5+adj,32,5+adj]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: hd35_25holder
|
||||
DESCRIPTION: 3.5" hdd to 2.5" hdd holder
|
||||
TODO: none
|
||||
|
||||
USAGE: hdd35_25holder(length, width=101.6)
|
||||
|
||||
length = length of holder min. 145mm for 3.5" drive
|
||||
*/
|
||||
|
||||
module hd35_25holder(length, width=101.6) {
|
||||
|
||||
wallthick = 3;
|
||||
floorthick = 2;
|
||||
hd35_x = length; // 145mm for 3.5" drive
|
||||
hd35_y = width;
|
||||
hd35_z = 12;
|
||||
hd25_x = 100;
|
||||
hd25_y = 69.85;
|
||||
hd25_z = 9.5;
|
||||
hd25_xloc = 2; // or (hd35_x-hd25_x)/2
|
||||
hd25_yloc = (hd35_y-hd25_y)/2;
|
||||
hd25_zloc = 9.5;
|
||||
adj = .1;
|
||||
$fn=90;
|
||||
|
||||
difference() {
|
||||
union() {
|
||||
difference() {
|
||||
translate([(hd35_x/2),(hd35_y/2),(hd35_z/2)])
|
||||
cube_fillet_inside([hd35_x,hd35_y,hd35_z],
|
||||
vertical=[3,3,3,3], top=[0,0,0,0], bottom=[0,0,0,0], $fn=90);
|
||||
translate([(hd35_x/2),(hd35_y/2),(hd35_z/2)+floorthick])
|
||||
cube_fillet_inside([hd35_x-(wallthick*2),hd35_y-(wallthick*2),hd35_z],
|
||||
vertical=[0,0,0,0], top=[0,0,0,0], bottom=[0,0,0,0], $fn=90);
|
||||
|
||||
// end trim
|
||||
translate([-adj,5,wallthick+2]) cube([wallthick+(adj*2),hd35_y-10,10]);
|
||||
translate([hd35_x-wallthick-adj,5,wallthick+2]) cube([wallthick+(adj*2),hd35_y-10,10]);
|
||||
|
||||
// bottom vents
|
||||
for ( r=[15:40:hd35_x-40]) {
|
||||
for (c=[hd35_y-76:4:75]) {
|
||||
translate ([r,c,-adj]) cube([35,2,wallthick+(adj*2)]);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 2.5 hdd bottom support
|
||||
translate([9.4+hd25_xloc,4.07+hd25_yloc,floorthick-adj]) cylinder(d=8,h=4);
|
||||
translate([86+hd25_xloc,4.07+hd25_yloc,floorthick-adj]) cylinder(d=8,h=4);
|
||||
translate([86+hd25_xloc,65.79+hd25_yloc,floorthick-adj]) cylinder(d=8,h=4);
|
||||
translate([9.4+hd25_xloc,65.79+hd25_yloc,floorthick-adj]) cylinder(d=8,h=4);
|
||||
|
||||
// side nut holder support
|
||||
translate([16,wallthick-adj,7]) rotate([-90,0,0]) cylinder(d=10,h=3);
|
||||
translate([76,wallthick-adj,7]) rotate([-90,0,0]) cylinder(d=10,h=3);
|
||||
if(length >= 120) {
|
||||
translate([117.5,wallthick-adj,7]) rotate([-90,0,0]) cylinder(d=10,h=3);
|
||||
translate([117.5,hd35_y-wallthick+adj,7]) rotate([90,0,0]) cylinder(d=10,h=3);
|
||||
}
|
||||
translate([76,hd35_y-wallthick+adj,7]) rotate([90,0,0]) cylinder(d=10,h=3);
|
||||
translate([16,hd35_y-wallthick+adj,7]) rotate([90,0,0]) cylinder(d=10,h=3);
|
||||
|
||||
// bottom-side support
|
||||
translate([wallthick,wallthick,floorthick-2]) rotate([45,0,0]) cube([hd35_x-(wallthick*2),3,3]);
|
||||
translate([wallthick,hd35_y-wallthick+adj,floorthick-2]) rotate([45,0,0]) cube([hd35_x-(wallthick*2),3,3]);
|
||||
|
||||
}
|
||||
// bottom screw holes
|
||||
translate([9.4+hd25_xloc,4.07+hd25_yloc,-adj]) cylinder(d=3,h=(floorthick*3)+(adj*2));
|
||||
translate([86+hd25_xloc,4.07+hd25_yloc,-adj]) cylinder(d=3,h=(floorthick*3)+(adj*2));
|
||||
translate([86+hd25_xloc,65.79+hd25_yloc,-adj]) cylinder(d=3,h=(floorthick*3)+(adj*2));
|
||||
translate([9.4+hd25_xloc,65.79+hd25_yloc,-adj]) cylinder(d=3,h=(floorthick*3)+(adj*2));
|
||||
|
||||
// countersink holes
|
||||
translate([9.4+hd25_xloc,4.07+hd25_yloc,-adj]) cylinder(d1=6.5, d2=3, h=3);
|
||||
translate([86+hd25_xloc,4.07+hd25_yloc,-adj]) cylinder(d1=6.5, d2=3, h=3);
|
||||
translate([86+hd25_xloc,65.79+hd25_yloc,-adj]) cylinder(d1=6.5, d2=3, h=3);
|
||||
translate([9.4+hd25_xloc,65.79+hd25_yloc,-adj]) cylinder(d1=6.5, d2=3, h=3);
|
||||
|
||||
// side screw holes
|
||||
translate([16,-adj,7]) rotate([-90,0,0]) cylinder(d=3.6,h=7);
|
||||
translate([76,-adj,7]) rotate([-90,0,0]) cylinder(d=3.6,h=7);
|
||||
translate([117.5,-adj,7]) rotate([-90,0,0]) cylinder(d=3.6,h=7);
|
||||
translate([117.5,hd35_y+adj,7]) rotate([90,0,0]) cylinder(d=3.6,h=7);
|
||||
translate([76,hd35_y+adj,7]) rotate([90,0,0]) cylinder(d=3.6,h=7);
|
||||
translate([16,hd35_y+adj,7]) rotate([90,0,0]) cylinder(d=3.6,h=7);
|
||||
|
||||
// side nut trap
|
||||
translate([16,wallthick-adj,7]) rotate([-90,0,0]) cylinder(r=3.30,h=5,$fn=6);
|
||||
translate([76,wallthick-adj,7]) rotate([-90,0,0]) cylinder(r=3.30,h=5,$fn=6);
|
||||
translate([117.5,wallthick-adj,7]) rotate([-90,0,0]) cylinder(r=3.30,h=5,$fn=6);
|
||||
translate([117.5,hd35_y-wallthick-adj,7]) rotate([90,0,0]) cylinder(r=3.30,h=5,$fn=6);
|
||||
translate([76,hd35_y-wallthick-adj,7]) rotate([90,0,0]) cylinder(r=3.30,h=5,$fn=6);
|
||||
translate([16,hd35_y-wallthick-adj,7]) rotate([90,0,0]) cylinder(r=3.30,h=5,$fn=6);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: hd35_tab
|
||||
DESCRIPTION: creates 3.5" hard drive tabs for horizontal mounting
|
||||
TODO: none
|
||||
|
||||
USAGE: hd35_tab(side)
|
||||
|
||||
side = "left", "right"
|
||||
*/
|
||||
|
||||
module hd35_tab(side) {
|
||||
|
||||
width = 15;
|
||||
l_width = 46;
|
||||
depth = 15;
|
||||
height = 4;
|
||||
fillet = 2;
|
||||
hole = 3.6;
|
||||
length = 3;
|
||||
|
||||
adj = .01;
|
||||
$fn = 90;
|
||||
|
||||
if(side == "left") {
|
||||
difference() {
|
||||
union() {
|
||||
translate([0,-depth/2,0]) rotate([0,-90,0])
|
||||
slab_r([l_width,depth,height], [fillet,fillet,fillet,fillet]);
|
||||
translate([-height,-depth/2,0]) cube([height,depth,height]);
|
||||
|
||||
translate([adj,-5.5,depth])
|
||||
rotate([90,0,0])
|
||||
linear_extrude(height = 2)
|
||||
polygon(points = [ [-height,height+20],
|
||||
[-depth+4,-depth],
|
||||
[-height,-depth]]);
|
||||
translate([adj,7.5,depth])
|
||||
rotate([90,0,0])
|
||||
linear_extrude(height = 2)
|
||||
polygon(points = [ [-height,height+20],
|
||||
[-depth+4,-depth],
|
||||
[-height,-depth]]);
|
||||
|
||||
}
|
||||
translate([3.18,0,-adj]) rotate([0,0,0]) cylinder(d=hole, h=3);
|
||||
translate([-height-adj,(width/2)-(length/2)-depth/2,6.35]) rotate([90,0,90]) slot(hole,length,height+(2*adj));
|
||||
translate([-height-adj,(width/2)-(length/2)-depth/2,38.35]) rotate([90,0,90]) slot(hole,length,height+(2*adj));
|
||||
}
|
||||
}
|
||||
if(side == "right") {
|
||||
difference() {
|
||||
union() {
|
||||
translate([height,-depth/2,0]) rotate([0,-90,0])
|
||||
slab_r([l_width,depth,height], [fillet,fillet,fillet,fillet]);
|
||||
translate([0,-depth/2,0]) cube([height,depth,height]);
|
||||
|
||||
translate([adj,-7.5,depth])
|
||||
rotate([90,0,180])
|
||||
linear_extrude(height = 2)
|
||||
polygon(points = [ [-height,height+20],
|
||||
[-depth+4,-depth],
|
||||
[-height,-depth]]);
|
||||
translate([adj,5.5,depth])
|
||||
rotate([90,0,180])
|
||||
linear_extrude(height = 2)
|
||||
polygon(points = [ [-height,height+20],
|
||||
[-depth+4,-depth],
|
||||
[-height,-depth]]);
|
||||
|
||||
}
|
||||
translate([-3.18,0,-adj]) rotate([0,0,0]) cylinder(d=hole, h=3);
|
||||
translate([-adj,(width/2)-(length/2)-depth/2,6.35]) rotate([90,0,90]) slot(hole,length,height+(2*adj));
|
||||
translate([-adj,(width/2)-(length/2)-depth/2,38.35]) rotate([90,0,90]) slot(hole,length,height+(2*adj));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: hd35_vtab
|
||||
DESCRIPTION: creates 3.5" hard drive tabs for vertical mounting
|
||||
TODO: none
|
||||
|
||||
USAGE: hd35_vtab(side)
|
||||
|
||||
side = "left", "right"
|
||||
*/
|
||||
|
||||
module hd35_vtab(side) {
|
||||
|
||||
width = 15;
|
||||
l_width = 16;
|
||||
depth = 15;
|
||||
height = 4;
|
||||
fillet = 2;
|
||||
hole = 3.6;
|
||||
length = 3;
|
||||
|
||||
adj = .01;
|
||||
$fn = 90;
|
||||
if(side == "left") {
|
||||
difference() {
|
||||
union() {
|
||||
translate([0,-depth/2,0]) rotate([0,-90,0])
|
||||
slab_r([l_width,depth,height], [fillet,fillet,fillet,fillet]);
|
||||
translate([-height,-depth/2,0]) cube([height,depth,height]);
|
||||
translate([adj,-5.5,depth])
|
||||
rotate([90,0,0])
|
||||
linear_extrude(height = 2)
|
||||
polygon(points = [ [-height,height-5],
|
||||
[-depth+4,-depth],
|
||||
[-height,-depth]]);
|
||||
translate([adj,7.5,depth])
|
||||
rotate([90,0,0])
|
||||
linear_extrude(height = 2)
|
||||
polygon(points = [ [-height,height-5],
|
||||
[-depth+4,-depth],
|
||||
[-height,-depth]]);
|
||||
}
|
||||
translate([3,0,-adj]) rotate([0,0,0]) cylinder(d=hole, h=3);
|
||||
translate([-height-adj,1.5+(width/2)-(length/2)-depth/2,5.57]) rotate([90,90,90]) slot(hole,length,height+(2*adj));
|
||||
}
|
||||
}
|
||||
if(side == "right") {
|
||||
difference() {
|
||||
union() {
|
||||
translate([height,-depth/2,0]) rotate([0,-90,0])
|
||||
slab_r([l_width,depth,height], [fillet,fillet,fillet,fillet]);
|
||||
translate([0,-depth/2,0]) cube([height,depth,height]);
|
||||
translate([adj,-7.5,depth])
|
||||
rotate([90,0,180])
|
||||
linear_extrude(height = 2)
|
||||
polygon(points = [ [-height,height-5],
|
||||
[-depth+4,-depth],
|
||||
[-height,-depth]]);
|
||||
translate([adj,5.5,depth])
|
||||
rotate([90,0,180])
|
||||
linear_extrude(height = 2)
|
||||
polygon(points = [ [-height,height-5],
|
||||
[-depth+4,-depth],
|
||||
[-height,-depth]]);
|
||||
}
|
||||
translate([-3,0,-adj]) rotate([0,0,0]) cylinder(d=hole, h=3);
|
||||
translate([-adj,1.5+(width/2)-(length/2)-depth/2,5.57]) rotate([90,90,90]) slot(hole,length,height+(2*adj));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: hd_holes
|
||||
DESCRIPTION: creates 2.5" and 3.5" hard drive hole mask for mounting
|
||||
TODO: none
|
||||
|
||||
USAGE: hd_bottom_holes(hd, orientation, side, thick)
|
||||
|
||||
hd = 2.5, 3.5
|
||||
orientation = "portrait", "landscape"
|
||||
side = "left", "right", "both", "bottom", "all"
|
||||
thick = floor thickness
|
||||
*/
|
||||
|
||||
module hd_holes(hd, orientation, side, thick) {
|
||||
|
||||
hd25_x = 100;
|
||||
hd25_y = 69.85;
|
||||
hd35_x = 147;
|
||||
hd35_y = 101.6;
|
||||
hd35_z = 26.1;
|
||||
adj = .01;
|
||||
$fn = 90;
|
||||
|
||||
if(hd == 2.5) {
|
||||
if(orientation == "portrait") {
|
||||
translate([0,hd25_x,0]) rotate([0,0,270]) union() {
|
||||
if(side == "left" || side == "both" || side == "all") {
|
||||
translate([9.4,-thick,3]) rotate([270,0,0]) cylinder(d=3.6,h=thick);
|
||||
translate([86,-thick,3]) rotate([270,0,0]) cylinder(d=3.6,h=thick);
|
||||
}
|
||||
if(side == "right" || side == "both" || side == "all") {
|
||||
translate([9.4,hd25_y+thick,3]) rotate([90,0,0]) cylinder(d=3.6,h=thick);
|
||||
translate([86,hd25_y+thick,3]) rotate([90,0,0]) cylinder(d=3.6,h=thick);
|
||||
}
|
||||
if(side == "bottom" || side == "all") {
|
||||
translate([9.4,4.07,0]) cylinder(d=3.6,h=thick);
|
||||
translate([86,4.07,0]) cylinder(d=3.6,h=thick);
|
||||
translate([86,65.79,0]) cylinder(d=3.6,h=thick);
|
||||
translate([9.4,65.79,0]) cylinder(d=3.6,h=thick);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(orientation == "landscape") {
|
||||
if(side == "left" || side == "both" || side == "all") {
|
||||
translate([9.4,-thick,3]) rotate([270,0,0]) cylinder(d=3.6,h=thick);
|
||||
translate([86,-thick,3]) rotate([270,0,0]) cylinder(d=3.6,h=thick);
|
||||
}
|
||||
if(side == "right" || side == "both" || side == "all") {
|
||||
translate([9.4,hd25_y+thick,3]) rotate([90,0,0]) cylinder(d=3.6,h=thick);
|
||||
translate([86,hd25_y+thick,3]) rotate([90,0,0]) cylinder(d=3.6,h=thick);
|
||||
}
|
||||
if(side == "bottom" || side == "all") {
|
||||
translate([9.4,4.07,-thick]) cylinder(d=3.6,h=thick);
|
||||
translate([86,4.07,-thick]) cylinder(d=3.6,h=thick);
|
||||
translate([86,65.79,-thick]) cylinder(d=3.6,h=thick);
|
||||
translate([9.4,65.79,-thick]) cylinder(d=3.6,h=thick);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(hd == 3.5) {
|
||||
if(orientation == "portrait") {
|
||||
translate([0,hd35_x,0]) rotate([0,0,270]) union() {
|
||||
if(side == "left" || side == "both" || side == "all") {
|
||||
translate([16.9,-thick,6.35]) rotate([270,0,0]) cylinder(d=3,h=thick);
|
||||
translate([76.6,-thick,6.35]) rotate([270,0,0]) cylinder(d=3,h=thick);
|
||||
translate([118.5,-thick,6.35]) rotate([270,0,0]) cylinder(d=3,h=thick);
|
||||
}
|
||||
if(side == "right" || side == "both" || side == "all") {
|
||||
translate([118.5,hd35_y+thick,6.35]) rotate([90,0,0]) cylinder(d=3,h=thick);
|
||||
translate([76.6,hd35_y+thick,6.35]) rotate([90,0,0]) cylinder(d=3,h=thick);
|
||||
translate([16.9,hd35_y+thick,6.35]) rotate([90,0,0]) cylinder(d=3,h=thick);
|
||||
}
|
||||
if(side == "bottom" || side == "all") {
|
||||
// landscape 3.5" bottom screw holes
|
||||
translate([29.52,3.18,0]) cylinder(d=3.6,h=thick);
|
||||
translate([61.27,3.18,0]) cylinder(d=3.6,h=thick);
|
||||
translate([105.72,3.18,0]) cylinder(d=3.6,h=thick);
|
||||
translate([29.52,98.43,0]) cylinder(d=3.6,h=thick);
|
||||
translate([61.27,98.43,0]) cylinder(d=3.6,h=thick);
|
||||
translate([105.72,98.43,0]) cylinder(d=3.6,h=thick);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(orientation == "landscape") {
|
||||
if(side == "left" || side == "both" || side == "all") {
|
||||
translate([16.9,-thick,6.35]) rotate([270,0,0]) cylinder(d=3,h=thick);
|
||||
translate([76.6,-thick,6.35]) rotate([270,0,0]) cylinder(d=3,h=thick);
|
||||
translate([118.5,-thick,6.35]) rotate([270,0,0]) cylinder(d=3,h=thick);
|
||||
}
|
||||
if(side == "right" || side == "both" || side == "all") {
|
||||
translate([118.5,hd35_y+thick,6.35]) rotate([90,0,0]) cylinder(d=3,h=thick);
|
||||
translate([76.6,hd35_y+thick,6.35]) rotate([90,0,0]) cylinder(d=3,h=thick);
|
||||
translate([16.9,hd35_y+thick,6.35]) rotate([90,0,0]) cylinder(d=3,h=thick);
|
||||
}
|
||||
if(side == "bottom" || side == "all") {
|
||||
// landscape 3.5" bottom screw holes
|
||||
translate([29.52,3.18,-thick]) cylinder(d=3.6,h=thick);
|
||||
translate([61.27,3.18,-thick]) cylinder(d=3.6,h=thick);
|
||||
translate([105.72,3.18,-thick]) cylinder(d=3.6,h=thick);
|
||||
translate([29.52,98.43,-thick]) cylinder(d=3.6,h=thick);
|
||||
translate([61.27,98.43,-thick]) cylinder(d=3.6,h=thick);
|
||||
translate([105.72,98.43,-thick]) cylinder(d=3.6,h=thick);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: hd_mount
|
||||
DESCRIPTION: creates 2.5" and 3.5" hard drive mounts
|
||||
TODO: none
|
||||
|
||||
USAGE: hd_mount(hd, orientation, position, side)
|
||||
|
||||
hd = 2.5, 3.5
|
||||
orientation = "portrait", "landscape"
|
||||
position = "vertical", "horizontal"
|
||||
side = "left", "right"
|
||||
*/
|
||||
|
||||
module hd_mount(hd, orientation, position, side) {
|
||||
|
||||
adj = .01;
|
||||
$fn = 90;
|
||||
|
||||
if(hd == 2.5) {
|
||||
if(orientation == "portrait") {
|
||||
if(position == "vertical") {
|
||||
if(side == "left") {
|
||||
translate([0,14,0]) rotate([0,0,0]) hd25_vtab("right");
|
||||
translate([0,90.6,0]) rotate([0,0,0]) hd25_vtab("right");
|
||||
}
|
||||
else { // right
|
||||
translate([0,14,0]) rotate([0,0,0]) hd25_vtab("left");
|
||||
translate([0,90.6,0]) rotate([0,0,0]) hd25_vtab("left");
|
||||
}
|
||||
}
|
||||
else {
|
||||
translate([-.5,14,0]) hd25_tab("left");
|
||||
translate([-.5,90.6,0]) hd25_tab("left");
|
||||
translate([70.35,14,0]) hd25_tab("right");
|
||||
translate([70.35,90.6,0]) hd25_tab("right");
|
||||
}
|
||||
}
|
||||
if(orientation == "landscape") {
|
||||
if(position == "vertical") {
|
||||
if(side == "left") {
|
||||
translate([9.4,0,0]) rotate([0,0,90]) hd25_vtab("right");
|
||||
translate([86,0,0]) rotate([0,0,90]) hd25_vtab("right");
|
||||
}
|
||||
else { // right
|
||||
translate([9.4,0,0]) rotate([0,0,90]) hd25_vtab("left");
|
||||
translate([86,0,0]) rotate([0,0,90]) hd25_vtab("left");
|
||||
}
|
||||
}
|
||||
else {
|
||||
translate([9.4,4.07-4.5,0]) rotate([0,0,90]) hd25_tab("left");
|
||||
translate([86,4.07-4.5,0]) rotate([0,0,90]) hd25_tab("left");
|
||||
translate([86,65.79+4.5,0]) rotate([0,0,90]) hd25_tab("right");
|
||||
translate([9.4,65.79+4.5,0]) rotate([0,0,90]) hd25_tab("right");
|
||||
}
|
||||
}
|
||||
}
|
||||
if(hd == 3.5) {
|
||||
if(orientation == "portrait") {
|
||||
if(position == "vertical") {
|
||||
if(side == "left") {
|
||||
translate([0,41.28,0]) rotate([0,0,0]) hd35_vtab("right");
|
||||
translate([0,41.28+44.45,0]) rotate([0,0,0]) hd35_vtab("right");
|
||||
translate([0,41.28+76.20,0]) rotate([0,0,0]) hd35_vtab("right");
|
||||
}
|
||||
else { // right
|
||||
translate([0,41.28,0]) rotate([0,0,0]) hd35_vtab("left");
|
||||
translate([0,41.28+44.45,0]) rotate([0,0,0]) hd35_vtab("left");
|
||||
translate([0,41.28+76.20,0]) rotate([0,0,0]) hd35_vtab("left");
|
||||
}
|
||||
}
|
||||
else {
|
||||
translate([-.5,28.5,0]) hd35_tab("left");
|
||||
translate([-.5,69.75,0]) hd35_tab("left");
|
||||
translate([-.5,130.1,0]) hd35_tab("left");
|
||||
translate([101.6+.5,28.5,0]) hd35_tab("right");
|
||||
translate([101.6+.5,69.75,0]) hd35_tab("right");
|
||||
translate([101.6+.5,130.1,0]) hd35_tab("right");
|
||||
}
|
||||
}
|
||||
if(orientation == "landscape") {
|
||||
if(position == "vertical") {
|
||||
if(side == "left") {
|
||||
translate([9.4,0,0]) rotate([0,0,90]) hd35_vtab("right");
|
||||
translate([86,0,0]) rotate([0,0,90]) hd35_vtab("right");
|
||||
}
|
||||
else { // right
|
||||
translate([9.4,0,0]) rotate([0,0,90]) hd35_vtab("left");
|
||||
translate([86,0,0]) rotate([0,0,90]) hd35_vtab("left");
|
||||
}
|
||||
}
|
||||
else {
|
||||
translate([16.9,-.5,0]) rotate([0,0,90]) hd35_tab("left");
|
||||
translate([76.6,-.5,0]) rotate([0,0,90]) hd35_tab("left");
|
||||
translate([118.5,-.5,0]) rotate([0,0,90]) hd35_tab("left");
|
||||
translate([16.9,101.6-.5,0]) rotate([0,0,90]) hd35_tab("right");
|
||||
translate([76.6,101.6-.5,0]) rotate([0,0,90]) hd35_tab("right");
|
||||
translate([118.5,101.6-.5,0]) rotate([0,0,90]) hd35_tab("right");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
439
lib/holder.scad
Normal file
439
lib/holder.scad
Normal file
@@ -0,0 +1,439 @@
|
||||
/*
|
||||
This file is part of SBC Case Builder https://github.com/hominoids/SBC_Case_Builder
|
||||
Copyright 2022,2023,2024 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
nut_holder(nut, style, dia_x, dia_y, height)
|
||||
pcb_holder(size, wallthick)
|
||||
vu_holder(vu_model, side, vesa, cheight)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
NAME: nut_holder
|
||||
DESCRIPTION: creates various nut holders
|
||||
TODO: none
|
||||
|
||||
USAGE: nut_holder(nut, style, dia_x, dia_y, height, mask)
|
||||
|
||||
nut = "m2", "m2.5", "m3", "m4"
|
||||
style = "default", "sloped", "trap"
|
||||
dia_x = top diameter or x size in mm
|
||||
dia_y = bottom diameter or y size in mm
|
||||
height = holder height in mm
|
||||
mask[0] = true enables component mask
|
||||
mask[1] = mask length
|
||||
mask[2] = mask setback
|
||||
mask[3] = mstyle "default"
|
||||
|
||||
*/
|
||||
|
||||
module nut_holder(nut, style, dia_x, dia_y, height, mask) {
|
||||
|
||||
nuts = [[2,4,1.6], // m2 size, diameter, height
|
||||
[2.5,5,2], // m2.5 size, diameter, height
|
||||
[3,5.5,2.4], // m3 size, diameter, height
|
||||
[4,7,3.2]]; // m4 size, diameter, height
|
||||
|
||||
enablemask = mask[0];
|
||||
mlength = mask[1];
|
||||
msetback = mask[2];
|
||||
mstyle = mask[3];
|
||||
|
||||
adj = .01;
|
||||
$fn = 90;
|
||||
|
||||
if(enablemask == true && mstyle == "default") {
|
||||
if(nut == "m2") {
|
||||
translate([0, 0, -mlength+msetback]) cylinder(d = nuts[0][0], h = mlength);
|
||||
}
|
||||
if(nut == "m2.5") {
|
||||
translate([0, 0, -mlength+msetback]) cylinder(d = nuts[1][0], h = mlength);
|
||||
}
|
||||
if(nut == "m3") {
|
||||
translate([0, 0, -mlength+msetback]) cylinder(d = nuts[2][0], h = mlength);
|
||||
}
|
||||
if(nut == "m4") {
|
||||
translate([0, 0, -mlength+msetback]) cylinder(d = nuts[3][0], h = mlength);
|
||||
}
|
||||
}
|
||||
if(enablemask == false) {
|
||||
|
||||
if( style == "default") {
|
||||
difference() {
|
||||
cylinder(d=dia_x, h=height);
|
||||
if(nut == "m2") {
|
||||
translate([0, 0, -1]) cylinder(d=nuts[0][0]+.25, h=height+2);
|
||||
translate([0, 0, 2]) cylinder(d=nuts[0][1]*2/sqrt(3), h=height, $fn=6);
|
||||
}
|
||||
if(nut == "m2.5") {
|
||||
translate([0, 0, -1]) cylinder(d=nuts[1][0]+.25, h=height+2);
|
||||
translate([0, 0, 2]) cylinder(d=nuts[1][1]*2/sqrt(3), h=height, $fn=6);
|
||||
}
|
||||
if(nut == "m3") {
|
||||
translate([0, 0, -1]) cylinder(d=nuts[2][0]+.5, h=height+2);
|
||||
translate([0, 0, 2]) cylinder(d=nuts[2][1]*2/sqrt(3), h=height, $fn=6);
|
||||
}
|
||||
if(nut == "m4") {
|
||||
translate([0, 0, -1]) cylinder(d=nuts[3][0]+.5, h=height+2);
|
||||
translate([0, 0, 2]) cylinder(d=nuts[3][1]*2/sqrt(3), h=height, $fn=6);
|
||||
}
|
||||
}
|
||||
}
|
||||
if( style == "sloped") {
|
||||
difference() {
|
||||
cylinder(d2=dia_x, d1=dia_y, h=height);
|
||||
if(nut == "m2") {
|
||||
translate([0, 0, -1]) cylinder(d=nuts[0][0]+.25, h=height+2);
|
||||
translate([0, 0, 2]) cylinder(d=nuts[0][1]*2/sqrt(3), h=height, $fn=6);
|
||||
}
|
||||
if(nut == "m2.5") {
|
||||
translate([0, 0, -1]) cylinder(d=nuts[1][0]+.25, h=height+2);
|
||||
translate([0, 0, 2]) cylinder(d=nuts[1][1]*2/sqrt(3), h=height, $fn=6);
|
||||
}
|
||||
if(nut == "m3") {
|
||||
translate([0, 0, -1]) cylinder(d=nuts[2][0]+.5, h=height+2);
|
||||
translate([0, 0, 2]) cylinder(d=nuts[2][1]*2/sqrt(3), h=height, $fn=6);
|
||||
}
|
||||
if(nut == "m4") {
|
||||
translate([0, 0, -1]) cylinder(d=nuts[3][0]+.5, h=height+2);
|
||||
translate([0, 0, 2]) cylinder(d=nuts[3][1]*2/sqrt(3), h=height, $fn=6);
|
||||
}
|
||||
}
|
||||
}
|
||||
if( style == "trap") {
|
||||
if(nut == "m2") {
|
||||
difference() {
|
||||
translate([-dia_x/2, -dia_y/2, 0]) cube([dia_x, dia_y, height]);
|
||||
translate([0, 0, -1]) cylinder(d=nuts[0][0]+.25, h=height+2);
|
||||
translate([0, 0, 2]) rotate([0,0,30]) cylinder(d=nuts[0][1]*2/sqrt(3), h=nuts[0][2], $fn=6);
|
||||
translate([-nuts[0][1]/2, 0, 2]) cube([nuts[0][1], dia_x, nuts[0][2]]);
|
||||
}
|
||||
}
|
||||
if(nut == "m2.5") {
|
||||
difference() {
|
||||
translate([-dia_x/2, -dia_y/2, 0]) cube([dia_x, dia_y, height]);
|
||||
translate([0, 0, -1]) cylinder(d=nuts[1][0]+.325, h=height+2);
|
||||
translate([0, 0, 2]) rotate([0,0,30]) cylinder(d=nuts[1][1]*2/sqrt(3), h=nuts[1][2], $fn=6);
|
||||
translate([-nuts[1][1]/2, 0, 2]) cube([nuts[1][1], dia_x, nuts[1][2]]);
|
||||
}
|
||||
}
|
||||
if(nut == "m3") {
|
||||
difference() {
|
||||
translate([-dia_x/2, -dia_y/2, 0]) cube([dia_x, dia_y, height]);
|
||||
translate([0, 0, -1]) cylinder(d=nuts[2][0]+.5, h=height+2);
|
||||
translate([0, 0, 2]) rotate([0,0,30]) cylinder(d=nuts[2][1]*2/sqrt(3), h=nuts[2][2], $fn=6);
|
||||
translate([-nuts[2][1]/2, 0, 2]) cube([nuts[2][1], dia_x, nuts[2][2]]);
|
||||
}
|
||||
}
|
||||
if(nut == "m4") {
|
||||
difference() {
|
||||
translate([-dia_x/2, -dia_y/2, 0]) cube([dia_x, dia_y, height]);
|
||||
translate([0, 0, -1]) cylinder(d=nuts[3][0]+.5, h=height+2);
|
||||
translate([0, 0, 2]) rotate([0,0,30]) cylinder(d=nuts[3][1]*2/sqrt(3), h=nuts[3][2], $fn=6);
|
||||
translate([-nuts[3][1]/2, 0, 2]) cube([nuts[3][1], dia_x, nuts[3][2]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: pcb_holder
|
||||
DESCRIPTION: pcb bottom edge holder
|
||||
TODO: none
|
||||
|
||||
USAGE: pcb_holder(size, wallthick)
|
||||
|
||||
size = width of holder
|
||||
wallthick = holder wall thickness
|
||||
*/
|
||||
|
||||
module pcb_holder(size, wallthick) {
|
||||
|
||||
adj=.01;
|
||||
$fn = 90;
|
||||
difference() {
|
||||
union() {
|
||||
translate([-1.85,-1.75,0]) cube([size[0]+3.5,5,6]);
|
||||
translate([size[0]+1.65,-5.75,1])
|
||||
rotate([0,-90,0])
|
||||
linear_extrude(height = size[0]+3.5)
|
||||
polygon(points = [ [-wallthick/2,-wallthick/2],
|
||||
[2,wallthick],
|
||||
[4,4],
|
||||
[-wallthick/2,4]]);
|
||||
translate([-1.85,4,1])
|
||||
rotate([0,-90,180])
|
||||
linear_extrude(height = size[0]+3.5)
|
||||
polygon(points = [ [-wallthick/2,-wallthick/2],
|
||||
[2,wallthick],
|
||||
[2,2],
|
||||
[-wallthick/2,2]]);
|
||||
}
|
||||
translate([-.5,0,2]) cube([size[0]+1,size[2],5]);
|
||||
translate([6,-adj-5-1.75,-adj]) cube([size[0]-12,14,8]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: vu_holder
|
||||
DESCRIPTION: hk vu5,vu5a,vu7,vu7a display holder
|
||||
TODO: none
|
||||
|
||||
USAGE: vu_holder(vu_model, side, vesa, cheight)
|
||||
|
||||
vu_model = "vu5", "vu7"
|
||||
side = "left", "right"
|
||||
vesa = 75 for vu5, 100 for vu7
|
||||
cheight = case_z+90 for vu5, case_z+122 for vu7
|
||||
*/
|
||||
|
||||
module vu_holder(vu_model, side, vesa, cheight) {
|
||||
|
||||
//cheight = case_z+90;
|
||||
v_fillet = 3;
|
||||
|
||||
vu5_case_x_offset = 6.5; // for uniform front vu5=6.5, vu7=20
|
||||
vu5_pcb_width = 121;
|
||||
vu5_pcb_height = 93.31;
|
||||
vu5_width = vu5_pcb_width + vu5_case_x_offset;
|
||||
vu5_height = vu5_pcb_height + 9.75;
|
||||
|
||||
vu7_case_x_offset = 20; // for uniform front vu5=6.5, vu7=20
|
||||
vu7_pcb_width = 172.90;
|
||||
vu7_pcb_height = 124.27;
|
||||
vu7_width = vu7_pcb_width + vu7_case_x_offset;
|
||||
vu7_height = vu7_pcb_height + 9.75;
|
||||
vu_rotation = [15,0,0];
|
||||
|
||||
difference() {
|
||||
union() {
|
||||
if(side == "right") {
|
||||
translate([width-wallthick-gap,-(2*wallthick)-gap,0])
|
||||
cube([sidethick,depth+2*wallthick,cheight]);
|
||||
// right tabs for vu5 attachment
|
||||
if(vu_model == "vu5") {
|
||||
translate([(width/2)+((width-vesa)/2)+(vesa/2)-sidethick,depth-39,
|
||||
case_z+80]) rotate([75,180,0])
|
||||
slab_r([((width-vesa)/2)+4.5,10,sidethick], [.01,.01,3,3]);
|
||||
translate([(width/2)+((width-vesa)/2)+(vesa/2)-sidethick,depth-26,
|
||||
case_z+31.5]) rotate([75,180,0])
|
||||
slab_r([((width-vesa)/2)+4.5,10,sidethick], [.01,.01,3,3]);
|
||||
|
||||
translate([(width/2)+((width-vesa)/2)+(vesa/2)-sidethick-1.5,depth-40.85-adj,
|
||||
case_z+79.5]) rotate([75,180,0])
|
||||
difference() {
|
||||
cube([sidethick,10,sidethick]);
|
||||
translate([0,-adj,sidethick]) rotate([0,45,0])
|
||||
cube([2*sidethick,10+(2*adj),sidethick]);
|
||||
}
|
||||
translate([(width/2)+((width-vesa)/2)+(vesa/2)-sidethick-1.5,depth-27.85-adj,
|
||||
case_z+31]) rotate([75,180,0])
|
||||
difference() {
|
||||
cube([sidethick,10,sidethick]);
|
||||
translate([0,-adj,sidethick]) rotate([0,45,0])
|
||||
cube([2*sidethick,10+(2*adj),sidethick]);
|
||||
}
|
||||
}
|
||||
// right tabs for vu7 attachment
|
||||
if(vu_model == "vu7") {
|
||||
translate([(width/2)+((width-vesa)/2)+(vesa/2)-sidethick-1,depth-49.40,
|
||||
case_z+vu7_height-15]) rotate([75,180,0])
|
||||
slab_r([((width-vesa)/2)+12,10,sidethick], [.01,.01,3,3]);
|
||||
translate([(width/2)+((width-vesa)/2)+(vesa/2)-sidethick-1,depth-23.60,
|
||||
case_z+22.5]) rotate([75,180,0])
|
||||
slab_r([((width-vesa)/2)+12,10,sidethick], [.01,.01,3,3]);
|
||||
|
||||
translate([(width/2)+((width-vesa)/2)+(vesa/2)-sidethick-1.5,depth-51.25,
|
||||
case_z+vu7_height-15.5]) rotate([75,180,0])
|
||||
difference() {
|
||||
cube([sidethick,10,sidethick]);
|
||||
translate([0,-adj,sidethick]) rotate([0,45,0])
|
||||
cube([2*sidethick,10+(2*adj),sidethick]);
|
||||
}
|
||||
translate([(width/2)+((width-vesa)/2)+(vesa/2)-sidethick-1.5,depth-25.5,
|
||||
case_z+21.8]) rotate([75,180,0])
|
||||
difference() {
|
||||
cube([sidethick,10,sidethick]);
|
||||
translate([0,-adj,sidethick]) rotate([0,45,0])
|
||||
cube([2*sidethick,10+(2*adj),sidethick]);
|
||||
}
|
||||
}
|
||||
// top rail
|
||||
translate([width-6.9-adj,-gap,case_z-floorthick-.5])
|
||||
cube([4,depth-2*(wallthick+gap),2]);
|
||||
}
|
||||
if(side == "left") {
|
||||
translate([-wallthick-gap-sidethick,-(2*wallthick)-gap,0])
|
||||
cube([sidethick,depth+2*wallthick,cheight]);
|
||||
// left tabs for vu5 attachment
|
||||
if(vu_model == "vu5") {
|
||||
translate([-((width-vesa)/2)+(width/2)-(vesa/2)-3.5-adj,depth-36.4,
|
||||
case_z+70]) rotate([105,0,0])
|
||||
slab_r([((width-vesa)/2)+4,10, sidethick], [.01,.01,3,3]);
|
||||
translate([-((width-vesa)/2)+(width/2)-(vesa/2)-3.5-adj,depth-23.5,
|
||||
case_z+22]) rotate([105,0,0])
|
||||
slab_r([((width-vesa)/2)+4,10,sidethick], [.01,.01,3,3]);
|
||||
translate([-((width-vesa)/2)+(width/2)-(vesa/2)-3.5-adj,depth-38.35+adj,
|
||||
case_z+69.5]) rotate([105,0,0])
|
||||
difference() {
|
||||
cube([sidethick,10,sidethick]);
|
||||
translate([0,-adj,sidethick]) rotate([0,45,0])
|
||||
cube([2*sidethick,10+(2*adj),2*sidethick]);
|
||||
}
|
||||
translate([-((width-vesa)/2)+(width/2)-(vesa/2)-3.5-adj,depth-25.4+adj,
|
||||
case_z+21.5]) rotate([105,0,0])
|
||||
difference() {
|
||||
cube([sidethick,10,sidethick]);
|
||||
translate([0,-adj,sidethick]) rotate([0,45,0])
|
||||
cube([2*sidethick,10+(2*adj),2*sidethick]);
|
||||
}
|
||||
}
|
||||
// left tabs for vu7 attachment
|
||||
if(vu_model == "vu7") {
|
||||
translate([-((width-vesa)/2)+(width/2)-(vesa/2)-4.25-adj,depth-46.85,
|
||||
case_z+vu7_height-24.5]) rotate([105,0,0])
|
||||
slab_r([((width-vesa)/2),10, sidethick], [.01,.01,3,3]);
|
||||
translate([-((width-vesa)/2)+(width/2)-(vesa/2)-4.25-adj,depth-21,
|
||||
case_z+13]) rotate([105,0,0])
|
||||
slab_r([((width-vesa)/2),10,sidethick], [.01,.01,3,3]);
|
||||
translate([-((width-vesa)/2)+(width/2)-(vesa/2)-3.5-adj,depth-48.75+adj,
|
||||
case_z+vu7_height-25]) rotate([105,0,0])
|
||||
difference() {
|
||||
cube([sidethick,10,sidethick]);
|
||||
translate([0,-adj,sidethick]) rotate([0,45,0])
|
||||
cube([2*sidethick,10+(2*adj),2*sidethick]);
|
||||
}
|
||||
translate([-((width-vesa)/2)+(width/2)-(vesa/2)-3.5-adj,depth-22.65+adj,
|
||||
case_z+12.5]) rotate([105,0,0])
|
||||
difference() {
|
||||
cube([sidethick,10,sidethick]);
|
||||
translate([0,-adj,sidethick]) rotate([0,45,0])
|
||||
cube([2*sidethick,10+(2*adj),2*sidethick]);
|
||||
}
|
||||
}
|
||||
// top rail
|
||||
translate([-wallthick-gap-adj,-gap,case_z-floorthick-.5])
|
||||
cube([4,depth-2*(wallthick+gap),2]);
|
||||
}
|
||||
}
|
||||
|
||||
if(side == "right") {
|
||||
// vu5 shape and back cut
|
||||
if(vu_model == "vu5") {
|
||||
translate([width+adj,-.6,case_z+sidethick+2.5])
|
||||
rotate([0,-90,0])
|
||||
linear_extrude(height = 3*sidethick)
|
||||
polygon(points = [ [-sidethick,-sidethick-wallthick-5],
|
||||
[cheight-bottom_height-top_height-3,-sidethick-wallthick-5],
|
||||
[cheight-bottom_height-top_height-3,depth-53],
|
||||
[-sidethick,depth-33]]);
|
||||
|
||||
translate([width-(sidethick/2),depth-8,case_z+(121/2)])
|
||||
rotate([vu_rotation[0],0,0])
|
||||
cube_fillet_inside([10,50,110],vertical=[v_fillet,v_fillet,v_fillet,v_fillet],
|
||||
top=[0,0,0,0],bottom=[3,3,3,3], $fn=90);
|
||||
// tab holes
|
||||
translate([width/2+(vesa/2)-3,depth-37,
|
||||
case_z+75]) rotate([75,180,0]) cylinder(d=3, h=sidethick+1);
|
||||
translate([width/2+(vesa/2)-3,depth-24,
|
||||
case_z+26.75]) rotate([75,180,0]) cylinder(d=3, h=sidethick+1);
|
||||
}
|
||||
// vu7 shape and back cut
|
||||
if(vu_model == "vu7") {
|
||||
translate([width+adj,-.6,case_z+sidethick+2.5])
|
||||
rotate([0,-90,0])
|
||||
linear_extrude(height = 2*sidethick)
|
||||
polygon(points = [ [-sidethick,-sidethick-wallthick-5],
|
||||
[cheight-bottom_height-top_height-3,-sidethick-wallthick-5],
|
||||
[cheight-bottom_height-top_height-3,depth-63],
|
||||
[-sidethick,depth-33]]);
|
||||
|
||||
translate([width-(sidethick/2),depth-10.5,case_z+70.5])
|
||||
rotate([vu_rotation[0],0,0])
|
||||
cube_fillet_inside([10,50,130],vertical=[v_fillet,v_fillet,v_fillet,v_fillet],
|
||||
top=[0,0,0,0],bottom=[3,3,3,3], $fn=90);
|
||||
// tab holes
|
||||
translate([width/2+(vesa/2)-10,depth-47,case_z+vu7_height-19.75])
|
||||
rotate([75,180,0]) cylinder(d=3, h=sidethick+4);
|
||||
translate([width/2+(vesa/2)-10,depth-21.25,case_z+18])
|
||||
rotate([75,180,0]) cylinder(d=3, h=sidethick+4);
|
||||
}
|
||||
// bottom attachment holes
|
||||
translate([width-wallthick-gap-adj-5,wallthick+gap+10,
|
||||
((bottom_height+floorthick)/2)-1]) rotate([0,90,0]) cylinder(d=3, h=sidethick+(2*adj)+10);
|
||||
translate([width-wallthick-gap-adj-5,depth-wallthick-gap-10,
|
||||
((bottom_height+floorthick)/2)-1]) rotate([0,90,0]) cylinder(d=3, h=sidethick+(2*adj)+10);
|
||||
}
|
||||
|
||||
if(side == "left") {
|
||||
// vu5 shape and back cut
|
||||
if(vu_model == "vu5") {
|
||||
translate([-sidethick+adj,-.6,case_z+sidethick+2.5])
|
||||
rotate([0,-90,0])
|
||||
linear_extrude(height = 3*sidethick)
|
||||
polygon(points = [ [-sidethick,-sidethick-wallthick-5],
|
||||
[cheight-bottom_height-top_height-3,-sidethick-wallthick-5],
|
||||
[cheight-bottom_height-top_height-3,depth-53],
|
||||
[-sidethick,depth-33]]);
|
||||
|
||||
translate([-wallthick-gap-(sidethick/2),depth-8,case_z+(121/2)])
|
||||
rotate([vu_rotation[0],0,0])
|
||||
cube_fillet_inside([10,50,110],vertical=[v_fillet,v_fillet,v_fillet,v_fillet],
|
||||
top=[0,0,0,0],bottom=[3,3,3,3], $fn=90);
|
||||
// tab holes
|
||||
translate([width/2-(vesa/2)-3,depth-36.75,case_z+75])
|
||||
rotate([105,0,0]) cylinder(d=3, h=sidethick+1);
|
||||
translate([width/2-(vesa/2)-3,depth-24.25,case_z+26.75])
|
||||
rotate([75,0,0]) cylinder(d=3, h=sidethick+1);
|
||||
}
|
||||
// vu7 shape and back cut
|
||||
if(vu_model == "vu7") {
|
||||
translate([-sidethick+adj,-.6,case_z+sidethick+2.5])
|
||||
rotate([0,-90,0])
|
||||
linear_extrude(height = 2*sidethick)
|
||||
polygon(points = [ [-sidethick,-sidethick-wallthick-5],
|
||||
[cheight-bottom_height-top_height-3,-sidethick-wallthick-5],
|
||||
[cheight-bottom_height-top_height-3,depth-63],
|
||||
[-sidethick,depth-33]]);
|
||||
|
||||
translate([-wallthick-gap-(sidethick/2),depth-10.5,case_z+70.5])
|
||||
rotate([vu_rotation[0],0,0])
|
||||
cube_fillet_inside([10,50,130],vertical=[v_fillet,v_fillet,v_fillet,v_fillet],
|
||||
top=[0,0,0,0],bottom=[3,3,3,3], $fn=90);
|
||||
// tab holes
|
||||
translate([width/2-(vesa/2)-10,depth-48,case_z+vu7_height-19.75])
|
||||
rotate([105,0,0]) cylinder(d=3, h=sidethick+4);
|
||||
translate([width/2-(vesa/2)-10,depth-22.25,case_z+18])
|
||||
rotate([105,0,0]) cylinder(d=3, h=sidethick+4);
|
||||
}
|
||||
// bottom attachment holes
|
||||
translate([-sidethick-adj-6,wallthick+gap+10,((bottom_height+floorthick)/2)-1])
|
||||
rotate([0,90,0]) cylinder(d=3, h=sidethick+(2*adj)+10);
|
||||
if(depth >= 75) {
|
||||
translate([-sidethick-adj-6,depth-wallthick-gap-10,
|
||||
((bottom_height+floorthick)/2)-1]) rotate([0,90,0]) cylinder(d=3, h=sidethick+(2*adj)+10);
|
||||
}
|
||||
else {
|
||||
translate([-sidethick-adj-6,wallthick+gap+40.5,((bottom_height+floorthick)/2)-1])
|
||||
rotate([0,90,0]) cylinder(d=3, h=sidethick+(2*adj)+10);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
84
lib/keyhole.scad
Normal file
84
lib/keyhole.scad
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
This file is part of SBC Case Builder https://github.com/hominoids/SBC_Case_Builder
|
||||
Copyright 2022,2023,2024 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
NAME: keyhole
|
||||
DESCRIPTION: enclosed keyhole
|
||||
TODO: none
|
||||
|
||||
USAGE: keyhole(keysize, mask)
|
||||
|
||||
keysize[0] = size_x
|
||||
keysize[1] = size_y
|
||||
keysize[2] = size_z
|
||||
mask[0] = true enables component mask
|
||||
mask[1] = mask length
|
||||
mask[2] = mask setback
|
||||
mask[3] = mstyle "default"
|
||||
*/
|
||||
|
||||
module keyhole(keysize, mask) {
|
||||
|
||||
enablemask = mask[0];
|
||||
mlength = mask[1];
|
||||
msetback = mask[2];
|
||||
mstyle = mask[3];
|
||||
adj=.01;
|
||||
$fn = 90;
|
||||
|
||||
if(enablemask == true && mstyle == "default") {
|
||||
union() {
|
||||
translate([0, 0, -adj]) cylinder(h=keysize[3]+2*adj, d=keysize[0]);
|
||||
translate([-keysize[1]/2, 0, -adj]) cube([keysize[1], keysize[2]+keysize[0]/2, keysize[3]+2*adj]);
|
||||
translate([0, -keysize[1]/2, -adj]) cube([keysize[2]+keysize[0]/2, keysize[1], keysize[3]+2*adj]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
difference() {
|
||||
union() {
|
||||
translate([0, 0, -adj])
|
||||
difference() {
|
||||
difference() {
|
||||
translate([-keysize[2], -keysize[2], keysize[3]]) cube([keysize[2]*3, keysize[2]*3, 4.5]);
|
||||
translate([0, -10, 0]) rotate([0, 0, 135]) cube([20, 10, 10]);
|
||||
translate([keysize[2], keysize[2], -adj]) cube([keysize[2]*3, keysize[2]*3, keysize[3]+5]);
|
||||
}
|
||||
difference() {
|
||||
translate([-keysize[2]+2, -keysize[2]+2, keysize[3]-adj])
|
||||
cube([-4+keysize[2]*3, -4+keysize[2]*3, 3.5]);
|
||||
translate([2, -10, 0]) rotate([0, 0, 135]) cube([20, 10, 10]);
|
||||
translate([+keysize[2]-2, keysize[2]-2, -adj])
|
||||
cube([keysize[2]*3, keysize[2]*3, keysize[3]+5]);
|
||||
}
|
||||
}
|
||||
difference() {
|
||||
translate([-keysize[2], -keysize[2], 0]) cube([keysize[2]*3, keysize[2]*3, keysize[3]]);
|
||||
translate([0, -10, -adj]) rotate([0, 0, 135]) cube([20, 10, 10]);
|
||||
}
|
||||
}
|
||||
translate([keysize[2], keysize[2], -adj]) cube([keysize[2]*3, keysize[2]*3, keysize[3]+2*adj]);
|
||||
union() {
|
||||
translate([0, 0, -adj]) cylinder(h=keysize[3]+2*adj, d=keysize[0]);
|
||||
translate([-keysize[1]/2, 0, -adj]) cube([keysize[1], keysize[2]+keysize[0]/2, keysize[3]+2*adj]);
|
||||
translate([0, -keysize[1]/2, -adj]) cube([keysize[2]+keysize[0]/2, keysize[1], keysize[3]+2*adj]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
86
lib/oem_adafruit.scad
Normal file
86
lib/oem_adafruit.scad
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
This file is part of SBC Case Builder https://github.com/hominoids/SBC_Case_Builder
|
||||
Copyright 2022,2023,2024 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
adafruit_lcd(mask)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
NAME: adafruit_lcd
|
||||
DESCRIPTION: adafruit 4311 2in TFT IPS Display model
|
||||
TODO: none
|
||||
|
||||
USAGE: adafruit_lcd(mask[])
|
||||
|
||||
mask[0] = true enables mask
|
||||
mask[1] = mask length
|
||||
mask[2] = mask setback
|
||||
mask[3] = mstyle "default"
|
||||
|
||||
*/
|
||||
|
||||
module adafruit_lcd(mask) {
|
||||
|
||||
size_x = 35.5;
|
||||
size_y = 59;
|
||||
size_z = 1.6;
|
||||
size_xm = size_x+1;
|
||||
size_ym = size_y+1;
|
||||
lcd_size = [34.75,48,2];
|
||||
corner_radius = 2;
|
||||
hole_size = 2.5;
|
||||
enablemask = mask[0];
|
||||
mlen = mask[1];
|
||||
back = mask[2];
|
||||
mstyle = mask[3];
|
||||
|
||||
adj = .01;
|
||||
$fn = 90;
|
||||
|
||||
if(enablemask == true && mstyle == "default") {
|
||||
translate([2.25, 11, size_z+2.5-back]) cube([lcd_size[0]-4, lcd_size[1]-7, mlen]);
|
||||
storage("microsdcard", 11, 44, 0, "bottom", 180, [size_x, size_z, size_y], [0], size_z, enablemask, [true, 20, 0, "default"]);
|
||||
fpc("fh19", .5, 22, 0, "bottom", 270, [18,0,0], ["smt","side","white","black"], size_z, enablemask, [true,10,2,"default"]);
|
||||
}
|
||||
if(enablemask == false) {
|
||||
difference() {
|
||||
union() {
|
||||
color("#252525") slab([size_x, size_y, size_z], corner_radius);
|
||||
color("black",1) translate([0.375, 5.75, size_z-adj]) cube([lcd_size[0], lcd_size[1], 2.5]);
|
||||
color("#353535",1) translate([.375, 9.25, size_z+2.5-adj]) cube([lcd_size[0], lcd_size[1]-4, .1]);
|
||||
color("dimgrey",1) translate([2.25, 11, size_z+2.5-adj]) cube([lcd_size[0]-4, lcd_size[1]-7, .2]);
|
||||
}
|
||||
color("#252525") translate([hole_size, size_y-hole_size, -adj]) cylinder(d=hole_size,h=6);
|
||||
color("#252525") translate([size_x-hole_size, size_y-hole_size, -adj]) cylinder(d=hole_size, h=4);
|
||||
for(i=[5:2.54:31]) {
|
||||
color("#fee5a6",1) translate([i, 2.5, -adj]) cylinder(d=.8, h=6);
|
||||
}
|
||||
}
|
||||
storage("microsdcard", 11, 44, 0, "bottom", 180, [size_x, size_z, size_y], [0], size_z, enablemask, [true, 20, 0, "default"]);
|
||||
ic("generic", 13.25, 9, 0, "bottom", 0, [4, 10, 1.75], ["dimgrey"], size_z, enablemask, [false, 20, 0, "default"]);
|
||||
fpc("fh19", .5, 22, 0, "bottom", 270, [18,0,0], ["smt","side","white","black"], size_z, enablemask, [true,10,2,"default"]);
|
||||
|
||||
for(i=[5:2.54:31]) {
|
||||
pcbpad("round", i, 2.5, 0, "top", 0, [1, 1, 0], [.8, "#fee5a6", 1.2], size_z, enablemask, [false, 20, 0, "default"]);
|
||||
}
|
||||
pcbpad("round", hole_size, size_y-hole_size, 0, "top", 0, [1, 1, 0],
|
||||
[hole_size, "#fee5a6", hole_size+1], size_z, enablemask, [false, 20, 0, "default"]);
|
||||
pcbpad("round", size_x-hole_size, size_y-hole_size, 0, "top", 0, [1, 1, 0],
|
||||
[hole_size, "#fee5a6", hole_size+1], size_z, enablemask, [false, 20, 0, "default"]);
|
||||
}
|
||||
}
|
||||
1628
lib/oem_hk.scad
Normal file
1628
lib/oem_hk.scad
Normal file
File diff suppressed because it is too large
Load Diff
1680
lib/sbc_library.scad
1680
lib/sbc_library.scad
File diff suppressed because it is too large
Load Diff
@@ -1,721 +0,0 @@
|
||||
/*
|
||||
SBC Data Library Copyright 2018,2019,2020,2021,2022 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
20190214 Version 1.0.0 sbc data set models "xu4","c2","n1","mc1","hc1","c1+","h2","rpi3b+","a64","rock64","rockpro64"
|
||||
20190218 Version 1.0.1 Added HK Odroid N2 as "n2"
|
||||
20200425 Version 1.0.2 Added AtomicPi as "atomicpi"
|
||||
Updated Odroid n2 sbc data
|
||||
Added Nvidia Jetson Nano as "jetsonnano"
|
||||
Updated Odroid h2 sbc data
|
||||
Added Odroid-C4 as "c4"
|
||||
Added Odroid-XU4Q as "xu4q"
|
||||
20200725 Version 1.0.3 Added Odroid-N2+ as "n2+"
|
||||
20201021 Version 1.0.4 Added Odroid-HC4 as "hc4"
|
||||
20220202 Version 1.0.5 Added HK Show2
|
||||
Updated Odroid-HC4 sbc data
|
||||
raised C4 hdmi, updated Odroid-XU4Q, add type sdcard_i, adjusted C2 usb
|
||||
20220413 Version 1.0.6 Added Odroid-M1 as m1, adjustments h2, c4 gpio
|
||||
20220515 Version 1.0.7 Added rockpro64, jetsonnano and other fixes and adjustments
|
||||
|
||||
see https://github.com/hominoids/SBC_Case_Builder
|
||||
|
||||
Instructions: All measurements from lower left corner of PCB to lower left
|
||||
corner of component or opening, holes measured to center. All measurements in mm.
|
||||
PCB orientation is long side of board along the x axis.
|
||||
Bottom components measured from top left corner to top left corner
|
||||
of component or opening with the PCB rotated around the x axis.
|
||||
|
||||
schema:
|
||||
"model",pcbsize_x, pcbsize_y, pcbsize_z, pcbcorner_radius, topmax_component_z, bottommax_component_z
|
||||
pcb_hole1_x, pcb_hole1_y, pcb1_hole_size, pcb_hole2_x, pcb_hole2_y, pcb2_hole_size
|
||||
pcb_hole3_x, pcb_hole3_y, pcb3_hole_size, pcb_hole4_x, pcb_hole4_y, pcb4_hole_size
|
||||
pcb_hole5_x, pcb_hole5_y, pcb5_hole_size, pcb_hole6_x, pcb_hole6_y, pcb6_hole_size
|
||||
pcb_hole7_x, pcb_hole7_y, pcb7_hole_size, pcb_hole8_x, pcb_hole8_y, pcb8_hole_size
|
||||
pcb_hole9_x, pcb_hole9_y, pcb9_hole_size, pcb_hole10_x, pcb_hole10_y, pcb10_hole_size
|
||||
soc1size_x, soc1size_y, soc1size_z, soc1loc_x, soc1loc_y, soc1loc_z, soc1_rotation, "soc1_side",
|
||||
soc2size_x, soc2size_y, soc2size_z, soc2loc_x, soc2loc_y, soc2loc_z, soc2_rotation, "soc2_side",
|
||||
soc3size_x, soc3size_y, soc3size_z, soc3loc_x, soc3loc_y, soc3loc_z, soc3_rotation, "soc3_side",
|
||||
soc4size_x, soc4size_y, soc4size_z, soc4loc_x, soc4loc_y, soc4loc_z, soc4_rotation, "soc4_side",
|
||||
component_x, component_y, component_rotation, "component_side", "component_class","component_type"
|
||||
|
||||
component classes and types:
|
||||
memory - "emmc","emmc_plug","sodimm_5.2","sodimm_9.2"
|
||||
switch - slide_4x9
|
||||
button - "momentary_6x6x9","momentary_6x6x4","momentary_6x6x4_90","momentary_4x2x1"
|
||||
plug - "pwr2.5_5x7.5","pwr5.5_7.5x11.5","pwr5.5_10x10","rtc_micro","audio_micro","uart_micro","molex_4x1","small_encl_satapwr"
|
||||
usb2 - "single_vert_a","double_stacked_a","micro"
|
||||
usb3 - double_stacked_a
|
||||
network - rj45_single
|
||||
video - "hdmi_a","dp-hdmi_a","mipi_csi","mipi_dsi"
|
||||
fan - "micro","encl_pmw","encl_pmw_h"
|
||||
gpio - "encl_header_30","encl_header_12","header_40","header_20"
|
||||
ic - "ic_2.8x2.8","ic_3x3","ic_3.7x3.7","ic_4x4","ic_4.7x4.7","ic_5x5","ic_5.75x5.75","ic_6x6","ic_6.4x6.4",ic_6.75x6.75",
|
||||
"ic_7x7","ic_4.3x5.1","ic_5.4x5.3","ic_6.7x8.4","ic_9x9","ic_11x8","ic_13x8","ic_13x9","ic_16x10"
|
||||
audio - "out-in-spdif","jack_3.5"
|
||||
storage - "sdcard","sdcard_i","sata_header","sata_power_vrec","sata_encl_power","sata_encl_header","m.2_header","m.2_stud"
|
||||
combo - "rj45-usb2_double","rj45-usb3_double"
|
||||
jumper - "header_2x1","header_3x2","header_5x1","header_6x1","header_7x1"
|
||||
misc - "ir_1","led_3x1.5","lcd_2.2","bat_hold_1"
|
||||
heatsink - "hc4_oem","c4_oem","c2_oem","c1+_oem","xu4_oem","n1_oem","xu4q_oem","n2_oem","n2+_oem","m1_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_data = [
|
||||
|
||||
// Hard Kernel Odroids
|
||||
["c1+",85,56,1,3.5,17,6, // sbc model, pcb size and component height
|
||||
3.5,3.5,3,3.5,52.5,3, // pcb holes 1 and 2 location and pcb hole size
|
||||
61.5,3.5,3,61.5,52.5,3, // pcb holes 3 and 4 location and pcb hole size
|
||||
9.385,38,3,60.615,18,3, // 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
|
||||
12,12,1.25,34.4,22,0,0,"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,"", // soc3 size, location, rotation and side
|
||||
0,0,0,0,0,0,0,"", // soc4 size, location, rotation and side
|
||||
42.28,27.6,90,"bottom","-memory","emmc_plug", // emmc plug location, rotation, side, class and type
|
||||
40.62,25.25,90,"bottom","memory","emmc", // emmc location, rotation, side, class and type
|
||||
46.5,40.5,180,"bottom","storage","sdcard", // sdcard location, rotation, side, class and type
|
||||
6.8,-1,0,"top","usb2","micro", // usb2 otg location, rotation, side, class and type
|
||||
24.5,-1,0,"top","video","hdmi_a", // hdmi location, rotation, side, class and type
|
||||
46.5,0,0,"top","plug","pwr2.5_5x7.5", // pwrplug location, rotation, side, class and type
|
||||
65,2.25,270,"top","network","rj45_single", // ethernet location, rotation, side, class and type
|
||||
69.61,39.4,270,"top","usb2","double_stacked_a", // usb2 location, rotation, side, class and type
|
||||
69.61,21.4,270,"top","usb2","double_stacked_a", // usb1 location, rotation, side, class and type
|
||||
7,50,0,"top","gpio","header_40", // gpio location, rotation, side, class and type
|
||||
2.5,40.7,90,"top","misc","ir_1", // ir location, rotation, side, class and type
|
||||
0,15.2,90,"top","plug","uart_micro", // uart location, rotation, side, class and type
|
||||
14.7,11.86,0,"top","jumper","header_7x1", // jumper location, rotation, side, class and type
|
||||
16.5,16,0,"top","ic","ic_11x8", // memory location, rotation, side, class and type
|
||||
16.5,31,0,"top","ic","ic_11x8", // memory location, rotation, side, class and type
|
||||
55,9,0,"top","ic","ic_5x5", // usbhub 5mm location, rotation, side, class and type
|
||||
57.7,36,0,"top","ic","ic_5x5", // usbhub 5mm location, rotation, side, class and type
|
||||
16.5,16,0,"bottom","ic","ic_11x8", // memory location, rotation, side, class and type
|
||||
16.5,31,0,"bottom","ic","ic_11x8", // memory location, rotation, side, class and type
|
||||
9.385,38,0,"top","heatsink","c1+_oem"], // heatsink location, rotation, side, class and type
|
||||
|
||||
["c2",85,56,1,3.5,17,6, // sbc model, pcb size and component height
|
||||
3.5,3.5,3,3.5,52.5,3, // pcb holes 1 and 2 location and pcb hole size
|
||||
61.5,3.5,3,61.5,52.5,3, // pcb holes 3 and 4 location and pcb hole size
|
||||
9.385,38,3,60.615,18,3, // 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
|
||||
13,13,1.25,32.5,24,0,0,"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,"", // soc3 size, location, rotation and side
|
||||
0,0,0,0,0,0,0,"", // soc4 size, location, rotation and side
|
||||
47.09,26.35,90,"bottom","-memory","emmc_plug", // emmc plug location, rotation, side, class and type
|
||||
45.5,24,90,"bottom","memory","emmc", // emmc location, rotation, side, class and type
|
||||
46.5,40.5,180,"bottom","storage","sdcard", // sdcard location, rotation, side, class and type
|
||||
6.8,-1,0,"top","usb2","micro", // usb2 otg location, rotation, side, class and type
|
||||
18.73,0,90,"top","jumper","header_2x1", // jumper location, rotation, side, class and type
|
||||
24.5,-1,0,"top","video","hdmi_a", // hdmi location, rotation, side, class and type
|
||||
46.5,0,0,"top","plug","pwr2.5_5x7.5", // pwrplug location, rotation, side, class and type
|
||||
65,2.25,270,"top","network","rj45_single", // ethernet location, rotation, side, class and type
|
||||
69.61,39.6,270,"top","usb2","double_stacked_a", // usb2 location, rotation, side, class and type
|
||||
69.61,21.6,270,"top","usb2","double_stacked_a", // usb1 location, rotation, side, class and type
|
||||
7,50,0,"top","gpio","header_40", // gpio location, rotation, side, class and type
|
||||
2.5,40.7,90,"top","misc","ir_1", // ir location, rotation, side, class and type
|
||||
0,15.2,90,"top","plug","uart_micro", // uart location, rotation, side, class and type
|
||||
14.7,11.86,0,"top","jumper","header_7x1", // jumper location, rotation, side, class and type
|
||||
17,18.25,0,"top","ic","ic_11x8", // memory location, rotation, side, class and type
|
||||
17,30,0,"top","ic","ic_11x8", // memory location, rotation, side, class and type
|
||||
55,9,0,"top","ic","ic_5x5", // usbhub 5mm location, rotation, side, class and type
|
||||
57.7,36,0,"top","ic","ic_5x5", // usbhub 5mm location, rotation, side, class and type
|
||||
17,18.25,0,"bottom","ic","ic_11x8", // memory location, rotation, side, class and type
|
||||
17,30,0,"bottom","ic","ic_11x8", // memory location, rotation, side, class and type
|
||||
9.385,38,0,"top","heatsink","c2_oem"], // heatsink location, rotation, side, class and type
|
||||
|
||||
["c4",85,56,1,3.5,18,6, // sbc model, pcb size and component height
|
||||
3.5,3.5,3,3.5,52.5,3, // pcb holes 1 and 2 location and pcb hole size
|
||||
61.5,3.5,3,61.5,52.5,3, // pcb holes 3 and 4 location and pcb hole size
|
||||
4.19,38.1,3,55.39,18.175,3, // 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
|
||||
14.5,14.5,1.25,32.875,22.4,0,0,"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,"", // soc3 size, location, rotation and side
|
||||
0,0,0,0,0,0,0,"", // soc4 size, location, rotation and side
|
||||
39.23,15,0,"bottom","-memory","emmc_plug", // emmc plug 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
|
||||
19.75,-1,0,"top","usb2","micro", // usb2 otg 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
|
||||
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,22,270,"top","usb3","double_stacked_a", // usb3 location, rotation, side, class and type
|
||||
8.15,49,0,"top","gpio","header_40", // gpio location, rotation, side, class and type
|
||||
2.5,41.25,90,"top","misc","ir_1", // ir location, rotation, side, class and type
|
||||
0,11.5,90,"top","plug","uart_micro", // uart location, rotation, side, class and type
|
||||
15.25,10.75,0,"top","jumper","header_7x1", // jumper location, rotation, side, class and type
|
||||
13.185,17.16,0,"top","ic","ic_13x9", // memory location, rotation, side, class and type
|
||||
13.185,35.174,0,"top","ic","ic_13x9", // memory location, rotation, side, class and type
|
||||
56.46,33.38,0,"top","ic","ic_9x9", // usbhub 5mm location, rotation, side, class and type
|
||||
57.6,9.3,0,"top","ic","ic_5x5", // ethernet 5mm location, rotation, side, class and type
|
||||
13.185,17.16,0,"bottom","ic","ic_13x9", // memory location, rotation, side, class and type
|
||||
13.185,35.174,0,"bottom","ic","ic_13x9", // memory location, rotation, side, class and type
|
||||
4.16,38.175,0,"top","heatsink","c4_oem"], // heatsink location, rotation, side, class and type
|
||||
|
||||
["xu4",83,59,1,3.5,17,6, // sbc model, pcb size and component height
|
||||
3.5,3.5,3,3.5,55.5,3, // pcb holes 1 and 2 location and pcb hole size
|
||||
79.5,3.5,3,79.5,55.5,3, // pcb holes 3 and 4 location and pcb hole size
|
||||
79.19,21.82,3,28.2,41.82,3, // pcb holes 5 and 6 location and pcb hole size
|
||||
0,0,3.3,0,0,3.3, // 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
|
||||
14.5,15.75,1.25,59,20,0,0,"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,"", // soc3 size, location, rotation and side
|
||||
0,0,0,0,0,0,0,"", // soc4 size, location, rotation and side
|
||||
47.5,13.7,0,"bottom","-memory","emmc_plug", // emmc plug location, rotation, side, class and type
|
||||
45,0,0,"bottom","memory","emmc", // emmc location, rotation, side, class and type
|
||||
45.85,5,0,"top","storage","sdcard", // sdcard location, rotation, side, class and type
|
||||
79,7.15,270,"top","switch","slide_4x9", // switch location, rotation, side, class and type
|
||||
25.925,52.925,0,"top","button","momentary_6x6x9", // pwrbutton location, rotation, side, class and type
|
||||
34.5,-1,0,"top","plug","pwr5.5_7.5x11.5", // pwrplug location, rotation, side, class and type
|
||||
26,0,0,"top","usb2","single_vert_a", // usb2 location, rotation, side, class and type
|
||||
7.55,41.6,180,"top","usb3","double_stacked_a", // usb3 location, rotation, side, class and type
|
||||
7.4,0,0,"top","network","rj45_single", // ethernet location, rotation, side, class and type
|
||||
60,-1,0,"top","video","hdmi_a", // hdmi location, rotation, side, class and type
|
||||
0,37.8,90,"top","plug","uart_micro", // uart location, rotation, side, class and type
|
||||
0,25,270,"top","plug","rtc_micro", // rtc location, rotation, side, class and type
|
||||
27,22,90,"top","fan","micro", // fan location, rotation, side, class and type
|
||||
35.4,52.25,0,"top","gpio","encl_header_30", // gpio1 location, rotation, side, class and type
|
||||
76.25,32.5,270,"top","gpio","encl_header_12", // gpio2 location, rotation, side, class and type
|
||||
43.8,27.25,0,"top","ic","ic_5.75x5.75", // pmic location, rotation, side, class and type
|
||||
32.5,40.5,0,"top","ic","ic_7x7", // usbhum 7mm location, rotation, side, class and type
|
||||
11.7,22.8,0,"top","ic","ic_6x6", // nic location, rotation, side, class and type
|
||||
28.39,42,0,"top","heatsink","xu4_oem"], // heatsink location, rotation, side, class and type
|
||||
|
||||
["xu4q",83,59,1,3.5,27,6, // sbc model, pcb size and component height
|
||||
3.5,3.5,3,3.5,55.5,3, // pcb holes 1 and 2 location and pcb hole size
|
||||
79.5,3.5,3,79.5,55.5,3, // pcb holes 3 and 4 location and pcb hole size
|
||||
79.19,21.82,3,28.2,41.82,3, // pcb holes 5 and 6 location and pcb hole size
|
||||
0,0,3.3,0,0,3.3, // 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
|
||||
14.5,15.75,1.25,59,20,0,0,"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,"", // soc3 size, location, rotation and side
|
||||
0,0,0,0,0,0,0,"", // soc4 size, location, rotation and side
|
||||
47.5,13.7,0,"bottom","-memory","emmc_plug", // emmc plug location, rotation, side, class and type
|
||||
45,0,0,"bottom","memory","emmc", // emmc location, rotation, side, class and type
|
||||
45.85,5,0,"top","storage","sdcard", // sdcard location, rotation, side, class and type
|
||||
79,7.15,270,"top","switch","slide_4x9", // switch location, rotation, side, class and type
|
||||
25.925,52.925,0,"top","button","momentary_6x6x9", // pwrbutton location, rotation, side, class and type
|
||||
34.85,-1,0,"top","plug","pwr5.5_7.5x11.5", // pwrplug location, rotation, side, class and type
|
||||
26,0,0,"top","usb2","single_vert_a", // usb2 location, rotation, side, class and type
|
||||
7.55,41.6,180,"top","usb3","double_stacked_a", // usb3 location, rotation, side, class and type
|
||||
7.4,0,0,"top","network","rj45_single", // ethernet location, rotation, side, class and type
|
||||
60,-1,0,"top","video","hdmi_a", // hdmi location, rotation, side, class and type
|
||||
0,37.8,90,"top","plug","uart_micro", // uart location, rotation, side, class and type
|
||||
0,25,270,"top","plug","rtc_micro", // rtc location, rotation, side, class and type
|
||||
27,22,90,"top","fan","micro", // fan location, rotation, side, class and type
|
||||
35.4,52.25,0,"top","gpio","encl_header_30", // gpio1 location, rotation, side, class and type
|
||||
76.25,32.5,270,"top","gpio","encl_header_12", // gpio2 location, rotation, side, class and type
|
||||
43.8,27.25,0,"top","ic","ic_5.75x5.75", // pmic location, rotation, side, class and type
|
||||
32.5,40.5,0,"top","ic","ic_7x7", // usbhum 7mm location, rotation, side, class and type
|
||||
11.7,22.8,0,"top","ic","ic_6x6", // nic location, rotation, side, class and type
|
||||
28.39,42,0,"top","heatsink","xu4q_oem"], // heatsink location, rotation, side, class and type
|
||||
|
||||
["mc1",55,47,1,3.5,16,10, // sbc model, pcb size and component height
|
||||
2.5,10.5,3,2.5,37,3, // pcb holes 1 and 2 location and pcb hole size
|
||||
52.5,32.5,3,0,0,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
|
||||
14.5,15.75,1.25,2,15,0,0,"bottom", // 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
|
||||
5.5,3,0,"top","storage","sdcard", // sdcard location, rotation, side, class and type
|
||||
19,-1,0,"top","plug","pwr5.5_7.5x11.5", // pwrplug location, rotation, side, class and type
|
||||
29.5,-1,0,"top","usb2","single_vert_a", // usb2 location, rotation, side, class and type
|
||||
37.7,-1,0,"top","network","rj45_single", // ethernet location, rotation, side, class and type
|
||||
44.2,34.4,90,"top","plug","uart_micro", // uart location, rotation, side, class and type
|
||||
35,32.3,0,"top","plug","rtc_micro", // rtc location, rotation, side, class and type
|
||||
42.8,21.85,0,"top","ic","ic_6x6"], // nic location, rotation, side, class and type
|
||||
|
||||
["hc1",55,47,1,3.5,16,10, // sbc model, pcb size and component height
|
||||
2.5,10.5,3,2.5,37,3, // pcb holes 1 and 2 location and pcb hole size
|
||||
52.5,32.5,3,0,0,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
|
||||
14.5,15.75,1.25,2,15,0,0,"bottom", // 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
|
||||
5.5,3,0,"top","storage","sdcard", // sdcard location, rotation, side, class and type
|
||||
19,-1,0,"top","plug","pwr5.5_7.5x11.5", // pwrplug location, rotation, side, class and type
|
||||
29.5,-1,0,"top","usb2","single_vert_a", // usb2 location, rotation, side, class and type
|
||||
37.7,-1,0,"top","network","rj45_single", // ethernet location, rotation, side, class and type
|
||||
44.2,34.4,90,"top","plug","uart_micro", // uart location, rotation, side, class and type
|
||||
35,32.3,0,"top","plug","rtc_micro", // rtc location, rotation, side, class and type
|
||||
42.8,21.85,0,"top","ic","ic_6x6", // nic location, rotation, side, class and type
|
||||
2,41,0,"top","storage","sata_encl_power"], // sata location, rotation, side, class and type
|
||||
|
||||
["n1",90,90,1.5,3.5,16,6, // sbc model, pcb size and component height
|
||||
12,43,3,3.8,86.5,3, // pcb holes 1 and 2 location and pcb hole size
|
||||
86.5,28,3,86.5,86.5,3, // pcb holes 3 and 4 location and pcb hole size
|
||||
24.5,42,3,0,0,3, // pcb holes 5 and 6 location and pcb hole size
|
||||
75,64.5,3,0,0,3, // 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
|
||||
21,21,1.51,48.5,37.5,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,"", // soc3 size, location, rotation and side
|
||||
0,0,0,0,0,0,0,"", // soc4 size, location, rotation and side
|
||||
78.7,50,270,"bottom","-memory","emmc_plug", // emmc plug location, rotation, side, class and type
|
||||
65,48,270,"bottom","memory","emmc", // emmc location, rotation, side, class and type
|
||||
75,36,90,"bottom","storage","sdcard", // sdcard location, rotation, side, class and type
|
||||
3,0,0,"top","plug","pwr5.5_7.5x11.5", // pwrplug location, rotation, side, class and type
|
||||
17,-1,0,"top","video","hdmi_a", // hdmi location, rotation, side, class and type
|
||||
36,0,0,"top","usb3","double_stacked_a", // usb3 location, rotation, side, class and type
|
||||
54,0,0,"top","usb2","double_stacked_a", // usb2 location, rotation, side, class and type
|
||||
72,0,0,"top","network","rj45_single", // ethernet location, rotation, side, class and type
|
||||
83,32,270,"top","gpio","header_40", // gpio location, rotation, side, class and type
|
||||
7.5,80,0,"top","button","tall_6x6", // reset button location, rotation, side, class and type
|
||||
15,80,0,"top","button","tall_6x6", // power button location, rotation, side, class and type
|
||||
0,24,270,"top","storage","sata_header", // sata location, rotation, side, class and type
|
||||
0,42.5,270,"top","storage","sata_header", // sata location, rotation, side, class and type
|
||||
0,59,270,"top","plug","uart_micro", // uart location, rotation, side, class and type
|
||||
0,74,270,"top","plug","rtc_micro", // rtc location, rotation, side, class and type
|
||||
20,54,-45,"top","fan","micro", // fan location, rotation, side, class and type
|
||||
5.5,52,270,"top","plug","molex_4x1", // pwrplug location, rotation, side, class and type
|
||||
15,31,0,"top","ic","ic_7x7", // sata ic 7mm location, rotation, side, class and type
|
||||
74.5,24.5,0,"top","ic","ic_6x6", // nic location, rotation, side, class and type
|
||||
50,25,90,"top","ic","ic_7x7", // usb hum 7mm location, rotation, side, class and type
|
||||
24,69,90,"top","ic","ic_13x8", // memory location, rotation, side, class and type
|
||||
38.5,69,90,"top","ic","ic_13x8", // memory location, rotation, side, class and type
|
||||
50.5,69,90,"top","ic","ic_13x8", // memory location, rotation, side, class and type
|
||||
65,69,90,"top","ic","ic_13x8", // memory location, rotation, side, class and type
|
||||
3.5,17.5,90,"top","ic","ic_6x6", // memory location, rotation, side, class and type
|
||||
12.5,17.5,90,"top","ic","ic_6x6", // memory location, rotation, side, class and type
|
||||
// 24.5,42,45,"top","heatsink","n1_oem"], // heatsink location, rotation, side, class and type
|
||||
-15.5,42.5,-45,"top","heatsink","n1_oem"], // heatsink location, rotation, side, class and type
|
||||
|
||||
["n2",90,90,1.7,.2,17,20, // sbc model, pcb size and component height
|
||||
3,28.5,3.3,86.5,28.5,3.3, // pcb holes 1 and 2 location and pcb hole size
|
||||
3,86.5,3.3,86.5,86.5,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
|
||||
14.5,16.25,1.51,37.78,50.88,0,0,"bottom", // soc1 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
|
||||
16.55,0,0,"top","usb3","double_stacked_a", // usb3 location, rotation, side, class and type
|
||||
34.8,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
|
||||
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
|
||||
17.61,39.73,0,"top","jumper","header_7x1", // jumper location, rotation, side, class and type
|
||||
.2,69.05,270,"top","plug","uart_micro", // uart location, rotation, side, class and type
|
||||
75.05,42.44,180,"top","plug","rtc_micro", // rtc location, rotation, side, class and type
|
||||
68.5,68.8,90,"top","fan","micro", // fan location, rotation, side, class and type
|
||||
7.2,76.82,180,"top","storage","sdcard", // sdcard location, rotation, side, class and type
|
||||
59.35,85.4,180,"top","usb2","micro", // usb2 otg location, rotation, side, class and type
|
||||
35.85,85.62,0,"top","memory","emmc_plug", // emmc plug location, rotation, side, class and type
|
||||
33.5,72,0,"top","memory","emmc", // emmc location, rotation, side, class and type
|
||||
22.4,86.6,180,"top","misc","ir_1", // ir location, rotation, side, class and type
|
||||
48.45,86.7,180,"top","switch","slide_4x9", // switch location, rotation, side, class and type
|
||||
73.67,78.95,180,"top","audio","jack_3.5", // switch location, rotation, side, class and type
|
||||
18.95,46.23,0,"top","ic","ic_13x8", // memory top size, location, rotation and side
|
||||
19.04,64.24,0,"top","ic","ic_13x8", // memory top size, location, rotation and side
|
||||
18.95,46.23,0,"bottom","ic","ic_13x8", // memory bottom size, location, rotation and side
|
||||
19.04,64.24,0,"bottom","ic","ic_13x8", // memory bottom size, location, rotation and side
|
||||
45.74,27.51,0,"top","ic","ic_6.4x6.4", // component, location, rotation, side, class and type
|
||||
75.08,25,0,"top","ic","ic_3.7x3.7", // component, location, rotation, side, class and type
|
||||
74.3,69.54,0,"top","ic","ic_4.3x5.1", // component, location, rotation, side, class and type
|
||||
50.8,77.25,0,"top","ic","ic_5.4x5.3", // component, location, rotation, side, class and type
|
||||
77.03,51.92,0,"top","ic","ic_3x3", // component, location, rotation, side, class and type
|
||||
-1,.5,180,"top","heatsink","n2_oem"], // heatsink location, rotation, side, class and type
|
||||
|
||||
["n2+",90,90,1.7,.2,17,14, // sbc model, pcb size and component height
|
||||
3,28.5,3.3,86.5,28.5,3.3, // pcb holes 1 and 2 location and pcb hole size
|
||||
3,86.5,3.3,86.5,86.5,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
|
||||
14.5,16.25,1.51,37.78,50.88,0,0,"bottom", // soc1 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
|
||||
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
|
||||
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
|
||||
83.96,32.1,90,"top","gpio","header_40", // gpio location, rotation, side, class and type
|
||||
17.61,39.73,0,"top","jumper","header_7x1", // jumper location, rotation, side, class and type
|
||||
.2,69.05,270,"top","plug","uart_micro", // uart location, rotation, side, class and type
|
||||
53,35,0,"top","misc","bat_hold_1", // battery holder, location, rotation, side, class and type
|
||||
68.5,68.8,90,"top","fan","micro", // fan location, rotation, side, class and type
|
||||
7.2,76.82,180,"top","storage","sdcard", // sdcard location, rotation, side, class and type
|
||||
59.35,85.4,180,"top","usb2","micro", // usb2 otg location, rotation, side, class and type
|
||||
35.85,85.62,0,"top","memory","emmc_plug", // emmc plug location, rotation, side, class and type
|
||||
33.5,72,0,"top","memory","emmc", // emmc location, rotation, side, class and type
|
||||
22.4,86.6,180,"top","misc","ir_1", // ir location, rotation, side, class and type
|
||||
48.45,86.7,180,"top","switch","slide_4x9", // switch location, rotation, side, class and type
|
||||
73.67,78.95,180,"top","audio","jack_3.5", // switch location, rotation, side, class and type
|
||||
18.95,46.23,0,"top","ic","ic_13x8", // memory top size, location, rotation and side
|
||||
19.04,64.24,0,"top","ic","ic_13x8", // memory top size, location, rotation and side
|
||||
18.95,46.23,0,"bottom","ic","ic_13x8", // memory bottom size, location, rotation and side
|
||||
19.04,64.24,0,"bottom","ic","ic_13x8", // memory bottom size, location, rotation and side
|
||||
45.74,27.51,0,"top","ic","ic_6.4x6.4", // component, location, rotation, side, class and type
|
||||
75.08,25,0,"top","ic","ic_3.7x3.7", // component, location, rotation, side, class and type
|
||||
74.3,69.54,0,"top","ic","ic_4.3x5.1", // component, location, rotation, side, class and type
|
||||
50.8,77.25,0,"top","ic","ic_5.4x5.3", // component, location, rotation, side, class and type
|
||||
77.03,51.92,0,"top","ic","ic_3x3", // component, location, rotation, side, class and type
|
||||
1,-.5,0,"top","heatsink","n2+_oem"], // heatsink location, rotation, side, class and type
|
||||
|
||||
["n2+_noheatsink",90,90,1.7,.2,17,14, // sbc model, pcb size and component height
|
||||
3,28.5,3.3,86.5,28.5,3.3, // pcb holes 1 and 2 location and pcb hole size
|
||||
3,86.5,3.3,86.5,86.5,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
|
||||
14.5,16.25,1.51,37.78,50.88,0,0,"bottom", // soc1 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
|
||||
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
|
||||
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
|
||||
83.96,32.1,90,"top","gpio","header_40", // gpio location, rotation, side, class and type
|
||||
17.61,39.73,0,"top","jumper","header_7x1", // jumper location, rotation, side, class and type
|
||||
.2,69.05,270,"top","plug","uart_micro", // uart location, rotation, side, class and type
|
||||
53,35,0,"top","misc","bat_hold_1", // battery holder, location, rotation, side, class and type
|
||||
68.5,68.8,90,"top","fan","micro", // fan location, rotation, side, class and type
|
||||
7.2,76.82,180,"top","storage","sdcard", // sdcard location, rotation, side, class and type
|
||||
59.35,85.4,180,"top","usb2","micro", // usb2 otg location, rotation, side, class and type
|
||||
35.85,85.62,0,"top","memory","emmc_plug", // emmc plug location, rotation, side, class and type
|
||||
33.5,72,0,"top","memory","emmc", // emmc location, rotation, side, class and type
|
||||
22.4,86.6,180,"top","misc","ir_1", // ir location, rotation, side, class and type
|
||||
48.45,86.7,270,"top","switch","slide_4x9", // switch location, rotation, side, class and type
|
||||
73.67,78.95,180,"top","audio","jack_3.5", // switch location, rotation, side, class and type
|
||||
18.95,46.23,0,"top","ic","ic_13x8", // memory top size, location, rotation and side
|
||||
19.04,64.24,0,"top","ic","ic_13x8", // memory top size, location, rotation and side
|
||||
18.95,46.23,0,"bottom","ic","ic_13x8", // memory bottom size, location, rotation and side
|
||||
19.04,64.24,0,"bottom","ic","ic_13x8", // memory bottom size, location, rotation and side
|
||||
45.74,27.51,0,"top","ic","ic_6.4x6.4", // component, location, rotation, side, class and type
|
||||
75.08,25,0,"top","ic","ic_3.7x3.7", // component, location, rotation, side, class and type
|
||||
74.3,69.54,0,"top","ic","ic_4.3x5.1", // component, location, rotation, side, class and type
|
||||
50.8,77.25,0,"top","ic","ic_5.4x5.3", // component, location, rotation, side, class and type
|
||||
77.03,51.92,0,"top","ic","ic_3x3"], // component, location, rotation, side, class and type
|
||||
|
||||
["m1",90,122,1.7,.2,17,14, // sbc model, pcb size and component height
|
||||
3,28.5,3,3,118.5,3, // pcb holes 1 and 2 location and pcb hole size
|
||||
86.5,118.5,3,,86.5,28.5,3, // pcb holes 3 and 4 location and pcb hole size
|
||||
3,67,3,66,25,3, // pcb holes 5 and 6 location and pcb hole size
|
||||
86.5,47,3,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
|
||||
19,19,1.51,45,43.5,0,45,"bottom", // soc1 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
|
||||
17,0,0,"top","usb3","double_stacked_a", // usb3 location, rotation, side, class and type
|
||||
35,0,0,"top","usb2","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
|
||||
71.25,0,0,"top","network","rj45_single", // ethernet location, rotation, side, class and type
|
||||
84.375,62.25,90,"top","gpio","header_40", // gpio location, rotation, side, class and type
|
||||
.2,101,270,"top","plug","uart_micro", // uart location, rotation, side, class and type
|
||||
21,88,120,"top","misc","bat_hold_1", // battery holder, location, rotation, side, class and type
|
||||
61,118,0,"top","plug","audio_micro", // micro location, rotation, side, class and type
|
||||
7.2,108.82,180,"top","storage","sdcard", // sdcard location, rotation, side, class and type
|
||||
20,0,0,"bottom","usb2","micro", // usb2 otg location, rotation, side, class and type
|
||||
35.85,117,0,"top","memory","emmc_plug", // emmc plug location, rotation, side, class and type
|
||||
33.5,103,0,"top","memory","emmc", // emmc location, rotation, side, class and type
|
||||
22.4,118.58,180,"top","misc","ir_1", // ir location, rotation, side, class and type
|
||||
73.73,111.5,180,"top","audio","jack_3.5", // audio jack location, rotation, side, class and type
|
||||
0,88.2,270,"top","plug","small_encl_satapwr", // pwrplug location, rotation, side, class and type
|
||||
.25,72,270,"top","storage","sata_header", // sata location, rotation, side, class and type
|
||||
50,115.65,0,"top","button","momentary_6x6x4", // spi button location, rotation, side, class and type
|
||||
7,101,0,"top","jumper","header_2x1", // jumper location, rotation, side, class and type
|
||||
7,103.5,0,"top","jumper","header_2x1", // jumper location, rotation, side, class and type
|
||||
3.5,35.87,270,"top","storage","m.2_header", // m2 socket location, rotation, side, class and type
|
||||
36.28,73,0,"bottom","ic","ic_16x10", // memory bottom size, location, rotation and side
|
||||
75.75,25,0,"top","ic","ic_5x5", // ic bottom size, location, rotation and side
|
||||
50.5,109.22,0,"top","ic","ic_5x5", // ic bottom size, location, rotation and side
|
||||
58,72,0,"top","video","mipi_csi", // mipi csi size, location, rotation and side
|
||||
65,93,0,"top","video","mipi_dsi", // mipi dsi size, location, rotation and side
|
||||
.5,0,0,"top","heatsink","m1_oem", // heatsink location, rotation, side, class and type
|
||||
86.5,47,0,"top","storage","m.2_stud"], // m2 stud location, rotation, side, class and type
|
||||
|
||||
["m1_noheatsink",90,122,1.7,.2,17,1.6, // sbc model, pcb size and component height
|
||||
3,28.5,3,3,118.5,3, // pcb holes 1 and 2 location and pcb hole size
|
||||
86.5,118.5,3,,86.5,28.5,3, // pcb holes 3 and 4 location and pcb hole size
|
||||
3,67,3,66,25,3, // pcb holes 5 and 6 location and pcb hole size
|
||||
86.5,47,3,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
|
||||
19,19,1.51,45,43.5,0,45,"bottom", // soc1 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
|
||||
18,0,0,"top","usb3","double_stacked_a", // usb3 location, rotation, side, class and type
|
||||
36,0,0,"top","usb2","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
|
||||
71.75,0,0,"top","network","rj45_single", // ethernet location, rotation, side, class and type
|
||||
84.375,62.25,90,"top","gpio","header_40", // gpio location, rotation, side, class and type
|
||||
.2,101,270,"top","plug","uart_micro", // uart location, rotation, side, class and type
|
||||
21,88,120,"top","misc","bat_hold_1", // battery holder, location, rotation, side, class and type
|
||||
61,118,0,"top","plug","audio_micro", // micro location, rotation, side, class and type
|
||||
7.2,108.82,180,"top","storage","sdcard", // sdcard location, rotation, side, class and type
|
||||
20,0,0,"bottom","usb2","micro", // usb2 otg location, rotation, side, class and type
|
||||
35.85,117,0,"top","memory","emmc_plug", // emmc plug location, rotation, side, class and type
|
||||
33.5,103,0,"top","memory","emmc", // emmc location, rotation, side, class and type
|
||||
22.4,118.58,180,"top","misc","ir_1", // ir location, rotation, side, class and type
|
||||
73.73,111.5,180,"top","audio","jack_3.5", // audio jack location, rotation, side, class and type
|
||||
0,88.2,270,"top","plug","small_encl_satapwr", // pwrplug location, rotation, side, class and type
|
||||
.25,72,270,"top","storage","sata_header", // sata location, rotation, side, class and type
|
||||
50,115.65,0,"top","button","momentary_6x6x4", // spi button location, rotation, side, class and type
|
||||
7,101,0,"top","jumper","header_2x1", // jumper location, rotation, side, class and type
|
||||
7,103.5,0,"top","jumper","header_2x1", // jumper location, rotation, side, class and type
|
||||
3.5,35.87,270,"top","storage","m.2_header", // m2 socket location, rotation, side, class and type
|
||||
36.28,73,0,"bottom","ic","ic_16x10", // memory bottom size, location, rotation and side
|
||||
75.75,25,0,"top","ic","ic_5x5", // ic bottom size, location, rotation and side
|
||||
50.5,109.22,0,"top","ic","ic_5x5", // ic bottom size, location, rotation and side
|
||||
58,72,0,"top","video","mipi_csi", // mipi csi size, location, rotation and side
|
||||
65,93,0,"top","video","mipi_dsi", // mipi dsi size, location, rotation and side
|
||||
86.5,47,0,"top","storage","m.2_stud"], // m2 stud location, rotation, side, class and type
|
||||
|
||||
["h2",110,110,2,3.5,38,11, // sbc model, pcb size and component height
|
||||
3.81,17.78,3.5,3.81,106.19,3.5, // pcb holes 1 and 2 location and pcb hole size
|
||||
106.04,24.77,3.5,106.04,106.2,3.5, // pcb holes 3 and 4 location and pcb hole size
|
||||
20.17,43.82,3,0,0,0, // pcb holes 5 and 6 location and pcb hole size
|
||||
32,40,2.5,82,40,2.5, // pcb holes 7 and 8 location and pcb hole size
|
||||
32,75,2.5,82,75,2.5, // pcb holes 9 and 10 location and pcb hole size
|
||||
25,24,1.344,45.29,48.95,0,0,"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,"", // soc3 size, location, rotation and side
|
||||
0,0,0,0,0,0,0,"", // soc4 size, location, rotation and side
|
||||
88.72,58.04,0,"top","memory","emmc_plug", // emmc plug location, rotation, side, class and type
|
||||
86.87,43.84,0,"top","-memory","emmc", // emmc location, rotation, side, class and type
|
||||
9.34,103.43,0,"top","button","momentary_6x6x4", // power button location, rotation, side, class and type
|
||||
20.77,103.43,0,"top","button","momentary_6x6x4", // reset button location, rotation, side, class and type
|
||||
1.27,76.76,90,"top","gpio","header_20", // gpio location, rotation, side, class and type
|
||||
1.98,-1.73,0,"top","plug","pwr5.5_10x10", // pwrplug location, rotation, side, class and type
|
||||
20.49,-.71,0,"top","combo","rj45-usb2_double", // rj45 and double usb2 ports location, rotation, side class and type
|
||||
45.26,-.71,0,"top","combo","rj45-usb3_double", // rj45 and double usb3 ports location, rotation, side class and type
|
||||
68.81,-.57,0,"top","video","dp-hdmi_a", // display port and hdmi location, rotation, side, class and type
|
||||
95.25,-1.37,0,"top","audio","out-in-spdif", // audio out, in and spdif location, rotation, side, class and type
|
||||
103.11,65.85,270,"top","storage","sata_encl_header", // sata location, rotation, side, class and type
|
||||
103.11,83.62,270,"top","storage","sata_encl_header", // sata location, rotation, side, class and type
|
||||
103,38.74,90,"top","plug","small_encl_satapwr", // sata power connector location, rotation, side, class and type
|
||||
103,52.07,90,"top","plug","small_encl_satapwr", // sata power connector location, rotation, side, class and type
|
||||
105.43,28.59,90,"top","plug","rtc_micro", // rtc location, rotation, side, class and type
|
||||
0,49.94,270,"top","fan","encl_pmw", // fan pwm connector location, rotation, side, class and type
|
||||
93.15,23.94,0,"top","ic","ic_6.75x6.75", // audio 6.75mm location, rotation, side, class and type
|
||||
17.97,53.53,0,"top","ic","ic_4.7x4.7", // ic 4.7mm location, rotation, side, class and type
|
||||
8.74,15.24,0,"top","ic","ic_6.7x8.4", // ic 6.7x8.4xmm location, rotation, side, class and type
|
||||
10.76,97.37,0,"bottom","ic","ic_7x7", // ic 7mm location, rotation, side, class and type
|
||||
29.08,30.99,0,"bottom","ic","ic_2.8x2.8", // ic 2.8mm location, rotation, side, class and type
|
||||
53.21,30.99,0,"bottom","ic","ic_2.8x2.8", // ic 2.8mm location, rotation, side, class and type
|
||||
96.32,32.87,270,"bottom","storage","m.2_header", // m2 socket location, rotation, side, class and type
|
||||
21.98,82.05,0,"bottom","memory","sodimm_5.2", // sodimm socket location, rotation, side, class and type
|
||||
21.98,98.6,0,"bottom","memory","sodimm_9.2", // sodimm socket location, rotation, side, class and type
|
||||
32,40,0,"top","heatsink","h2_oem"], // heatsink location, rotation, side, class and type
|
||||
|
||||
["hc4",90.6,84,1.6,9,15,13, // sbc model, pcb size and component height
|
||||
4,5.5,3.5,4,58.5,3.5, // pcb holes 1 and 2 location and pcb hole size
|
||||
86.5,6,3.5,87,78.5,3.5, // pcb holes 3 and 4 location and pcb hole size
|
||||
87,15.5,3.5,16.91,44.52,3, // pcb holes 5 and 6 location and pcb hole size
|
||||
68.09,64.53,3,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
|
||||
14.5,14.5,1.25,45.86,46,0,0,"bottom", // 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
|
||||
19.2,2,0,"top","storage","sdcard", // sdcard 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
|
||||
67,-1,0,"top","network","rj45_single", // ethernet 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
|
||||
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
|
||||
10,80.70,0,"bottom","fan","encl_pmw_h", // fan pwm connector location, rotation, side, class and type
|
||||
47.38,-1,0,"bottom","video","hdmi_a", // hdmi location, rotation, side, class and type
|
||||
25.05,28.85,0,"top","storage","sata_power_vrec", // sata location, rotation, side, class and type
|
||||
25.05,69.55,0,"top","storage","sata_power_vrec", // sata location, rotation, side, class and type
|
||||
25.87,38.45,0,"top","ic","ic_13x9", // memory bottom size, location, rotation and side
|
||||
25.87,56.46,0,"top","ic","ic_13x9", // memory bottom size, location, rotation and side
|
||||
25.87,38.45,0,"bottom","ic","ic_13x9", // memory bottom size, location, rotation and side
|
||||
25.87,56.46,0,"bottom","ic","ic_13x9", // memory bottom size, location, rotation and side
|
||||
78.78,27.6,0,"top","ic","ic_6x6", // nic location, rotation, side, class and type
|
||||
53.63,32.67,0,"bottom","ic","ic_7x7", // pcie bridge location, rotation, side, class and type
|
||||
10,59.53,0,"bottom","heatsink","hc4_oem"], // heatsink location, rotation, side, class and type
|
||||
|
||||
["show2",83,48,1,3.5,7,3, // sbc model, pcb size and component height
|
||||
3.5,3.5,3.5,3.5,44.5,3.5, // pcb holes 1 and 2 location and pcb hole size
|
||||
79.5,3.5,3.5,79.5,44.5,3.5, // 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
|
||||
8,8,1.25,8,20,0,0,"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,"", // soc3 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
|
||||
2,8.83,270,"top","jumper","header_6x1", // 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,25.5,270,"top","plug","rtc_micro", // battery location, rotation, side, class and type
|
||||
7.65,2,0,"top","switch","slide_4x9", // switch location, rotation, side, class and type
|
||||
21.4,2,0,"top","button","momentary_6x6x4", // power button location, rotation, side, class and type
|
||||
29.8,3,0,"top","misc","led_3x1.5", // led location, rotation, side, class and type
|
||||
34,3,0,"top","misc","led_3x1.5", // led location, rotation, side, class and type
|
||||
38.2,3,0,"top","misc","led_3x1.5", // led location, rotation, side, class and type
|
||||
46.6,1,180,"top","button","momentary_4x2x1", // momentary button location, rotation, side, class and type
|
||||
55.2,1,180,"top","button","momentary_4x2x1", // momentary button location, rotation, side, class and type
|
||||
63.8,1,180,"top","button","momentary_4x2x1", // momentary button location, rotation, side, class and type
|
||||
19,9,0,"top","misc","lcd_2.2"], // lcd location, rotation, side, class and type
|
||||
|
||||
// RasberryPi 3B+, 3B, 3A+, 2, 1B+
|
||||
["rpi3b+",85.6,56.5,1,3,16,6, // sbc model, pcb size and component height
|
||||
3.5,3.5,2.75,3.5,52.5,2.75, // pcb holes 1 and 2 location and pcb hole size
|
||||
61.5,3.5,2.75,61.5,52.5,2.75, // 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
|
||||
14,14,1.5,19.975,24.525,0,0,"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,"", // soc3 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
|
||||
|
||||
// Pine64 SBCs
|
||||
["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,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
|
||||
0,0,0,"","",""], // component, location, rotation, side, class and type
|
||||
|
||||
["rock64",85,56,1.6,3.5,14.8,1.7, // sbc model, pcb size and component height
|
||||
3.5,3.5,2.8,3.5,52.5,2.8, // pcb holes 1 and 2 location and pcb hole size
|
||||
61.5,3.5,2.8,61.5,52.5,2.8, // 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
|
||||
0,0,0,"","",""], // component, location, rotation, side, class and type
|
||||
|
||||
["rockpro64",127,79.5,2,3.5,17,8, // sbc model, pcb size and component height
|
||||
4.5,4.25,3.25,4.5,75.25,3.25, // pcb holes 1 and 2 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
|
||||
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
|
||||
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,"", // soc3 size, location, rotation and side
|
||||
0,0,0,0,0,0,0,"", // soc4 size, location, rotation and side
|
||||
-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
|
||||
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
|
||||
64.67,95.95,3,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
|
||||
0,0,0,"","",""], // component, location, rotation, side, class and type
|
||||
|
||||
["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
|
||||
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
|
||||
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
|
||||
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
|
||||
100, -1, 0, "top", "misc", "ir_1", // ir_1
|
||||
-1, 67, 90, "top", "misc", "ir_1", // ir_1
|
||||
60, 61, 180, "top", "misc", "ir_1", // ir_1
|
||||
108.5, 67, 270, "top", "misc", "ir_1", // ir_1
|
||||
0,0,0,"","",""] // component, location, rotation, side, class and type
|
||||
];
|
||||
@@ -1,214 +0,0 @@
|
||||
/*
|
||||
SBC Models Copyright 2016,2017,2018,2019,2020,2021,2022 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
20190214 Version 1.0.0 SBC Model Framework
|
||||
20190218 Version 1.0.1 Added HK Odroid-N2 as "n2"
|
||||
20200425 Version 1.0.2 Added AtomicPi as "atomicpi"
|
||||
Added Nvidia JetsonNano as "jetsonnano"
|
||||
Updated Odroid-N2 sbc data
|
||||
Updated Odroid-H2 sbc data
|
||||
Added Odroid-C4 as"c4"
|
||||
Added oem heatsinks
|
||||
Added Odroid-XU4Q as "xu4q"
|
||||
20200725 Version 1.0.3 Added Odroid-N2+ and heatsink
|
||||
20201021 Version 1.0.4 Added HK Odroid-HC4 as "hc4"
|
||||
20220202 Version 1.0.5 Added HK Show2 as "show2"
|
||||
20220413 Version 1.0.6 Added Odroid-M1 as "m1"
|
||||
20220515 Version 1.0.7 Added rockpro64, jetsonnano, updated sbc_test.scad, sbc_test_components.scad and other fixes and adjustments
|
||||
|
||||
see https://github.com/hominoids/SBC_Case_Builder
|
||||
|
||||
USE: sbc(model)
|
||||
model = "c1+","c2","c4","xu4","xu4q","mc1","hc1","hc4","n1","n2","n2+","h2"
|
||||
"rpi3b+","a64","rock64","rockpro64","atomicpi","jetsonnano","show2"
|
||||
|
||||
*/
|
||||
|
||||
include <./sbc_models.cfg>
|
||||
use <./sbc_library.scad>
|
||||
|
||||
module sbc(model) {
|
||||
sbc_model = [model];
|
||||
s = search(sbc_model,sbc_data);
|
||||
|
||||
$fn=60;
|
||||
|
||||
// pcb and holes
|
||||
// pcbsize_x, pcbsize_y, pcbsize_z, pcbcorner_radius, topmax_component_z, bottommax_component_z
|
||||
pcbsize_x = sbc_data[s[0]][1];
|
||||
pcbsize_y = sbc_data[s[0]][2];
|
||||
pcbsize_z = sbc_data[s[0]][3];
|
||||
pcbcorner_radius = sbc_data[s[0]][4];
|
||||
difference() {
|
||||
color("tan") pcb([pcbsize_x,pcbsize_y,pcbsize_z], pcbcorner_radius);
|
||||
// pcb mounting holes
|
||||
for (i=[7:3:36]) {
|
||||
pcb_hole_x = sbc_data[s[0]][i];
|
||||
pcb_hole_y = sbc_data[s[0]][i+1];
|
||||
pcb_hole_size = sbc_data[s[0]][i+2];
|
||||
|
||||
if (pcb_hole_x!=0 && pcb_hole_y!=0) {
|
||||
translate([pcb_hole_x,pcb_hole_y,-1])
|
||||
cylinder(d=pcb_hole_size, h=5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// soc placement
|
||||
// soc1size_x, soc1size_y, soc1size_z, soc1loc_x, soc1loc_y, soc1loc_z, soc1_rotation, "soc1_side"
|
||||
for (i=[37:8:68]) {
|
||||
soc1size_x = sbc_data[s[0]][i];
|
||||
soc1size_y = sbc_data[s[0]][i+1];
|
||||
soc1size_z = sbc_data[s[0]][i+2];
|
||||
soc1loc_x = sbc_data[s[0]][i+3];
|
||||
soc1loc_y = sbc_data[s[0]][i+4];
|
||||
soc1loc_z = sbc_data[s[0]][i+5];
|
||||
soc1_rotation = sbc_data[s[0]][i+6];
|
||||
soc1_side = sbc_data[s[0]][i+7];
|
||||
|
||||
if (soc1size_x!=0 && soc1size_y!=0) {
|
||||
if (soc1_side == "top" ) {
|
||||
color("dimgray",1)
|
||||
translate([soc1loc_x,soc1loc_y,pcbsize_z])
|
||||
rotate([0,0,-soc1_rotation])
|
||||
cube([soc1size_x,soc1size_y,soc1size_z]);
|
||||
}
|
||||
if (soc1_side == "bottom") {
|
||||
color("dimgray",1)
|
||||
translate([soc1loc_x,soc1loc_y,-pcbsize_z])
|
||||
rotate([0,0,soc1_rotation])
|
||||
cube([soc1size_x,soc1size_y,soc1size_z]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// component placement loc_x, loc_y, rotation, "side", "type"
|
||||
for (i=[69:6:len(sbc_data[s[0]])]) {
|
||||
loc_x = sbc_data[s[0]][i];
|
||||
loc_y = sbc_data[s[0]][i+1];
|
||||
rotation = sbc_data[s[0]][i+2];
|
||||
side = sbc_data[s[0]][i+3];
|
||||
class = sbc_data[s[0]][i+4];
|
||||
type = sbc_data[s[0]][i+5];
|
||||
|
||||
if (class == "memory") {
|
||||
if (loc_x!=0 || loc_y!=0) {
|
||||
memory(loc_x,loc_y,rotation,side,type,pcbsize_z);
|
||||
}
|
||||
}
|
||||
if (class == "switch") {
|
||||
if (loc_x!=0 || loc_y!=0) {
|
||||
switch(loc_x,loc_y,rotation,side,type,pcbsize_z);
|
||||
}
|
||||
}
|
||||
if (class == "button") {
|
||||
if (loc_x!=0 || loc_y!=0) {
|
||||
button(loc_x,loc_y,rotation,side,type,pcbsize_z);
|
||||
}
|
||||
}
|
||||
if (class == "plug") {
|
||||
if (loc_x!=0 || loc_y!=0) {
|
||||
plug(loc_x,loc_y,rotation,side,type,pcbsize_z);
|
||||
}
|
||||
}
|
||||
if (class == "usb2") {
|
||||
if (loc_x!=0 || loc_y!=0) {
|
||||
usb2(loc_x,loc_y,rotation,side,type,pcbsize_z);
|
||||
}
|
||||
}
|
||||
if (class == "usb3") {
|
||||
if (loc_x!=0 || loc_y!=0) {
|
||||
usb3(loc_x,loc_y,rotation,side,type,pcbsize_z);
|
||||
}
|
||||
}
|
||||
if (class == "network") {
|
||||
if (loc_x!=0 || loc_y!=0) {
|
||||
network(loc_x,loc_y,rotation,side,type,pcbsize_z);
|
||||
}
|
||||
}
|
||||
if (class == "video") {
|
||||
if (loc_x!=0 || loc_y!=0) {
|
||||
video(loc_x,loc_y,rotation,side,type,pcbsize_z);
|
||||
}
|
||||
}
|
||||
if (class == "fan") {
|
||||
if (loc_x!=0 || loc_y!=0) {
|
||||
fan(loc_x,loc_y,rotation,side,type,pcbsize_z);
|
||||
}
|
||||
}
|
||||
if (class == "gpio") {
|
||||
if (loc_x!=0 || loc_y!=0) {
|
||||
gpio(loc_x,loc_y,rotation,side,type,pcbsize_z);
|
||||
}
|
||||
}
|
||||
if (class == "audio") {
|
||||
if (loc_x!=0 || loc_y!=0) {
|
||||
audio(loc_x,loc_y,rotation,side,type,pcbsize_z);
|
||||
}
|
||||
}
|
||||
if (class == "storage") {
|
||||
if (loc_x!=0 || loc_y!=0) {
|
||||
storage(loc_x,loc_y,rotation,side,type,pcbsize_z);
|
||||
}
|
||||
}
|
||||
if (class == "combo") {
|
||||
if (loc_x!=0 || loc_y!=0) {
|
||||
combo(loc_x,loc_y,rotation,side,type,pcbsize_z);
|
||||
}
|
||||
}
|
||||
if (class == "jumper") {
|
||||
if (loc_x!=0 || loc_y!=0) {
|
||||
jumper(loc_x,loc_y,rotation,side,type,pcbsize_z);
|
||||
}
|
||||
}
|
||||
if (class == "ic") {
|
||||
if (loc_x!=0 || loc_y!=0) {
|
||||
ic(loc_x,loc_y,rotation,side,type,pcbsize_z);
|
||||
}
|
||||
}
|
||||
if (class == "misc") {
|
||||
if (loc_x!=0 || loc_y!=0) {
|
||||
misc(loc_x,loc_y,rotation,side,type,pcbsize_z);
|
||||
}
|
||||
}
|
||||
if (class == "heatsink") {
|
||||
if (loc_x!=0 || loc_y!=0) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
190
lib/standoff.scad
Normal file
190
lib/standoff.scad
Normal file
@@ -0,0 +1,190 @@
|
||||
/*
|
||||
This file is part of SBC Case Builder https://github.com/hominoids/SBC_Case_Builder
|
||||
Copyright 2022,2023,2024 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
NAME: standoff
|
||||
DESCRIPTION: create standoffs
|
||||
TODO: none
|
||||
|
||||
USAGE: standoff(stand_off, mask)
|
||||
|
||||
stand_off[size, diameter, height, holesize, supportsize, supportheight, sink, pillarstyle,
|
||||
pillarsupport, reverse, insert_e, i_dia, i_depth], mask)
|
||||
|
||||
size = "m2_tap","m2","m2+","m2.5_tap","m2.5","m2.5+","m3_tap","m3","m3+","m4_tap","m4","m4+","custom"
|
||||
diameter = pillar diameter
|
||||
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, mask){
|
||||
|
||||
size = stand_off[0];
|
||||
diameter = size == "m2_tap" || size == "m2" || size == "m2+" ? 4 :
|
||||
size == "m2.5_tap" || size == "m2.5" || size == "m2.5+" ? 4 :
|
||||
size == "m3_tap" || size == "m3" || size == "m3+" ? 5 :
|
||||
size == "m4_tap" || size == "m4" || size == "m4+" ? 6 : stand_off[1];
|
||||
height = stand_off[2];
|
||||
holesize = size == "m2_tap" ? 1.6 : size == "m2" ? 2 : size == "m2+" ? 2.26 :
|
||||
size == "m2.5_tap" ? 2.05 : size == "m2.5" ? 2.5 : size == "m2.5+" ? 2.83 :
|
||||
size == "m3_tap" ? 2.5 : size == "m3" ? 3 : size == "m3+" ? 3.4 :
|
||||
size == "m4_tap" ? 3.3 : size == "m4" ? 4 : size == "m4+" ? 4.4 : stand_off[3];
|
||||
supportsize = stand_off[4];
|
||||
supportheight = stand_off[5];
|
||||
sink = stand_off[6];
|
||||
pillarstyle = stand_off[7];
|
||||
pillarsupport = stand_off[8];
|
||||
reverse = stand_off[9];
|
||||
insert_e = stand_off[10];
|
||||
i_dia = stand_off[11];
|
||||
i_depth = stand_off[12];
|
||||
enablemask = mask[0];
|
||||
mlength = mask[1];
|
||||
msetback = mask[2];
|
||||
mstyle = mask[3];
|
||||
|
||||
ps = size == "m2_tap" || size == "m2" || size == "m2+" ? 4 :
|
||||
size == "m2.5_tap" || size == "m2.5" || size == "m2.5+" ? 5 :
|
||||
size == "m3_tap" || size == "m3" || size == "m3+" ? 6.72 :
|
||||
size == "m4_tap" || size == "m4" || size == "m4+" ? 8.96 : (2*holesize)+.5;
|
||||
ds = size == "m2_tap" || size == "m2" || size == "m2+" ? 1.2 :
|
||||
size == "m2.5_tap" || size == "m2.5" || size == "m2.5+" ? 1.5 :
|
||||
size == "m3_tap" || size == "m3" || size == "m3+" ? 1.86 :
|
||||
size == "m4_tap" || size == "m4" || size == "m4+" ? 2.48 : holesize*.465;
|
||||
|
||||
adj = 0.1;
|
||||
$fn = 90;
|
||||
|
||||
if(enablemask == true && mstyle == "default") {
|
||||
if(reverse == true) {
|
||||
translate([0,0,-msetback-adj]) cylinder(d=supportsize-2*adj,h=mlength);
|
||||
}
|
||||
else {
|
||||
translate([0,0,-mlength+msetback+adj]) cylinder(d=supportsize-2*adj,h=mlength);
|
||||
}
|
||||
}
|
||||
if(enablemask == false) {
|
||||
difference (){
|
||||
union () {
|
||||
if(pillarstyle == "hex" && reverse == false) {
|
||||
rotate([0,0,30]) cylinder(d=diameter*2/sqrt(3), h=height, $fn=6);
|
||||
}
|
||||
if(pillarstyle == "hex" && reverse == true) {
|
||||
translate([0,0,-height]) rotate([0,0,30]) cylinder(d=diameter*2/sqrt(3), h=height, $fn=6);
|
||||
}
|
||||
if(pillarstyle == "round" && reverse == false) {
|
||||
cylinder(d=diameter, h=height);
|
||||
}
|
||||
if(pillarstyle == "round" && reverse == true) {
|
||||
translate([0,0,-height]) cylinder(d=diameter, 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 == "none" && reverse == false) {
|
||||
translate([0,0,-adj]) cylinder(d=holesize, h=height+(adj*2));
|
||||
}
|
||||
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=ps, d2=holesize, h=ds);
|
||||
}
|
||||
if(sink == "countersunk" && reverse == true) {
|
||||
translate([0,0,+adj-ds]) cylinder(d1=holesize, d2=ps, h=ds);
|
||||
}
|
||||
// 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(d=ps*2/sqrt(3),h=ds,$fn=6);
|
||||
}
|
||||
if(sink == "nut holder" && reverse == true) {
|
||||
translate([0,0,+adj-ds]) cylinder(d=ps*2/sqrt(3),h=ds,$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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
63
lib/vent.scad
Normal file
63
lib/vent.scad
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
This file is part of SBC Case Builder https://github.com/hominoids/SBC_Case_Builder
|
||||
Copyright 2022,2023,2024 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
vent_panel_hex(x, y, thick, cell_size, cell_spacing, border, borders);
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
NAME: vent_panel_hex
|
||||
DESCRIPTION: creates hex vent panel
|
||||
TODO: none
|
||||
|
||||
USAGE: vent_panel_hex(x, y, thick, cell_size=8, cell_spacing=3, border=3, borders="default")
|
||||
|
||||
x = #rows
|
||||
y = #columns
|
||||
thick = pattern thickness
|
||||
cell_size = size of hex
|
||||
cell_spacing = space between hex
|
||||
border = size of borber
|
||||
borders = "none", "default"
|
||||
|
||||
*/
|
||||
|
||||
module vent_panel_hex(x, y, thick, cell_size=8, cell_spacing=3, border=3, borders="default") {
|
||||
hole = 3.2;
|
||||
xb = (borders == "y" || borders == "none") ? cell_spacing : border;
|
||||
yb = (borders == "x" || borders == "none") ? cell_spacing : border;
|
||||
hxb = max(yb/2, cell_spacing + hole);
|
||||
hyb = max(xb/2, cell_spacing + hole);
|
||||
|
||||
cells_x = floor((2*(x-2*xb-cell_size)/(cell_size+cell_spacing))+1);
|
||||
cells_y = floor(((sqrt(12)*(y-2*yb)-4*cell_size)/(3*(cell_size+cell_spacing)))+1);
|
||||
csx = cell_size + (cells_x-1)*(cell_size+cell_spacing)/2;
|
||||
csy = sqrt(4/3)*cell_size + ((cell_size+cell_spacing)*sqrt(3/4)*(cells_y-1));
|
||||
|
||||
difference() {
|
||||
color("grey",1) slab([x,y,thick],2);
|
||||
color("grey",1) translate([(x-csx)/2,(y-csy)/2,-1])
|
||||
vent_hex(cells_x, cells_y, thick+3, cell_size, cell_spacing, "horizontal");
|
||||
if (borders != "none") {
|
||||
color("grey",1) translate([ hxb, hyb, -1]) cylinder(d=hole, h=thick+3);
|
||||
color("grey",1) translate([x - hxb, hyb, -1]) cylinder(d=hole, h=thick+3);
|
||||
color("grey",1) translate([ hxb, y - hyb, -1]) cylinder(d=hole, h=thick+3);
|
||||
color("grey",1) translate([x - hxb, y - hyb, -1]) cylinder(d=hole, h=thick+3);
|
||||
}
|
||||
}
|
||||
}
|
||||
208
mod/add.scad
Normal file
208
mod/add.scad
Normal file
@@ -0,0 +1,208 @@
|
||||
/*
|
||||
This file is part of SBC Case Builder https://github.com/hominoids/SBC_Case_Builder
|
||||
Copyright 2022,2023,2024 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
|
||||
NAME: add
|
||||
DESCRIPTION: places additive objects
|
||||
TODO: none
|
||||
|
||||
USAGE: add(type, loc_x, loc_y, loc_z, face, rotation, size[], data[], mask[])
|
||||
|
||||
type = component type
|
||||
loc_x = x location placement
|
||||
loc_y = y location placement
|
||||
loc_z = z location placement
|
||||
face = "top", "bottom", "left", "right", "front", "rear"
|
||||
rotation[] = object rotation
|
||||
parametric[] = parametric movement array
|
||||
size[] = size array x,y,z
|
||||
data[] = data variable on type
|
||||
mask[0] = true enables component mask
|
||||
mask[1] = mask length
|
||||
mask[2] = mask setback
|
||||
mask[3] = mstyle "default"
|
||||
|
||||
*/
|
||||
|
||||
module add(type, loc_x, loc_y, loc_z, face, rotation, size, data, mask) {
|
||||
|
||||
size_x = size[0];
|
||||
size_y = size[1];
|
||||
size_z = size[2];
|
||||
enablemask = mask[0];
|
||||
mlen = mask[1];
|
||||
msetback = mask[2];
|
||||
mstyle = mask[3];
|
||||
|
||||
if(type == "access_cover") {
|
||||
if(rotation[2] == 180) {
|
||||
color("grey",1) translate([loc_x+size_x,loc_y+size_y,loc_z]) rotate(rotation) access_cover([size_x,size_y,size_z],data[0]);
|
||||
}
|
||||
else {
|
||||
color("grey",1) translate([loc_x,loc_y,loc_z]) rotate(rotation) access_cover([size_x,size_y,size_z],data[0]);
|
||||
}
|
||||
}
|
||||
if(type == "access_panel") {
|
||||
if(rotation[2] == 180) {
|
||||
translate([loc_x+size_x,loc_y+size_y,loc_z]) rotate(rotation) access_panel([size_x,size_y,size_z],data[0],mask);
|
||||
}
|
||||
else {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) access_panel([size_x,size_y,size_z],data[0],mask);
|
||||
}
|
||||
}
|
||||
if(type == "art") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) art(data[0],data[1],data[2]);
|
||||
}
|
||||
if(type == "batt_holder") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) batt_holder(data[0]);
|
||||
}
|
||||
if(type == "button") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) buttons(data[0],[size_x,size_y,size_z],data[1],data[2],mask);
|
||||
}
|
||||
if(type == "button_assembly") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) button_assembly(data[0],size_x,size_z);
|
||||
}
|
||||
if(type == "fan_cover") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) fan_cover(size_x, size_z, data[0]);
|
||||
}
|
||||
if(type == "feet") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) feet(size_x, size_z);
|
||||
}
|
||||
if(type == "hd_holder") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hd_mount(data[0],data[1],data[2],data[3]);
|
||||
}
|
||||
if(type == "hk_boom_grill") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hk_boom_grill(data[0],size_z);
|
||||
}
|
||||
if(type == "hk_boom_speaker_holder") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hk_boom_speaker_holder(data[0],data[1]);
|
||||
}
|
||||
if(type == "hk_boom_vring") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hk_boom_vring(data[0]);
|
||||
}
|
||||
if(type == "hk_h3_port_extender_holder") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hk_h3_port_extender_holder(data[1],data[0]);
|
||||
}
|
||||
if(type == "hk_hc4_oled_holder") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hk_hc4_oled_holder(face, size_z, mask);
|
||||
}
|
||||
if(type == "hk_uart_holder") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hk_uart_holder(mask);
|
||||
}
|
||||
if(type == "hk_uart_strap") {
|
||||
color("grey",1) translate([loc_x,loc_y,loc_z]) rotate(rotation) hk_uart_strap();
|
||||
}
|
||||
if(type == "keyhole") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) keyhole(data[0],mask);
|
||||
}
|
||||
if(type == "nut_holder") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) nut_holder(data[0], data[1], size_x, size_y, size_z, mask);
|
||||
}
|
||||
if(type == "pcb_holder") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) pcb_holder([size_x,size_y,size_z],data[0]);
|
||||
}
|
||||
if(type == "rectangle") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) slab_r([size_x,size_y,size_z],data[0]);
|
||||
}
|
||||
if(type == "round") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) cylinder(d=size_x,h=size_z);
|
||||
}
|
||||
if(type == "slot") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) slot(size_x,size_y,size_z);
|
||||
}
|
||||
if(type == "sphere") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) sphere(d=size_x);
|
||||
}
|
||||
if(type == "standoff") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) standoff(data[0], mask);
|
||||
}
|
||||
if(type == "text") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) linear_extrude(height = size_z) text(data[1], size=data[0]);
|
||||
}
|
||||
if(type == "vent_panel_hex") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) vent_panel_hex(size_x, size_y, thick=size_z,
|
||||
cell_size=data[0], cell_spacing=data[1], border=data[3], borders=data[2]);
|
||||
}
|
||||
|
||||
// models
|
||||
if(type == "adafruit_lcd") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) adafruit_lcd(mask);
|
||||
}
|
||||
if(type == "dsub") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) dsub(data[0], data[1], mask);
|
||||
}
|
||||
if(type == "fan") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) fans(data[0],mask);
|
||||
}
|
||||
if(type == "hd25") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hd25(data[0],data[1],mask);
|
||||
}
|
||||
if(type == "hd35") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hd35(data[0],mask);
|
||||
}
|
||||
if(type == "hk_boom") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hk_boom(data[0],data[1],mask);
|
||||
}
|
||||
if(type == "hk_boom_speaker") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hk_boom_speaker(mask);
|
||||
}
|
||||
if(type == "hk_boom_speaker_pcb") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hk_boom_speaker_pcb(data[1],true,data[0],mask);
|
||||
}
|
||||
if(type == "hk_h3_port_extender") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hk_h3_port_extender(data[0],mask);
|
||||
}
|
||||
if(type == "hk_hc4_oled") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hk_hc4_oled(mask);
|
||||
}
|
||||
if(type == "hk_lcd35") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hk_35lcd(mask);
|
||||
}
|
||||
if(type == "hk_m1s_ups") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hk_m1s_ups(mask);
|
||||
}
|
||||
if(type == "hk_netcard") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hk_netcard(mask);
|
||||
}
|
||||
if(type == "hk_pwr_button") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hk_pwr_button(mask);
|
||||
}
|
||||
if(type == "hk_speaker") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hk_speaker(mask);
|
||||
}
|
||||
if(type == "hk_uart") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hk_uart(mask);
|
||||
}
|
||||
if(type == "hk_vu7c") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hk_vu7c(data[0],data[1],mask);
|
||||
}
|
||||
if(type == "hk_vu8m") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hk_vu8m(data[0],mask);
|
||||
}
|
||||
if(type == "hk_vu8s") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hk_vu8s(mask);
|
||||
}
|
||||
if(type == "hk_wb2") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hk_wb2();
|
||||
}
|
||||
if(type == "hk_xu4_shifter_shield") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hk_xu4_shifter_shield(mask);
|
||||
}
|
||||
if(type == "stl_model") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) stl_model(data[0],data[1]);
|
||||
}
|
||||
}
|
||||
428
mod/case_adapter.scad
Normal file
428
mod/case_adapter.scad
Normal file
@@ -0,0 +1,428 @@
|
||||
/*
|
||||
This file is part of SBC Case Builder https://github.com/hominoids/SBC_Case_Builder
|
||||
Copyright 2022,2023,2024 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
|
||||
NAME: case_adapter
|
||||
DESCRIPTION: creates adapters for legacy cases footprints
|
||||
TODO: nano-itx hole locations
|
||||
|
||||
USAGE: case_adapter(case_design)
|
||||
|
||||
*/
|
||||
|
||||
module case_adapter(case_design) {
|
||||
|
||||
mb_adapters=[
|
||||
["adapter_ssi-eeb", 304.8, 330.2, ["left_rear", 6.35, 33.02], ["middle_rear", 163.83, 10.16], ["right_rear", 288.29, 10.16],
|
||||
["left_middle", 6.35, 165.1], ["middle_middle", 163.83, 165.1], ["right_middle", 288.29, 165.1],
|
||||
["middle_middle2", 209.55, 237.49], ["right_middle2", 288.29, 237.49],
|
||||
["left_front", 6.35, 322.58], ["middle_front", 163.83, 322.58], ["right_front", 299.72, 322.58]],
|
||||
["adapter_ssi-ceb", 304.8, 266.7, ["left_rear", 6.35, 33.02], ["middle_rear", 163.83, 10.16], ["right_rear", 288.29, 10.16],
|
||||
["left_middle", 6.35, 165.1], ["middle_middle", 163.83, 165.1], ["right_middle", 288.29, 165.1],
|
||||
["middle_front", 209.55, 237.49], ["right_front", 288.29, 237.49]],
|
||||
["adapter_atx", 304.8, 243.84, ["left_rear", 6.35, 33.02], ["middle_rear", 163.83, 10.16],
|
||||
["middle2_rear", 211.99, 10.16], ["right_rear", 288.29, 10.16],
|
||||
["left_middle", 6.35, 165.1], ["middle_middle", 163.83, 165.1], ["right_middle", 288.29, 165.1],
|
||||
["left_front", 6.35, 237.49], ["middle_front", 163.83, 237.49], ["right_front", 288.29, 237.49]],
|
||||
["adapter_micro-atx", 243.84, 243.84, ["left_rear", 6.35, 33.02], ["middle_rear", 163.83, 10.16], ["right_rear", 211.99, 10.16],
|
||||
["left_middle", 6.35, 165.1], ["middle_middle", 163.83, 165.1],
|
||||
["middle2_middle", 209.55, 165.1], ["right_middle", 229.87, 165.1],
|
||||
["left_front", 6.35, 237.49], ["right_front", 163.83, 237.49]],
|
||||
["adapter_dtx", 230.2, 243.84, ["left_rear", 6.35, 33.02], ["middle_rear", 163.83, 10.16], ["right_rear", 211.99, 10.16],
|
||||
["left_middle", 6.35, 165.1], ["middle_middle", 163.83, 165.1], ["right_middle", 209.55, 165.1],
|
||||
["left_front", 6.35, 237.49], ["right_front", 163.83, 237.49]],
|
||||
["adapter_flex-atx", 228.6, 190.5, ["left_rear", 6.35, 33.02], ["middle_rear", 163.83, 10.16], ["right_rear", 211.99, 10.16],
|
||||
["left_front", 6.35, 165.1], ["middle_front", 163.83, 165.1],
|
||||
["right_front", 209.55, 165.1]],
|
||||
["adapter_mini-dtx", 203.2, 170.18, ["left_rear", 6.35, 33.02], ["right_rear", 163.83, 10.16],
|
||||
["left_front", 6.35, 165.1], ["right_front", 163.83, 165.1]],
|
||||
["adapter_mini-itx", 170, 170, ["left_rear", 6.35, 33.02], ["right_rear", 163.83, 10.16],
|
||||
["left_front", 6.35, 165.1], ["right_front", 163.83, 165.1]],
|
||||
["adapter_mini-itx_thin", 170, 170, ["left_rear", 6.35, 33.02], ["right_rear", 163.83, 10.16],
|
||||
["left_front", 6.35, 165.1], ["right_front", 163.83, 165.1]],
|
||||
["adapter_mini-stx", 140, 147, ["left_rear", 5, 5], ["right_rear", 135, 5],
|
||||
["left_front", 5, 142], ["right_front", 135, 142]],
|
||||
["adapter_mini-stx_thin", 140, 147, ["left_rear", 5, 5], ["right_rear", 135, 5],
|
||||
["left_front", 5, 142], ["right_front", 135, 142]],
|
||||
];
|
||||
|
||||
mb = search([case_design],mb_adapters);
|
||||
mba_x = mb_adapters[mb[0]][1];
|
||||
mba_y = mb_adapters[mb[0]][2];
|
||||
mba_z = floorthick;
|
||||
mba_offset_x = -8.35;
|
||||
mba_offset_y = 0;
|
||||
mba_radius = 5;
|
||||
mba_standoff = [6.75, floorthick, 4, 7, floorthick, "none", "round", "none", true, false, 0, 0];
|
||||
io_offset = 6.35;
|
||||
adj = .01;
|
||||
|
||||
difference() {
|
||||
union() {
|
||||
difference() {
|
||||
union() {
|
||||
translate([mba_offset_x,mba_offset_y,0]) slab([mba_x,mba_y,mba_z], mba_radius);
|
||||
// additive accessories
|
||||
if(accessory_name != "none") {
|
||||
for (i=[1:11:len(accessory_data[a[0]])-1]) {
|
||||
class = accessory_data[a[0]][i];
|
||||
type = accessory_data[a[0]][i+1];
|
||||
loc_x = accessory_data[a[0]][i+2];
|
||||
loc_y = accessory_data[a[0]][i+3];
|
||||
loc_z = accessory_data[a[0]][i+4];
|
||||
face = accessory_data[a[0]][i+5];
|
||||
rotation = accessory_data[a[0]][i+6];
|
||||
parametric = accessory_data[a[0]][i+7];
|
||||
size = accessory_data[a[0]][i+8];
|
||||
data = accessory_data[a[0]][i+9];
|
||||
mask = accessory_data[a[0]][i+10];
|
||||
|
||||
if(class == "add1" && face == "bottom") {
|
||||
parametric_move_add(type, loc_x, loc_y, loc_z, face, rotation, parametric, size, data, [false,mask[1],mask[2],mask[3]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// adapter standoff holes
|
||||
for (i=[2:len(mb_adapters[mb[0]])-3:len(mb_adapters[mb[0]])-3]) {
|
||||
for (c=[1:1:len(mb_adapters[mb[0]])-3]) {
|
||||
mbhole_pos = mb_adapters[mb[0]][i+c][0];
|
||||
mbhole_x = mb_adapters[mb[0]][i+c][1]+mba_offset_x;
|
||||
mbhole_y = mb_adapters[mb[0]][i+c][2]+mba_offset_y;
|
||||
mbhole_z = -floorthick;
|
||||
translate([mbhole_x,mbhole_y,-1]) cylinder(d=6.5, h=mba_z+2);
|
||||
}
|
||||
}
|
||||
|
||||
// pcb standoff holes
|
||||
if(sbc_bottom_standoffs == true) {
|
||||
for (i=[1:11:len(sbc_data[s[0]])-2]) {
|
||||
class = sbc_data[s[0]][i+1];
|
||||
type = sbc_data[s[0]][i+2];
|
||||
id = sbc_data[s[0]][i+3];
|
||||
pcbhole_x = sbc_data[s[0]][i+4]+pcb_loc_x;
|
||||
pcbhole_y = sbc_data[s[0]][i+5]+pcb_loc_y;
|
||||
pcbhole_z = sbc_data[s[0]][i+6];
|
||||
pcbhole_size = sbc_data[s[0]][i+9][0];
|
||||
pcbhole_pos = sbc_data[s[0]][i+10][4];
|
||||
|
||||
if (class == "pcbhole" && id == pcb_id && pcbhole_pos == "left_rear" &&
|
||||
bottom_rear_left_enable == true && bottom_standoff[6] != "blind") {
|
||||
translate([pcbhole_x,pcbhole_y,-1]) cylinder(d=bottom_standoff[4]-.2, h=bottom_height);
|
||||
}
|
||||
if (class == "pcbhole" && id == pcb_id && pcbhole_pos == "left_front" &&
|
||||
bottom_front_left_enable == true && bottom_standoff[6] != "blind") {
|
||||
translate([pcbhole_x,pcbhole_y,-1]) cylinder(d=bottom_standoff[4]-.2, h=bottom_height);
|
||||
}
|
||||
if (class == "pcbhole" && id == pcb_id && pcbhole_pos == "right_rear" &&
|
||||
bottom_rear_right_enable == true && bottom_standoff[6] != "blind") {
|
||||
translate([pcbhole_x,pcbhole_y,-1]) cylinder(d=bottom_standoff[4]-.2, h=bottom_height);
|
||||
}
|
||||
if (class == "pcbhole" && id == pcb_id && pcbhole_pos == "right_front" &&
|
||||
bottom_front_right_enable == true && bottom_standoff[6] != "blind") {
|
||||
translate([pcbhole_x,pcbhole_y,-1]) cylinder(d=bottom_standoff[4]-.2, h=bottom_height);
|
||||
}
|
||||
}
|
||||
}
|
||||
// bottom cover pattern
|
||||
if(bottom_cover_pattern != "solid") {
|
||||
if(bottom_cover_pattern == "hex_5mm") {
|
||||
translate([1,0,-2]) vent_hex(mba_x/3.75,mba_y/6,floorthick+4,5,1.5,"horizontal");
|
||||
}
|
||||
if(bottom_cover_pattern == "hex_8mm") {
|
||||
translate([1,2,-2]) vent_hex(mba_x/5.5,mba_y/9.5,floorthick+4,8,1.5,"horizontal");
|
||||
}
|
||||
if(bottom_cover_pattern == "linear_vertical") {
|
||||
translate([0,-gap,-2]) vent(wallthick,mba_y-2*wallthick-gap,floorthick+4,1,1,(mba_x-2*wallthick-gap)/4,"horizontal");
|
||||
}
|
||||
if(bottom_cover_pattern == "linear_horizontal") {
|
||||
translate([-gap,-gap,-2]) vent(mba_x-2*wallthick-gap,wallthick,floorthick+4,1,(mba_y-2*wallthick-gap)/3,1,"horizontal");
|
||||
}
|
||||
if(bottom_cover_pattern == "astroid") {
|
||||
for(c=[3:12:mba_y-8]) {
|
||||
for(r=[4:12:mba_x-8]) {
|
||||
translate([r,c,-4]) linear_extrude(floorthick+5) import("./dxf/astroid_8mm.dxf");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// subtractive accessories
|
||||
if(accessory_name != "none") {
|
||||
for (i=[1:11:len(accessory_data[a[0]])-1]) {
|
||||
class = accessory_data[a[0]][i];
|
||||
type = accessory_data[a[0]][i+1];
|
||||
loc_x = accessory_data[a[0]][i+2];
|
||||
loc_y = accessory_data[a[0]][i+3];
|
||||
loc_z = accessory_data[a[0]][i+4];
|
||||
face = accessory_data[a[0]][i+5];
|
||||
rotation = accessory_data[a[0]][i+6];
|
||||
parametric = accessory_data[a[0]][i+7];
|
||||
size_x = accessory_data[a[0]][i+8][0];
|
||||
size_y = accessory_data[a[0]][i+8][1];
|
||||
size_z = accessory_data[a[0]][i+8][2];
|
||||
data = accessory_data[a[0]][i+9];
|
||||
mask = accessory_data[a[0]][i+10];
|
||||
|
||||
if ((class == "sub" && face == "bottom") || class == "suball") {
|
||||
if(accessory_highlight == false) {
|
||||
parametric_move_sub(type, loc_x, loc_y, loc_z, face, rotation, parametric,
|
||||
[size_x,size_y,size_z],data, mask);
|
||||
}
|
||||
else {
|
||||
#parametric_move_sub(type,loc_x,loc_y,loc_z,face,rotation,parametric,
|
||||
[size_x,size_y,size_z],data, mask);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// create openings for additive
|
||||
if ((class == "add1" || class == "add2" || class == "model") && mask[0] == true) {
|
||||
if(accessory_highlight == false) {
|
||||
parametric_move_add(type,loc_x,loc_y,loc_z,face,rotation,parametric,[size_x,size_y,size_z],data,[true,mask[1],mask[2],mask[3]]);
|
||||
}
|
||||
else {
|
||||
#parametric_move_add(type,loc_x,loc_y,loc_z,face,rotation,parametric,[size_x,size_y,size_z],data,[true,mask[1],mask[2],mask[3]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// ui access panel
|
||||
if(bottom_access_panel_enable == true) {
|
||||
if(access_panel_rotation == 0) {
|
||||
translate([access_panel_location[0],access_panel_location[1], 0]) rotate([0,0,access_panel_rotation])
|
||||
access_panel([access_panel_size[0],access_panel_size[1],floorthick], access_panel_orientation, [true,10,2,"default"]);
|
||||
}
|
||||
if(access_panel_rotation == 90) {
|
||||
translate([access_panel_location[0]+access_panel_size[1],access_panel_location[1], 0]) rotate([0,0,access_panel_rotation])
|
||||
access_panel([access_panel_size[0],access_panel_size[1],floorthick], access_panel_orientation, [true,10,2,"default"]);
|
||||
}
|
||||
if(access_panel_rotation == 180) {
|
||||
translate([access_panel_location[0]+access_panel_size[0],access_panel_location[1]+access_panel_size[1],0]) rotate([0,0,access_panel_rotation])
|
||||
access_panel([access_panel_size[0],access_panel_size[1],floorthick], access_panel_orientation, [true,10,2,"default"]);
|
||||
}
|
||||
if(access_panel_rotation == 270) {
|
||||
translate([access_panel_location[0],access_panel_location[1]+access_panel_size[0], 0]) rotate([0,0,access_panel_rotation])
|
||||
access_panel([access_panel_size[0],access_panel_size[1],floorthick], access_panel_orientation, [true,10,2,"default"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
// adapter standoffs
|
||||
for (i=[2:len(mb_adapters[mb[0]])-3:len(mb_adapters[mb[0]])-3]) {
|
||||
for (c=[1:1:len(mb_adapters[mb[0]])-3]) {
|
||||
mbhole_pos = mb_adapters[mb[0]][i+c][0];
|
||||
mbhole_x = mb_adapters[mb[0]][i+c][1]+mba_offset_x;
|
||||
mbhole_y = mb_adapters[mb[0]][i+c][2]+mba_offset_y;
|
||||
mbhole_z = -floorthick;
|
||||
translate([mbhole_x,mbhole_y,floorthick]) standoff(mba_standoff,[false,10,2,"default"]);
|
||||
}
|
||||
}
|
||||
// pcb standoffs
|
||||
if(sbc_bottom_standoffs == true) {
|
||||
for (i=[1:11:len(sbc_data[s[0]])-2]) {
|
||||
class = sbc_data[s[0]][i+1];
|
||||
type = sbc_data[s[0]][i+2];
|
||||
id = sbc_data[s[0]][i+3];
|
||||
pcbhole_x = sbc_data[s[0]][i+4]+pcb_loc_x;
|
||||
pcbhole_y = sbc_data[s[0]][i+5]+pcb_loc_y;
|
||||
pcbhole_z = sbc_data[s[0]][i+6];
|
||||
pcbhole_size = sbc_data[s[0]][i+9][0];
|
||||
pcbhole_pos = sbc_data[s[0]][i+10][4];
|
||||
|
||||
if(class == "pcbhole" && id == pcb_id &&
|
||||
(pcbhole_pos == "left_rear" || pcbhole_pos == "left_front" || pcbhole_pos == "right_rear" || pcbhole_pos == "right_front")) {
|
||||
if (pcbhole_pos == "left_rear" && bottom_rear_left_enable == true) {
|
||||
bottom_support = bottom_sidewall_support == true ? bottom_rear_left_support : "none";
|
||||
pcb_standoff = [bottom_standoff[0],
|
||||
bottom_standoff[1],
|
||||
bottom_height-pcb_z+pcb_loc_z+bottom_rear_left_adjust,
|
||||
bottom_standoff[3],
|
||||
bottom_standoff[4],
|
||||
bottom_standoff[5],
|
||||
bottom_standoff[6],
|
||||
bottom_standoff[7],
|
||||
bottom_support,
|
||||
bottom_standoff[9],
|
||||
bottom_standoff[10],
|
||||
bottom_standoff[11],
|
||||
bottom_standoff[12]];
|
||||
translate([pcbhole_x,pcbhole_y,0]) standoff(pcb_standoff,[false,10,2,"default"]);
|
||||
}
|
||||
if (pcbhole_pos == "left_front" && bottom_front_left_enable == true) {
|
||||
bottom_support = bottom_sidewall_support == true ? bottom_front_left_support : "none";
|
||||
pcb_standoff = [bottom_standoff[0],
|
||||
bottom_standoff[1],
|
||||
bottom_height-pcb_z+pcb_loc_z+bottom_front_left_adjust,
|
||||
bottom_standoff[3],
|
||||
bottom_standoff[4],
|
||||
bottom_standoff[5],
|
||||
bottom_standoff[6],
|
||||
bottom_standoff[7],
|
||||
bottom_support,
|
||||
bottom_standoff[9],
|
||||
bottom_standoff[10],
|
||||
bottom_standoff[11],
|
||||
bottom_standoff[12]];
|
||||
translate([pcbhole_x,pcbhole_y,0]) standoff(pcb_standoff,[false,10,2,"default"]);
|
||||
}
|
||||
if (pcbhole_pos == "right_rear" && bottom_rear_right_enable == true) {
|
||||
bottom_support = bottom_sidewall_support == true ? bottom_rear_right_support : "none";
|
||||
pcb_standoff = [bottom_standoff[0],
|
||||
bottom_standoff[1],
|
||||
bottom_height-pcb_z+pcb_loc_z+bottom_rear_right_adjust,
|
||||
bottom_standoff[3],
|
||||
bottom_standoff[4],
|
||||
bottom_standoff[5],
|
||||
bottom_standoff[6],
|
||||
bottom_standoff[7],
|
||||
bottom_support,
|
||||
bottom_standoff[9],
|
||||
bottom_standoff[10],
|
||||
bottom_standoff[11],
|
||||
bottom_standoff[12]];
|
||||
translate([pcbhole_x,pcbhole_y,0]) standoff(pcb_standoff,[false,10,2,"default"]);
|
||||
}
|
||||
if (pcbhole_pos == "right_front" && bottom_front_right_enable == true) {
|
||||
bottom_support = bottom_sidewall_support == true ? bottom_front_right_support : "none";
|
||||
pcb_standoff = [bottom_standoff[0],
|
||||
bottom_standoff[1],
|
||||
bottom_height-pcb_z+pcb_loc_z+bottom_front_right_adjust,
|
||||
bottom_standoff[3],
|
||||
bottom_standoff[4],
|
||||
bottom_standoff[5],
|
||||
bottom_standoff[6],
|
||||
bottom_standoff[7],
|
||||
bottom_support,
|
||||
bottom_standoff[9],
|
||||
bottom_standoff[10],
|
||||
bottom_standoff[11],
|
||||
bottom_standoff[12]];
|
||||
translate([pcbhole_x,pcbhole_y,0]) standoff(pcb_standoff,[false,10,2,"default"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
translate([mba_offset_x-10, -10, -1]) cube([mba_x+20, 10, floorthick+10]);
|
||||
}
|
||||
// additive accessories
|
||||
if(accessory_name != "none") {
|
||||
for (i=[1:11:len(accessory_data[a[0]])-1]) {
|
||||
class = accessory_data[a[0]][i];
|
||||
type = accessory_data[a[0]][i+1];
|
||||
loc_x = accessory_data[a[0]][i+2];
|
||||
loc_y = accessory_data[a[0]][i+3];
|
||||
loc_z = accessory_data[a[0]][i+4];
|
||||
face = accessory_data[a[0]][i+5];
|
||||
rotation = accessory_data[a[0]][i+6];
|
||||
parametric = accessory_data[a[0]][i+7];
|
||||
size = accessory_data[a[0]][i+8];
|
||||
data = accessory_data[a[0]][i+9];
|
||||
mask = accessory_data[a[0]][i+10];
|
||||
|
||||
if(class == "add2" && face == "bottom") {
|
||||
parametric_move_add(type, loc_x, loc_y, loc_z, face, rotation, parametric, size, data, [false,mask[1],mask[2],mask[3]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
// ui access port
|
||||
if(bottom_access_panel_enable == true) {
|
||||
if(access_panel_rotation == 0) {
|
||||
translate([access_panel_location[0],access_panel_location[1], 0]) rotate([0,0,access_panel_rotation])
|
||||
access_panel([access_panel_size[0],access_panel_size[1],floorthick], access_panel_orientation, [false,10,2,"default"]);
|
||||
}
|
||||
if(access_panel_rotation == 90) {
|
||||
translate([access_panel_location[0]+access_panel_size[1],access_panel_location[1], 0]) rotate([0,0,access_panel_rotation])
|
||||
access_panel([access_panel_size[0],access_panel_size[1],floorthick], access_panel_orientation, [false,10,2,"default"]);
|
||||
}
|
||||
if(access_panel_rotation == 180) {
|
||||
translate([access_panel_location[0]+access_panel_size[0],access_panel_location[1]+access_panel_size[1],0]) rotate([0,0,access_panel_rotation])
|
||||
access_panel([access_panel_size[0],access_panel_size[1],floorthick], access_panel_orientation, [false,10,2,"default"]);
|
||||
}
|
||||
if(access_panel_rotation == 270) {
|
||||
translate([access_panel_location[0],access_panel_location[1]+access_panel_size[0], 0]) rotate([0,0,access_panel_rotation])
|
||||
access_panel([access_panel_size[0],access_panel_size[1],floorthick], access_panel_orientation, [false,10,2,"default"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: io_shield
|
||||
DESCRIPTION: creates rear io panel for legacy cases
|
||||
TODO: none
|
||||
|
||||
USAGE: io_shield()
|
||||
|
||||
*/
|
||||
module io_shield() {
|
||||
|
||||
io_window_x = case_design == "adapter_mini-stx_thin" || case_design == ("adapter_mini-stx") ? 123.95 : 158.75;
|
||||
io_window_y = 4;
|
||||
io_window_z = case_design == "adapter_mini-stx" ? 40 : case_design == "adapter_mini-stx_thin" || case_design == "adapter_mini-itx_thin" ? 25 : 44;
|
||||
io_offset = case_design == "adapter_mini-stx_thin" || case_design == "adapter_mini-stx" ? 1.2 : 10.79;
|
||||
|
||||
difference() {
|
||||
union() {
|
||||
translate([-1,io_window_y-1,-1]) cube([io_window_x+2,1,io_window_z+2]);
|
||||
cube([io_window_x,4,io_window_z]);
|
||||
}
|
||||
translate([2,-2,2]) cube([io_window_x-4,5,io_window_z-4]);
|
||||
translate([io_offset+pcb_loc_x,6+pcb_loc_y,bottom_height-pcb_z+pcb_loc_z+2])
|
||||
sbc(sbc_model, cooling, fan_size, gpio_opening, uart_opening, true);
|
||||
// subtractive accessories
|
||||
if(accessory_name != "none") {
|
||||
for (i=[1:11:len(accessory_data[a[0]])-1]) {
|
||||
class = accessory_data[a[0]][i];
|
||||
type = accessory_data[a[0]][i+1];
|
||||
loc_x = accessory_data[a[0]][i+2]+io_offset;
|
||||
loc_y = accessory_data[a[0]][i+3]+io_window_y;
|
||||
loc_z = accessory_data[a[0]][i+4]+2;
|
||||
face = accessory_data[a[0]][i+5];
|
||||
rotation = accessory_data[a[0]][i+6];
|
||||
parametric = accessory_data[a[0]][i+7];
|
||||
size_x = accessory_data[a[0]][i+8][0];
|
||||
size_y = accessory_data[a[0]][i+8][1];
|
||||
size_z = accessory_data[a[0]][i+8][2];
|
||||
data = accessory_data[a[0]][i+9];
|
||||
mask = accessory_data[a[0]][i+10];
|
||||
|
||||
if ((class == "sub" && face == "bottom") || class == "suball") {
|
||||
if(accessory_highlight == false) {
|
||||
parametric_move_sub(type, loc_x, loc_y, loc_z, face, rotation, parametric,
|
||||
[size_x,size_y,size_z],data, mask);
|
||||
}
|
||||
else {
|
||||
#parametric_move_sub(type,loc_x,loc_y,loc_z,face,rotation,parametric,
|
||||
[size_x,size_y,size_z],data, mask);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// create openings for additive
|
||||
if ((class == "add1" || class == "add2" || class == "model") && mask[0] == true) {
|
||||
if(accessory_highlight == false) {
|
||||
parametric_move_add(type,loc_x,loc_y,loc_z,face,rotation,parametric,[size_x,size_y,size_z],data,[true,mask[1],mask[2],mask[3]]);
|
||||
}
|
||||
else {
|
||||
#parametric_move_add(type,loc_x,loc_y,loc_z,face,rotation,parametric,[size_x,size_y,size_z],data,[true,mask[1],mask[2],mask[3]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
778
mod/case_bottom.scad
Normal file
778
mod/case_bottom.scad
Normal file
@@ -0,0 +1,778 @@
|
||||
/*
|
||||
This file is part of SBC Case Builder https://github.com/hominoids/SBC_Case_Builder
|
||||
Copyright 2022,2023,2024 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
|
||||
NAME: case_bottom
|
||||
DESCRIPTION: creates case bottom for supported designs
|
||||
TODO: none
|
||||
|
||||
USAGE: case_bottom(case_design)
|
||||
|
||||
*/
|
||||
|
||||
module case_bottom(case_design) {
|
||||
|
||||
lip = 5;
|
||||
vu_rotation = [15,0,0];
|
||||
case_fn = 360; // circle segments for round cases
|
||||
case_ffn = 90; // circle segments for fillet of round cases
|
||||
|
||||
difference() {
|
||||
union() {
|
||||
difference() {
|
||||
union() {
|
||||
if(case_design == "shell") {
|
||||
difference() {
|
||||
translate([(width/2)-wallthick-gap,(depth/2)-wallthick-gap,bottom_height/2])
|
||||
cube_fillet_inside([width,depth,bottom_height],
|
||||
vertical=[corner_fillet,corner_fillet,corner_fillet,corner_fillet],
|
||||
top=[0,0,0,0], bottom=[edge_fillet,edge_fillet,edge_fillet,edge_fillet,edge_fillet], $fn=90);
|
||||
translate([(width/2)-wallthick-gap,
|
||||
(depth/2)-wallthick-gap,(bottom_height/2)+floorthick])
|
||||
cube_fillet_inside([width-(wallthick*2),depth-(wallthick*2),bottom_height],
|
||||
vertical=[corner_fillet-1,corner_fillet-1,corner_fillet-1,corner_fillet-1],
|
||||
top=[0,0,0,0], bottom=[edge_fillet,edge_fillet,edge_fillet,edge_fillet,edge_fillet], $fn=90);
|
||||
}
|
||||
}
|
||||
if(case_design == "panel") {
|
||||
union() {
|
||||
translate([-gap,-gap,0])
|
||||
cube([width-(2*wallthick),depth-(2*wallthick),floorthick]);
|
||||
translate([(width*(1/5))-8-(wallthick+gap),depth-(2*wallthick)-gap-adj,0])
|
||||
cube([8,wallthick+2*adj,floorthick]);
|
||||
translate([width-(width*(1/5))-(wallthick+gap),depth-(2*wallthick)-gap-adj,0])
|
||||
cube([8,wallthick+2*adj,floorthick]);
|
||||
translate([(width*(1/5))-8-(wallthick+gap),-wallthick-gap+adj,0])
|
||||
cube([8,wallthick+2*adj,floorthick]);
|
||||
translate([width-(width*(1/5))-(wallthick+gap),-wallthick-gap+adj,0])
|
||||
cube([8,wallthick+2*adj,floorthick]);
|
||||
}
|
||||
}
|
||||
if(case_design == "stacked") {
|
||||
translate([(width/2)-wallthick-gap,(depth/2)-wallthick-gap,floorthick/2])
|
||||
cube_fillet_inside([width-(2*wallthick),depth-(2*wallthick),floorthick],
|
||||
vertical=[corner_fillet,corner_fillet,corner_fillet,corner_fillet],
|
||||
top=[0,0,0,0], bottom=[0,0,0,0], $fn=90);
|
||||
}
|
||||
if(case_design == "tray" || case_design == "tray_vu5" || case_design == "tray_vu7" || case_design == "tray_sides") {
|
||||
difference() {
|
||||
translate([(width/2)-wallthick-gap,(depth/2)-wallthick-gap,(bottom_height)/2])
|
||||
cube_fillet_inside([width,depth,bottom_height],
|
||||
vertical=[0,0,0,0], top=[0,0,0,0],
|
||||
bottom=[edge_fillet,edge_fillet,edge_fillet,edge_fillet,edge_fillet], $fn=90);
|
||||
translate([(width/2)-wallthick-gap,(depth/2)-wallthick-gap,(bottom_height/2)+floorthick])
|
||||
cube_fillet_inside([width-(wallthick*2),depth-(wallthick*2),bottom_height+adj],
|
||||
vertical=[corner_fillet-1,corner_fillet-1,corner_fillet-1,corner_fillet-1],
|
||||
top=[0,0,0,0],bottom=[2,2,2,2], $fn=90);
|
||||
}
|
||||
// case nut placement
|
||||
for (i=[1:11:len(sbc_data[s[0]])-2]) {
|
||||
class = sbc_data[s[0]][i+1];
|
||||
type = sbc_data[s[0]][i+2];
|
||||
id = sbc_data[s[0]][i+3];
|
||||
pcbhole_x = sbc_data[s[0]][i+4]+pcb_loc_x;
|
||||
pcbhole_y = sbc_data[s[0]][i+5]+pcb_loc_y;
|
||||
pcbhole_z = sbc_data[s[0]][i+6];
|
||||
pcbhole_size = sbc_data[s[0]][i+9][0];
|
||||
pcbhole_pos = sbc_data[s[0]][i+10][4];
|
||||
|
||||
if(class == "pcbhole" && id == pcb_id && pcbhole_pos == "left_rear") {
|
||||
if((pcbhole_y <= 10 && pcbhole_x <= 10) || (ext_bottom_standoffs == true && ext_bottom_rear_left_enable == true)) {
|
||||
translate([-adj-gap,wallthick+gap+10,floorthick+3.4]) rotate([90,0,90])
|
||||
cylinder(d=10, h=4, $fn=6);
|
||||
}
|
||||
else {
|
||||
translate([-adj-gap,wallthick+gap+2,floorthick+3.4]) rotate([90,0,90])
|
||||
cylinder(d=10, h=4, $fn=6);
|
||||
}
|
||||
}
|
||||
if(class == "pcbhole" && id == pcb_id && pcbhole_pos == "left_front") {
|
||||
if((pcbhole_y >= pcb_depth+case_offset_y-10 && pcbhole_x <= 10) || (ext_bottom_standoffs == true && ext_bottom_front_left_enable == true)) {
|
||||
translate([-adj-gap,wallthick-gap+pcb_depth+case_offset_y-14,floorthick+3.4])
|
||||
rotate([90,0,90]) cylinder(d=10, h=4, $fn=6);
|
||||
}
|
||||
else {
|
||||
translate([-adj-gap,wallthick+gap+pcb_depth+case_offset_y-8,floorthick+3.4])
|
||||
rotate([90,0,90]) cylinder(d=10, h=4, $fn=6);
|
||||
}
|
||||
}
|
||||
if(class == "pcbhole" && id == pcb_id && pcbhole_pos == "right_rear") {
|
||||
if((pcbhole_y <= 10 && pcbhole_x >= pcb_width-10) || (ext_bottom_standoffs == true && ext_bottom_rear_right_enable == true)) {
|
||||
translate([width-wallthick-gap-wallthick-4+adj,wallthick+gap+10,floorthick+3.4])
|
||||
rotate([90,0,90]) cylinder(d=10, h=4, $fn=6);
|
||||
}
|
||||
else {
|
||||
translate([width-wallthick-gap-wallthick-4+adj,wallthick+gap+2,floorthick+3.4])
|
||||
rotate([90,0,90]) cylinder(d=10, h=4, $fn=6);
|
||||
}
|
||||
}
|
||||
if(class == "pcbhole" && id == pcb_id && pcbhole_pos == "right_front") {
|
||||
if((pcbhole_y >= pcb_depth+case_offset_y-10 && pcbhole_x >= width-10) || (ext_bottom_standoffs == true && ext_bottom_front_right_enable == true)) {
|
||||
translate([width-wallthick-gap-wallthick-4+adj,wallthick-gap+pcb_depth+case_offset_y-14,floorthick+3.4])
|
||||
rotate([90,0,90]) cylinder(d=10, h=4, $fn=6);
|
||||
}
|
||||
else {
|
||||
translate([width-wallthick-gap-wallthick-4+adj,wallthick+gap+pcb_depth+case_offset_y-8,floorthick+3.4])
|
||||
rotate([90,0,90]) cylinder(d=10, h=4, $fn=6);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// front panel
|
||||
if(case_design == "tray_vu5" || case_design == "tray_vu7" || case_design == "tray_sides") {
|
||||
translate([-wallthick-gap,depth-(2*wallthick)-gap,bottom_height-adj])
|
||||
rotate([0,0,0]) cube([width,wallthick,top_height]);
|
||||
}
|
||||
else {
|
||||
translate([-wallthick-gap,depth-(2*wallthick)-gap,bottom_height-adj])
|
||||
rotate([0,0,0]) cube([width,wallthick,top_height-floorthick]);
|
||||
}
|
||||
|
||||
// rear panel
|
||||
translate([-wallthick-gap,-wallthick-gap,bottom_height-adj])
|
||||
cube([width,wallthick,top_height-floorthick]);
|
||||
|
||||
}
|
||||
if(case_design == "round") {
|
||||
difference() {
|
||||
translate([pcb_width/2,pcb_depth/2,bottom_height/2]) rotate([0,0,30])
|
||||
cylinder_fillet_inside(h=bottom_height, r=case_diameter/2,
|
||||
top=0, bottom=edge_fillet, $fn=case_fn, fillet_fn=case_ffn, center=true);
|
||||
translate([pcb_width/2,pcb_depth/2,(bottom_height/2)+floorthick]) rotate([0,0,30])
|
||||
cylinder_fillet_inside(h=bottom_height+adj, r=(case_diameter/2)-lip/2,
|
||||
top=0, bottom=edge_fillet-1, $fn=case_fn, fillet_fn=case_ffn, center=true);
|
||||
difference() {
|
||||
translate([pcb_width/2,pcb_depth/2,bottom_height-lip]) rotate([0,0,30])
|
||||
cylinder(h=lip+adj, r=(case_diameter/2)+1, $fn=case_fn);
|
||||
translate([pcb_width/2,pcb_depth/2,bottom_height-lip]) rotate([0,0,30])
|
||||
cylinder(h=lip+2*adj, r=(case_diameter/2)-lip/4, $fn=case_fn);
|
||||
}
|
||||
}
|
||||
difference() {
|
||||
translate([pcb_width/2,pcb_depth/2,(bottom_height/2)+2*floorthick]) rotate([0,0,30])
|
||||
cylinder_fillet_inside(h=bottom_height+adj+floorthick+lip,
|
||||
r=(case_diameter/2)-lip/2,top=0,bottom=edge_fillet-1, $fn=case_fn,
|
||||
fillet_fn=case_ffn, center=true);
|
||||
if(width/depth >= 1.4 && sbc_model != "vim1" && sbc_model != "vim2" &&
|
||||
sbc_model != "vim3l" && sbc_model != "vim3" && sbc_model != "vim4" &&
|
||||
sbc_model != "rpizero" && sbc_model != "rpizero2w") {
|
||||
translate([-16,(depth/2)-150,-adj])
|
||||
cube([width+10,300,case_z-2*floorthick-2]);
|
||||
translate([width-9,(depth/2)-62.5,bottom_height-2*adj])
|
||||
cube([20,110,top_height-2*floorthick-2]);
|
||||
}
|
||||
else {
|
||||
translate([-width/2,0,-adj])
|
||||
cube([300,depth+100,case_z-2*floorthick-2]);
|
||||
translate([(-width+50)/2,-50,bottom_height-2*adj])
|
||||
cube([width+50,50+adj,top_height-2*floorthick-2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(case_design == "hex") {
|
||||
if(width/depth >= 1.4 && sbc_model != "vim1" && sbc_model != "vim2" &&
|
||||
sbc_model != "vim3l" && sbc_model != "vim3" && sbc_model != "vim4" &&
|
||||
sbc_model != "rpizero" && sbc_model != "rpizero2w") {
|
||||
difference() {
|
||||
translate([pcb_width/2,pcb_depth/2,bottom_height/2]) rotate([0,0,30])
|
||||
cylinder_fillet_inside(h=bottom_height, r=case_diameter/2,
|
||||
top=0, bottom=edge_fillet, $fn=6, fillet_fn=case_ffn, center=true);
|
||||
translate([pcb_width/2,pcb_depth/2,(bottom_height/2)+floorthick]) rotate([0,0,30])
|
||||
cylinder_fillet_inside(h=bottom_height+adj,r=(case_diameter/2)-lip/2,top=0,
|
||||
bottom=edge_fillet-1,$fn=6,fillet_fn=case_ffn, center=true);
|
||||
difference() {
|
||||
translate([pcb_width/2,pcb_depth/2,bottom_height-lip]) rotate([0,0,30])
|
||||
cylinder(h=lip+adj,r=(case_diameter/2)+1, $fn=6);
|
||||
translate([pcb_width/2,pcb_depth/2,bottom_height-lip]) rotate([0,0,30])
|
||||
cylinder(h=lip+2*adj,r=(case_diameter/2)-lip/4, $fn=6);
|
||||
}
|
||||
}
|
||||
difference() {
|
||||
translate([pcb_width/2,pcb_depth/2,(bottom_height/2)+2*floorthick]) rotate([0,0,30])
|
||||
cylinder_fillet_inside(h=bottom_height+adj+floorthick+lip,
|
||||
r=(case_diameter/2)-lip/2,top=0, bottom=edge_fillet-1, $fn=6,
|
||||
fillet_fn=case_ffn, center=true);
|
||||
translate([-16,(depth/2)-150,-adj])
|
||||
cube([width+10,300,case_z-2*floorthick-2]);
|
||||
translate([width-9,(depth/2)-62.5,bottom_height-2*adj])
|
||||
cube([20,110,top_height-2*floorthick-2]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
difference() {
|
||||
translate([pcb_width/2,pcb_depth/2,bottom_height/2]) rotate([0,0,0])
|
||||
cylinder_fillet_inside(h=bottom_height, r=hex_diameter/2,
|
||||
top=0, bottom=edge_fillet, $fn=6, fillet_fn=case_ffn, center=true);
|
||||
translate([pcb_width/2,pcb_depth/2,(bottom_height/2)+floorthick]) rotate([0,0,0])
|
||||
cylinder_fillet_inside(h=bottom_height+adj,r=(hex_diameter/2)-lip/2,top=0,
|
||||
bottom=edge_fillet-1,$fn=6,fillet_fn=case_ffn, center=true);
|
||||
difference() {
|
||||
translate([pcb_width/2,pcb_depth/2,bottom_height-lip]) rotate([0,0,0])
|
||||
cylinder(h=lip+adj,r=(hex_diameter/2)+1, $fn=6);
|
||||
translate([pcb_width/2,pcb_depth/2,bottom_height-lip]) rotate([0,0,0])
|
||||
cylinder(h=lip+2*adj,r=(hex_diameter/2)-lip/4, $fn=6);
|
||||
}
|
||||
}
|
||||
difference() {
|
||||
translate([pcb_width/2,pcb_depth/2,(bottom_height/2)+2*floorthick]) rotate([0,0,0])
|
||||
cylinder_fillet_inside(h=bottom_height+adj+floorthick+lip,
|
||||
r=(hex_diameter/2)-lip/2,top=0, bottom=edge_fillet-1, $fn=6,
|
||||
fillet_fn=case_ffn, center=true);
|
||||
translate([-width/2,0,-adj])
|
||||
cube([300,depth+100,case_z-2*floorthick-2]);
|
||||
translate([(-width+50)/2,-50,bottom_height-2*adj])
|
||||
cube([width+50,50+adj,top_height-2*floorthick-2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(case_design == "snap") {
|
||||
difference() {
|
||||
translate([(width/2)-wallthick-gap,(depth/2)-wallthick-gap,(floorthick+case_z)/2])
|
||||
cube_fillet_inside([width,depth,floorthick+case_z],
|
||||
vertical=[corner_fillet,corner_fillet,corner_fillet,corner_fillet],
|
||||
top=[0,0,0,0], bottom=[edge_fillet,edge_fillet,edge_fillet,edge_fillet,edge_fillet], $fn=90);
|
||||
translate([(width/2)-wallthick-gap,(depth/2)-wallthick-gap,floorthick+(floorthick+case_z)/2])
|
||||
cube_fillet_inside([width-(wallthick*2),depth-(wallthick*2),case_z+floorthick],
|
||||
vertical=[corner_fillet-1,corner_fillet-1,corner_fillet-1,corner_fillet-1],
|
||||
top=[0,0,0,0], bottom=[edge_fillet,edge_fillet,edge_fillet,edge_fillet,edge_fillet], $fn=90);
|
||||
// snap top indent
|
||||
translate([-gap-wallthick+.75,(depth/2)-(depth*.75)/2-gap-wallthick,case_z-.5])
|
||||
rotate([0,45,0]) cube([4,depth*.75,4]);
|
||||
translate([width-wallthick-gap-6.25,(depth/2)-(depth*.75)/2-gap-wallthick,case_z-.5])
|
||||
rotate([0,45,0]) cube([4,depth*.75,4]);
|
||||
}
|
||||
}
|
||||
if(case_design == "fitted") {
|
||||
difference() {
|
||||
translate([(width/2)-wallthick-gap,(depth/2)-wallthick-gap,case_z/2])
|
||||
cube_fillet_inside([width,depth,case_z],
|
||||
vertical=[corner_fillet,corner_fillet,corner_fillet,corner_fillet],
|
||||
top=[0,0,0,0], bottom=[edge_fillet,edge_fillet,edge_fillet,edge_fillet,edge_fillet], $fn=90);
|
||||
translate([(width/2)-wallthick-gap,
|
||||
(depth/2)-wallthick-gap,(case_z/2)+floorthick])
|
||||
cube_fillet_inside([width-(wallthick*2),depth-(wallthick*2),case_z],
|
||||
vertical=[corner_fillet-1,corner_fillet-1,corner_fillet-1,corner_fillet-1],
|
||||
top=[0,0,0,0], bottom=[edge_fillet,edge_fillet,edge_fillet,edge_fillet,edge_fillet], $fn=90);
|
||||
difference() {
|
||||
translate([(width/2)-wallthick-gap,(depth/2)-wallthick-gap,case_z-lip/2])
|
||||
cube_fillet_inside([width+adj,depth+adj,lip+adj],
|
||||
vertical=[corner_fillet,corner_fillet,corner_fillet,corner_fillet],
|
||||
top=[0,0,0,0],bottom=[edge_fillet,edge_fillet,edge_fillet,edge_fillet,edge_fillet], $fn=90);
|
||||
|
||||
translate([(width/2)-wallthick-gap,(depth/2)-wallthick-gap,case_z-lip/2])
|
||||
cube_fillet_inside([width-wallthick,depth-wallthick,lip+adj],
|
||||
vertical=[corner_fillet-1,corner_fillet-1,corner_fillet-1,corner_fillet-1],top=[0,0,0,0],
|
||||
bottom=[edge_fillet,edge_fillet,edge_fillet,edge_fillet,edge_fillet], $fn=90);
|
||||
}
|
||||
}
|
||||
}
|
||||
// additive accessories
|
||||
if(accessory_name != "none") {
|
||||
for (i=[1:11:len(accessory_data[a[0]])-1]) {
|
||||
class = accessory_data[a[0]][i];
|
||||
type = accessory_data[a[0]][i+1];
|
||||
loc_x = accessory_data[a[0]][i+2];
|
||||
loc_y = accessory_data[a[0]][i+3];
|
||||
loc_z = accessory_data[a[0]][i+4];
|
||||
face = accessory_data[a[0]][i+5];
|
||||
rotation = accessory_data[a[0]][i+6];
|
||||
parametric = accessory_data[a[0]][i+7];
|
||||
size = accessory_data[a[0]][i+8];
|
||||
data = accessory_data[a[0]][i+9];
|
||||
mask = accessory_data[a[0]][i+10];
|
||||
|
||||
if(class == "add1" && face == "bottom") {
|
||||
parametric_move_add(type, loc_x, loc_y, loc_z, face, rotation, parametric, size, data, [false,mask[1],mask[2],mask[3]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// tray side attachment holes
|
||||
if(case_design == "tray" || case_design == "tray_vu5" || case_design == "tray_vu7" || case_design == "tray_sides") {
|
||||
for (i=[1:11:len(sbc_data[s[0]])-2]) {
|
||||
class = sbc_data[s[0]][i+1];
|
||||
type = sbc_data[s[0]][i+2];
|
||||
id = sbc_data[s[0]][i+3];
|
||||
pcbhole_x = sbc_data[s[0]][i+4]+pcb_loc_x;
|
||||
pcbhole_y = sbc_data[s[0]][i+5]+pcb_loc_y;
|
||||
pcbhole_z = sbc_data[s[0]][i+6];
|
||||
pcbhole_size = sbc_data[s[0]][i+9][0];
|
||||
pcbhole_pos = sbc_data[s[0]][i+10][4];
|
||||
|
||||
if(class == "pcbhole" && id == pcb_id && pcbhole_pos == "left_rear") {
|
||||
if((pcbhole_y <= 10 && pcbhole_x <= 10) || (ext_bottom_standoffs == true && ext_bottom_rear_left_enable == true)) {
|
||||
translate([-wallthick-gap-adj-6,wallthick+gap+10,floorthick+3.4]) rotate([0,90,0])
|
||||
cylinder(d=3, h=10+sidethick+(2*adj));
|
||||
translate([-gap+.6,wallthick+gap+10,floorthick+3.4]) rotate([90,0,90])
|
||||
cylinder(d=6.6, h=3.5, $fn=6);
|
||||
}
|
||||
else {
|
||||
translate([-wallthick-gap-adj-6,wallthick+gap+2,floorthick+3.4]) rotate([0,90,0])
|
||||
cylinder(d=3, h=10+sidethick+(2*adj));
|
||||
translate([-gap+.6,wallthick+gap+2,floorthick+3.4]) rotate([90,0,90])
|
||||
cylinder(d=6.6, h=3.5, $fn=6);
|
||||
}
|
||||
}
|
||||
if(class == "pcbhole" && id == pcb_id && pcbhole_pos == "left_front") {
|
||||
if((pcbhole_y >= pcb_depth+case_offset_y-10 && pcbhole_x <= 10) || (ext_bottom_standoffs == true && ext_bottom_front_left_enable == true)) {
|
||||
translate([-wallthick-gap-adj-6,wallthick-gap+pcb_depth+case_offset_y-14,
|
||||
floorthick+3.4]) rotate([0,90,0]) cylinder(d=3, h=10+sidethick+(2*adj));
|
||||
translate([-gap+.6,wallthick-gap+pcb_depth+case_offset_y-14,floorthick+3.4])
|
||||
rotate([90,0,90]) cylinder(d=6.6, h=3.5, $fn=6);
|
||||
}
|
||||
else {
|
||||
echo(pcb_depth+case_offset_y-10);
|
||||
translate([-wallthick-gap-adj-6,wallthick+gap+pcb_depth+case_offset_y-8,
|
||||
floorthick+3.4]) rotate([0,90,0]) cylinder(d=3, h=10+sidethick+(2*adj));
|
||||
translate([-gap+.6,wallthick+gap+pcb_depth+case_offset_y-8,floorthick+3.4])
|
||||
rotate([90,0,90]) cylinder(d=6.6, h=3.5, $fn=6);
|
||||
}
|
||||
}
|
||||
if(class == "pcbhole" && id == pcb_id && pcbhole_pos == "right_rear") {
|
||||
if((pcbhole_y <= 10 && pcbhole_x >= pcb_width-10) || (ext_bottom_standoffs == true && ext_bottom_rear_right_enable == true)) {
|
||||
translate([width-2*(wallthick+gap)-sidethick-adj,wallthick+gap+10,floorthick+3.4])
|
||||
rotate([0,90,0]) cylinder(d=3, h=10+sidethick+(2*adj));
|
||||
translate([width-3.5-(2*wallthick)-gap-.6,wallthick+gap+10,floorthick+3.4])
|
||||
rotate([90,0,90]) cylinder(d=6.6, h=3.5, $fn=6);
|
||||
}
|
||||
else {
|
||||
translate([width-2*(wallthick+gap)-sidethick-adj,wallthick+gap+2,floorthick+3.4])
|
||||
rotate([0,90,0]) cylinder(d=3, h=10+sidethick+(2*adj));
|
||||
translate([width-3.5-(2*wallthick)-gap-.6,wallthick+gap+2,floorthick+3.4])
|
||||
rotate([90,0,90]) cylinder(d=6.6, h=3.5, $fn=6);
|
||||
}
|
||||
}
|
||||
if(class == "pcbhole" && id == pcb_id && pcbhole_pos == "right_front") {
|
||||
if((pcbhole_y >= pcb_depth+case_offset_y-10 && pcbhole_x >= width-10) || (ext_bottom_standoffs == true && ext_bottom_front_right_enable == true)) {
|
||||
translate([width-3*(wallthick+gap)-adj,wallthick-gap+pcb_depth+case_offset_y-14,
|
||||
floorthick+3.4]) rotate([0,90,0]) cylinder(d=3, h=10+sidethick+(2*adj));
|
||||
translate([width-3.5-(2*wallthick)-gap-.6,wallthick-gap+pcb_depth+case_offset_y-14,
|
||||
floorthick+3.4])rotate([90,0,90]) cylinder(d=6.6, h=3.5, $fn=6);
|
||||
}
|
||||
else {
|
||||
translate([width-3*(wallthick+gap)-adj,wallthick-gap+pcb_depth+case_offset_y-8,
|
||||
floorthick+3.4]) rotate([0,90,0]) cylinder(d=3, h=10+sidethick+(2*adj));
|
||||
translate([width-3.5-(2*wallthick)-gap-.6,wallthick-gap+pcb_depth+case_offset_y-8,
|
||||
floorthick+3.4])rotate([90,0,90]) cylinder(d=6.6, h=3.5, $fn=6);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// pcb standoff holes
|
||||
if(sbc_bottom_standoffs == true) {
|
||||
for (i=[1:11:len(sbc_data[s[0]])-2]) {
|
||||
class = sbc_data[s[0]][i+1];
|
||||
type = sbc_data[s[0]][i+2];
|
||||
id = sbc_data[s[0]][i+3];
|
||||
pcbhole_x = sbc_data[s[0]][i+4]+pcb_loc_x;
|
||||
pcbhole_y = sbc_data[s[0]][i+5]+pcb_loc_y;
|
||||
pcbhole_z = sbc_data[s[0]][i+6];
|
||||
pcbhole_size = sbc_data[s[0]][i+9][0];
|
||||
pcbhole_pos = sbc_data[s[0]][i+10][4];
|
||||
|
||||
if (class == "pcbhole" && id == pcb_id && pcbhole_pos == "left_rear" &&
|
||||
bottom_rear_left_enable == true && bottom_standoff[6] != "blind") {
|
||||
translate([pcbhole_x,pcbhole_y,-1]) cylinder(d=bottom_standoff[4]-.2, h=bottom_height);
|
||||
}
|
||||
if (class == "pcbhole" && id == pcb_id && pcbhole_pos == "left_front" &&
|
||||
bottom_front_left_enable == true && bottom_standoff[6] != "blind") {
|
||||
translate([pcbhole_x,pcbhole_y,-1]) cylinder(d=bottom_standoff[4]-.2, h=bottom_height);
|
||||
}
|
||||
if (class == "pcbhole" && id == pcb_id && pcbhole_pos == "right_rear" &&
|
||||
bottom_rear_right_enable == true && bottom_standoff[6] != "blind") {
|
||||
translate([pcbhole_x,pcbhole_y,-1]) cylinder(d=bottom_standoff[4]-.2, h=bottom_height);
|
||||
}
|
||||
if (class == "pcbhole" && id == pcb_id && pcbhole_pos == "right_front" &&
|
||||
bottom_front_right_enable == true && bottom_standoff[6] != "blind") {
|
||||
translate([pcbhole_x,pcbhole_y,-1]) cylinder(d=bottom_standoff[4]-.2, h=bottom_height);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
// extended standoff holes
|
||||
if(ext_bottom_standoffs == true) {
|
||||
// right-rear standoff
|
||||
if(((width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 || pcb_loc_y >= 10)) &&
|
||||
ext_bottom_rear_right_enable == true && ext_bottom_standoff[6] != "blind") {
|
||||
translate([width-ext_bottom_standoff_support_size/4-(2*(wallthick+gap))-(corner_fillet/2),
|
||||
(corner_fillet/2)+ext_bottom_standoff_support_size/4,-1]) cylinder(d=ext_bottom_standoff[4]-.2, h=bottom_height);
|
||||
}
|
||||
// right-front standoff
|
||||
if(((width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 && depth-pcb_loc_y-pcb_depth >= 10) ||
|
||||
(width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 && depth-pcb_loc_y-pcb_depth <= 10) ||
|
||||
(width-pcb_loc_x-pcb_width-(gap+2*wallthick) <= 10 && depth-pcb_loc_y-pcb_depth >= 10)) &&
|
||||
ext_bottom_front_right_enable == true && ext_bottom_standoff[6] != "blind") {
|
||||
translate([width-ext_bottom_standoff_support_size/4-(corner_fillet/2)-(2*(wallthick+gap)),
|
||||
depth-ext_bottom_standoff_support_size/4-(corner_fillet/2)-(2*(wallthick+gap)),-1])
|
||||
cylinder(d=ext_bottom_standoff[4]-.2, h=bottom_height);
|
||||
}
|
||||
// left-rear standoff
|
||||
if((pcb_loc_x >= 10 || pcb_loc_y >= 10) && ext_bottom_rear_left_enable == true && ext_bottom_standoff[6] != "blind") {
|
||||
translate([(corner_fillet/2)+ext_bottom_standoff_support_size/4,
|
||||
(corner_fillet/2)+ext_bottom_standoff_support_size/4,-1]) cylinder(d=ext_bottom_standoff[4]-.2, h=bottom_height);
|
||||
}
|
||||
// left-front standoff
|
||||
if(((pcb_loc_x >= 10 && (depth-(pcb_loc_y+pcb_depth)) >= 10) ||
|
||||
(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 && ext_bottom_standoff[6] != "blind") {
|
||||
translate([(corner_fillet/2)+ext_bottom_standoff_support_size/4,
|
||||
depth-ext_bottom_standoff_support_size/4-(corner_fillet/2)-(2*(wallthick+gap)),-1])
|
||||
cylinder(d=ext_bottom_standoff[4]-.2, 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");
|
||||
}
|
||||
if(bottom_cover_pattern == "linear_vertical") {
|
||||
translate([0,-gap,-2]) vent(wallthick,depth-2*wallthick-gap,floorthick+4,1,1,(width-2*wallthick-gap)/4,"horizontal");
|
||||
}
|
||||
if(bottom_cover_pattern == "linear_horizontal") {
|
||||
translate([-gap,-gap,-2]) vent(width-2*wallthick-gap,wallthick,floorthick+4,1,(depth-2*wallthick-gap)/3,1,"horizontal");
|
||||
}
|
||||
if(bottom_cover_pattern == "astroid") {
|
||||
for(c=[3:12:depth-8]) {
|
||||
for(r=[4:12:width-8]) {
|
||||
translate([r,c,-4]) linear_extrude(floorthick+5) import("./dxf/astroid_8mm.dxf");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// rear io shield opening for standard form motherboards
|
||||
if(rear_io_shield == true) {
|
||||
if(sbc_model == "mini-stx_thin") {
|
||||
translate([6.2+pcb_loc_x,-4.5,-4.65+bottom_height-pcb_z+pcb_loc_z]) cube([123.95, 10+pcb_loc_y, 25]);
|
||||
}
|
||||
if(sbc_model == "mini-stx") {
|
||||
translate([6.2+pcb_loc_x,-4.5,-4.65+bottom_height-pcb_z+pcb_loc_z]) cube([123.95, 10+pcb_loc_y, 40]);
|
||||
}
|
||||
if(sbc_model == "mini-itx_thin") {
|
||||
translate([-2.62+pcb_loc_x,-4.5,-2.25+bottom_height-pcb_z+pcb_loc_z]) cube([158.75, 10+pcb_loc_y, 25]);
|
||||
}
|
||||
if(sbc_model != "mini-stx_thin" && sbc_model != "mini-stx" && sbc_model != "mini-itx_thin") {
|
||||
translate([-2.62+pcb_loc_x,-4.5,-2.25+bottom_height-pcb_z+pcb_loc_z]) cube([158.75, 10+pcb_loc_y, 44]);
|
||||
}
|
||||
}
|
||||
}
|
||||
// pcb standoffs
|
||||
if(sbc_bottom_standoffs == true) {
|
||||
for (i=[1:11:len(sbc_data[s[0]])-2]) {
|
||||
class = sbc_data[s[0]][i+1];
|
||||
type = sbc_data[s[0]][i+2];
|
||||
id = sbc_data[s[0]][i+3];
|
||||
pcbhole_x = sbc_data[s[0]][i+4]+pcb_loc_x;
|
||||
pcbhole_y = sbc_data[s[0]][i+5]+pcb_loc_y;
|
||||
pcbhole_z = sbc_data[s[0]][i+6];
|
||||
pcbhole_size = sbc_data[s[0]][i+9][0];
|
||||
pcbhole_pos = sbc_data[s[0]][i+10][4];
|
||||
|
||||
if(class == "pcbhole" && id == pcb_id &&
|
||||
(pcbhole_pos == "left_rear" || pcbhole_pos == "left_front" || pcbhole_pos == "right_rear" || pcbhole_pos == "right_front")) {
|
||||
if (pcbhole_pos == "left_rear" && bottom_rear_left_enable == true) {
|
||||
bottom_support = bottom_sidewall_support == true ? bottom_rear_left_support : "none";
|
||||
pcb_standoff = [bottom_standoff[0],
|
||||
bottom_standoff[1],
|
||||
bottom_height-pcb_z+pcb_loc_z+bottom_rear_left_adjust,
|
||||
bottom_standoff[3],
|
||||
bottom_standoff[4],
|
||||
bottom_standoff[5],
|
||||
bottom_standoff[6],
|
||||
bottom_standoff[7],
|
||||
bottom_support,
|
||||
bottom_standoff[9],
|
||||
bottom_standoff[10],
|
||||
bottom_standoff[11],
|
||||
bottom_standoff[12]];
|
||||
translate([pcbhole_x,pcbhole_y,0]) standoff(pcb_standoff,[false,10,2,"default"]);
|
||||
}
|
||||
if (pcbhole_pos == "left_front" && bottom_front_left_enable == true) {
|
||||
bottom_support = bottom_sidewall_support == true ? bottom_front_left_support : "none";
|
||||
pcb_standoff = [bottom_standoff[0],
|
||||
bottom_standoff[1],
|
||||
bottom_height-pcb_z+pcb_loc_z+bottom_front_left_adjust,
|
||||
bottom_standoff[3],
|
||||
bottom_standoff[4],
|
||||
bottom_standoff[5],
|
||||
bottom_standoff[6],
|
||||
bottom_standoff[7],
|
||||
bottom_support,
|
||||
bottom_standoff[9],
|
||||
bottom_standoff[10],
|
||||
bottom_standoff[11],
|
||||
bottom_standoff[12]];
|
||||
translate([pcbhole_x,pcbhole_y,0]) standoff(pcb_standoff,[false,10,2,"default"]);
|
||||
}
|
||||
if (pcbhole_pos == "right_rear" && bottom_rear_right_enable == true) {
|
||||
bottom_support = bottom_sidewall_support == true ? bottom_rear_right_support : "none";
|
||||
pcb_standoff = [bottom_standoff[0],
|
||||
bottom_standoff[1],
|
||||
bottom_height-pcb_z+pcb_loc_z+bottom_rear_right_adjust,
|
||||
bottom_standoff[3],
|
||||
bottom_standoff[4],
|
||||
bottom_standoff[5],
|
||||
bottom_standoff[6],
|
||||
bottom_standoff[7],
|
||||
bottom_support,
|
||||
bottom_standoff[9],
|
||||
bottom_standoff[10],
|
||||
bottom_standoff[11],
|
||||
bottom_standoff[12]];
|
||||
translate([pcbhole_x,pcbhole_y,0]) standoff(pcb_standoff,[false,10,2,"default"]);
|
||||
}
|
||||
if (pcbhole_pos == "right_front" && bottom_front_right_enable == true) {
|
||||
bottom_support = bottom_sidewall_support == true ? bottom_front_right_support : "none";
|
||||
pcb_standoff = [bottom_standoff[0],
|
||||
bottom_standoff[1],
|
||||
bottom_height-pcb_z+pcb_loc_z+bottom_front_right_adjust,
|
||||
bottom_standoff[3],
|
||||
bottom_standoff[4],
|
||||
bottom_standoff[5],
|
||||
bottom_standoff[6],
|
||||
bottom_standoff[7],
|
||||
bottom_support,
|
||||
bottom_standoff[9],
|
||||
bottom_standoff[10],
|
||||
bottom_standoff[11],
|
||||
bottom_standoff[12]];
|
||||
translate([pcbhole_x,pcbhole_y,0]) standoff(pcb_standoff,[false,10,2,"default"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// extended standoffs
|
||||
if(ext_bottom_standoffs == true) {
|
||||
// extended right-rear standoff
|
||||
if((width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 || pcb_loc_y >= 10) && ext_bottom_rear_right_enable == true) {
|
||||
extended_standoff = [ext_bottom_standoff[0],
|
||||
ext_bottom_standoff[1],
|
||||
bottom_height+ext_bottom_rear_right_adjust,
|
||||
ext_bottom_standoff[3],
|
||||
ext_bottom_standoff[4],
|
||||
ext_bottom_standoff[5],
|
||||
ext_bottom_standoff[6],
|
||||
ext_bottom_standoff[7],
|
||||
ext_bottom_rear_right_support,
|
||||
ext_bottom_standoff[9],
|
||||
ext_bottom_standoff[10],
|
||||
ext_bottom_standoff[11],
|
||||
ext_bottom_standoff[12]];
|
||||
translate([width-ext_top_standoff_support_size/4-(2*(wallthick+gap))-(corner_fillet/2),
|
||||
(corner_fillet/2)+ext_top_standoff_support_size/4,0]) standoff(extended_standoff,[false,10,2,"default"]);
|
||||
}
|
||||
// extended right-front standoff
|
||||
if(((width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 && depth-pcb_loc_y-pcb_depth >= 10) ||
|
||||
(width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 && depth-pcb_loc_y-pcb_depth <= 10) ||
|
||||
(width-pcb_loc_x-pcb_width-(gap+2*wallthick) <= 10 && depth-pcb_loc_y-pcb_depth >= 10)) &&
|
||||
ext_bottom_front_right_enable == true) {
|
||||
extended_standoff = [ext_bottom_standoff[0],
|
||||
ext_bottom_standoff[1],
|
||||
bottom_height+ext_bottom_front_right_adjust,
|
||||
ext_bottom_standoff[3],
|
||||
ext_bottom_standoff[4],
|
||||
ext_bottom_standoff[5],
|
||||
ext_bottom_standoff[6],
|
||||
ext_bottom_standoff[7],
|
||||
ext_bottom_front_right_support,
|
||||
ext_bottom_standoff[9],
|
||||
ext_bottom_standoff[10],
|
||||
ext_bottom_standoff[11],
|
||||
ext_bottom_standoff[12]];
|
||||
translate([width-ext_top_standoff_support_size/4-(corner_fillet/2)-(2*(wallthick+gap)),
|
||||
depth-ext_top_standoff_support_size/4-(corner_fillet/2)-(2*(wallthick+gap)),0]) standoff(extended_standoff,[false,10,2,"default"]);
|
||||
}
|
||||
// extended left-rear standoff
|
||||
if((pcb_loc_x >= 10 || pcb_loc_y >= 10) && ext_bottom_rear_left_enable == true) {
|
||||
extended_standoff = [ext_bottom_standoff[0],
|
||||
ext_bottom_standoff[1],
|
||||
bottom_height+ext_bottom_rear_left_adjust,
|
||||
ext_bottom_standoff[3],
|
||||
ext_bottom_standoff[4],
|
||||
ext_bottom_standoff[5],
|
||||
ext_bottom_standoff[6],
|
||||
ext_bottom_standoff[7],
|
||||
ext_bottom_rear_left_support,
|
||||
ext_bottom_standoff[9],
|
||||
ext_bottom_standoff[10],
|
||||
ext_bottom_standoff[11],
|
||||
ext_bottom_standoff[12]];
|
||||
translate([(corner_fillet/2)+ext_top_standoff_support_size/4,
|
||||
(corner_fillet/2)+ext_top_standoff_support_size/4,0]) standoff(extended_standoff,[false,10,2,"default"]);
|
||||
}
|
||||
// extended left-front standoff
|
||||
if(((pcb_loc_x >= 10 && depth-(pcb_loc_y+pcb_depth) >= 10) ||
|
||||
(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) {
|
||||
extended_standoff = [ext_bottom_standoff[0],
|
||||
ext_bottom_standoff[1],
|
||||
bottom_height+ext_bottom_front_left_adjust,
|
||||
ext_bottom_standoff[3],
|
||||
ext_bottom_standoff[4],
|
||||
ext_bottom_standoff[5],
|
||||
ext_bottom_standoff[6],
|
||||
ext_bottom_standoff[7],
|
||||
ext_bottom_front_left_support,
|
||||
ext_bottom_standoff[9],
|
||||
ext_bottom_standoff[10],
|
||||
ext_bottom_standoff[11],
|
||||
ext_bottom_standoff[12]];
|
||||
translate([(corner_fillet/2)+ext_top_standoff_support_size/4,
|
||||
depth-ext_top_standoff_support_size/4-(corner_fillet/2)-(2*(wallthick+gap)),0])
|
||||
standoff(extended_standoff,[false,10,2,"default"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
// subtractive accessories
|
||||
if(accessory_name != "none") {
|
||||
for (i=[1:11:len(accessory_data[a[0]])-1]) {
|
||||
class = accessory_data[a[0]][i];
|
||||
type = accessory_data[a[0]][i+1];
|
||||
loc_x = accessory_data[a[0]][i+2];
|
||||
loc_y = accessory_data[a[0]][i+3];
|
||||
loc_z = accessory_data[a[0]][i+4];
|
||||
face = accessory_data[a[0]][i+5];
|
||||
rotation = accessory_data[a[0]][i+6];
|
||||
parametric = accessory_data[a[0]][i+7];
|
||||
size_x = accessory_data[a[0]][i+8][0];
|
||||
size_y = accessory_data[a[0]][i+8][1];
|
||||
size_z = accessory_data[a[0]][i+8][2];
|
||||
data = accessory_data[a[0]][i+9];
|
||||
mask = accessory_data[a[0]][i+10];
|
||||
|
||||
if ((class == "sub" && face == "bottom") || class == "suball") {
|
||||
if(accessory_highlight == false) {
|
||||
parametric_move_sub(type, loc_x, loc_y, loc_z, face, rotation, parametric,
|
||||
[size_x,size_y,size_z],data, mask);
|
||||
}
|
||||
else {
|
||||
#parametric_move_sub(type,loc_x,loc_y,loc_z,face,rotation,parametric,
|
||||
[size_x,size_y,size_z],data, mask);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// create openings for additive
|
||||
if ((class == "add1" || class == "add2" || class == "model") && mask[0] == true) {
|
||||
if(accessory_highlight == false) {
|
||||
parametric_move_add(type,loc_x,loc_y,loc_z,face,rotation,parametric,[size_x,size_y,size_z],data,[true,mask[1],mask[2],mask[3]]);
|
||||
}
|
||||
else {
|
||||
#parametric_move_add(type,loc_x,loc_y,loc_z,face,rotation,parametric,[size_x,size_y,size_z],data,[true,mask[1],mask[2],mask[3]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// ui access panel
|
||||
if(bottom_access_panel_enable == true) {
|
||||
if(access_panel_rotation == 0) {
|
||||
translate([access_panel_location[0],access_panel_location[1], 0]) rotate([0,0,access_panel_rotation])
|
||||
access_panel([access_panel_size[0],access_panel_size[1],floorthick], access_panel_orientation, [true,10,2,"default"]);
|
||||
}
|
||||
if(access_panel_rotation == 90) {
|
||||
translate([access_panel_location[0]+access_panel_size[1],access_panel_location[1], 0]) rotate([0,0,access_panel_rotation])
|
||||
access_panel([access_panel_size[0],access_panel_size[1],floorthick], access_panel_orientation, [true,10,2,"default"]);
|
||||
}
|
||||
if(access_panel_rotation == 180) {
|
||||
translate([access_panel_location[0]+access_panel_size[0],access_panel_location[1]+access_panel_size[1],0]) rotate([0,0,access_panel_rotation])
|
||||
access_panel([access_panel_size[0],access_panel_size[1],floorthick], access_panel_orientation, [true,10,2,"default"]);
|
||||
}
|
||||
if(access_panel_rotation == 270) {
|
||||
translate([access_panel_location[0],access_panel_location[1]+access_panel_size[0], 0]) rotate([0,0,access_panel_rotation])
|
||||
access_panel([access_panel_size[0],access_panel_size[1],floorthick], access_panel_orientation, [true,10,2,"default"]);
|
||||
}
|
||||
}
|
||||
// sbc openings
|
||||
if(sbc_highlight == true) {
|
||||
#translate([pcb_loc_x ,pcb_loc_y,bottom_height-pcb_z+pcb_loc_z-adj])
|
||||
sbc(sbc_model, cooling, fan_size, gpio_opening, uart_opening, true);
|
||||
}
|
||||
else {
|
||||
translate([pcb_loc_x ,pcb_loc_y,bottom_height-pcb_z+pcb_loc_z-adj])
|
||||
sbc(sbc_model, cooling, fan_size, gpio_opening, uart_opening, true);
|
||||
}
|
||||
// indents
|
||||
if(indents == true) {
|
||||
|
||||
for (i=[1:11:len(sbc_data[s[0]])-2]) {
|
||||
class = sbc_data[s[0]][i+1];
|
||||
type = sbc_data[s[0]][i+2];
|
||||
id = sbc_data[s[0]][i+3];
|
||||
loc_x = sbc_data[s[0]][i+4]+pcb_loc_x;
|
||||
loc_y = sbc_data[s[0]][i+5]+pcb_loc_y;
|
||||
loc_z = sbc_data[s[0]][i+6]+pcb_loc_z;
|
||||
side = sbc_data[s[0]][i+7];
|
||||
rotation = sbc_data[s[0]][i+8];
|
||||
|
||||
// indent(loc_x, loc_y, bottom_height+pcb_loc_z-adj, rotation[2], side, class, type, wallthick, gap, floorthick, pcb_z);
|
||||
indent(loc_x, loc_y, bottom_height+pcb_loc_z-adj, rotation[2], side, class, type, wallthick, gap, floorthick, pcb_z);
|
||||
}
|
||||
}
|
||||
// clean fillets
|
||||
if(case_design == "shell") {
|
||||
translate([(width/2)-wallthick-gap,(depth/2)-wallthick-gap,bottom_height/2])
|
||||
cube_negative_fillet([width,depth,bottom_height], radius=-1,
|
||||
vertical=[corner_fillet,corner_fillet,corner_fillet,corner_fillet], top=[0,0,0,0],
|
||||
bottom=[edge_fillet,edge_fillet,edge_fillet,edge_fillet,edge_fillet], $fn=90);
|
||||
}
|
||||
}
|
||||
// additive accessories
|
||||
if(accessory_name != "none") {
|
||||
for (i=[1:11:len(accessory_data[a[0]])-1]) {
|
||||
class = accessory_data[a[0]][i];
|
||||
type = accessory_data[a[0]][i+1];
|
||||
loc_x = accessory_data[a[0]][i+2];
|
||||
loc_y = accessory_data[a[0]][i+3];
|
||||
loc_z = accessory_data[a[0]][i+4];
|
||||
face = accessory_data[a[0]][i+5];
|
||||
rotation = accessory_data[a[0]][i+6];
|
||||
parametric = accessory_data[a[0]][i+7];
|
||||
size = accessory_data[a[0]][i+8];
|
||||
data = accessory_data[a[0]][i+9];
|
||||
mask = accessory_data[a[0]][i+10];
|
||||
|
||||
if(class == "add2" && face == "bottom") {
|
||||
parametric_move_add(type, loc_x, loc_y, loc_z, face, rotation, parametric, size, data, [false,mask[1],mask[2],mask[3]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
// ui access port
|
||||
if(bottom_access_panel_enable == true) {
|
||||
if(access_panel_rotation == 0) {
|
||||
translate([access_panel_location[0],access_panel_location[1], 0]) rotate([0,0,access_panel_rotation])
|
||||
access_panel([access_panel_size[0],access_panel_size[1],floorthick], access_panel_orientation, [false,10,2,"default"]);
|
||||
}
|
||||
if(access_panel_rotation == 90) {
|
||||
translate([access_panel_location[0]+access_panel_size[1],access_panel_location[1], 0]) rotate([0,0,access_panel_rotation])
|
||||
access_panel([access_panel_size[0],access_panel_size[1],floorthick], access_panel_orientation, [false,10,2,"default"]);
|
||||
}
|
||||
if(access_panel_rotation == 180) {
|
||||
translate([access_panel_location[0]+access_panel_size[0],access_panel_location[1]+access_panel_size[1],0]) rotate([0,0,access_panel_rotation])
|
||||
access_panel([access_panel_size[0],access_panel_size[1],floorthick], access_panel_orientation, [false,10,2,"default"]);
|
||||
}
|
||||
if(access_panel_rotation == 270) {
|
||||
translate([access_panel_location[0],access_panel_location[1]+access_panel_size[0], 0]) rotate([0,0,access_panel_rotation])
|
||||
access_panel([access_panel_size[0],access_panel_size[1],floorthick], access_panel_orientation, [false,10,2,"default"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
292
mod/case_folded.scad
Normal file
292
mod/case_folded.scad
Normal file
@@ -0,0 +1,292 @@
|
||||
/*
|
||||
This file is part of SBC Case Builder https://github.com/hominoids/SBC_Case_Builder
|
||||
Copyright 2022,2023,2024 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
|
||||
NAME: case_folded
|
||||
DESCRIPTION: creates folded case flat blanks for supported designs
|
||||
TODO: none
|
||||
|
||||
USAGE: case_folded(case_design)
|
||||
|
||||
case_design = paper_full-top, paper_split-top
|
||||
*/
|
||||
|
||||
module case_folded(case_design) {
|
||||
|
||||
section_position = 2;
|
||||
ba = bend_allowance;
|
||||
slit_len = pcb_depth < pcb_width ? pcb_depth/10 : pcb_width/10;
|
||||
slit_width = material_thickness;
|
||||
slit_offset = pcb_depth < pcb_width ? pcb_depth/10 : pcb_width/10;
|
||||
fold_height = pcb_tmaxz+bottom_clearence+pcb_z+ba;
|
||||
flap_y = 12;
|
||||
tab_x = pcb_depth/4;
|
||||
tab_y = fold_height/2;
|
||||
tab_inset = 6;
|
||||
|
||||
if(case_design == "paper_split-top") {
|
||||
// rear
|
||||
difference() {
|
||||
union() {
|
||||
folded_base(fold_height, ba, flap_y, tab_x, tab_y, tab_inset, slit_len, slit_width, slit_offset);
|
||||
translate([0, -fold_height-(pcb_depth/2)-ba, 0])
|
||||
cube([pcb_width, (pcb_depth/2)+ba, material_thickness]);
|
||||
translate([0, pcb_depth+fold_height, 0])
|
||||
cube([pcb_width, (pcb_depth/2)+ba, material_thickness]);
|
||||
|
||||
// flaps rear left
|
||||
translate([-tab_y, -fold_height+tab_inset-(pcb_depth/2), 0])
|
||||
slab_r([tab_y, tab_x, material_thickness], [tab_x/2,tab_x/2,.1,.1]);
|
||||
|
||||
// flaps rear right
|
||||
translate([pcb_width, -fold_height-(pcb_depth/2)+tab_inset, 0])
|
||||
slab_r([tab_y, tab_x, material_thickness], [.1,.1,tab_x/2,tab_x/2]);
|
||||
|
||||
// flaps front left
|
||||
translate([-tab_y, pcb_depth+fold_height-tab_inset+tab_x, 0])
|
||||
slab_r([tab_y, tab_x, material_thickness], [tab_x/2,tab_x/2,.1,.1]);
|
||||
|
||||
// flaps front right
|
||||
translate([pcb_width, pcb_depth+fold_height-tab_inset+tab_x, 0])
|
||||
slab_r([tab_y, tab_x, material_thickness], [.1,.1,tab_x/2,tab_x/2]);
|
||||
|
||||
// flaps left rear
|
||||
difference() {
|
||||
translate([-(fold_height), 0, 0])
|
||||
linear_extrude(material_thickness) polygon([[0, 0],
|
||||
[1, (-pcb_depth/4)],
|
||||
[(fold_height)-2, (-pcb_depth/4)],
|
||||
[(fold_height), 0],
|
||||
[0, 0]]);
|
||||
translate([-bottom_clearence, 0, section_position]) rotate([90, 0, 270])
|
||||
sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
// flaps left front
|
||||
difference() {
|
||||
translate([-(fold_height), pcb_depth, 0])
|
||||
linear_extrude(material_thickness) polygon([[0, 0],
|
||||
[1, (pcb_depth/4)],
|
||||
[(fold_height)-2, (pcb_depth/4)],
|
||||
[(fold_height), 0],
|
||||
[0, 0]]);
|
||||
translate([-bottom_clearence, pcb_depth, pcb_depth+section_position]) rotate([-90, 0, 90])
|
||||
sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
// flaps right rear
|
||||
difference() {
|
||||
translate([pcb_width, 0, 0])
|
||||
linear_extrude(material_thickness) polygon([[0, 0],
|
||||
[2, (-pcb_depth/4)],
|
||||
[(fold_height)-1, (-pcb_depth/4)],
|
||||
[(fold_height), 0],
|
||||
[0, 0]]);
|
||||
translate([bottom_clearence+pcb_width, -pcb_width, section_position]) rotate([90, 0, 90])
|
||||
sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
|
||||
// flaps right front
|
||||
difference() {
|
||||
translate([pcb_width, pcb_depth, 0])
|
||||
linear_extrude(material_thickness) polygon([[0, 0],
|
||||
[2, (pcb_depth/4)],
|
||||
[(fold_height)-1, (pcb_depth/4)],
|
||||
[(fold_height), 0],
|
||||
[0, 0]]);
|
||||
translate([bottom_clearence+pcb_width, pcb_width+pcb_depth, section_position+pcb_depth])
|
||||
rotate([270, 0, 270]) sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
}
|
||||
|
||||
translate([0, -fold_height, pcb_tmaxz+2+material_thickness]) rotate([180, 0, 0])
|
||||
sbc(sbc_model, cooling, 0, "disable", "disable", true);
|
||||
translate([0, 2*pcb_depth+fold_height, pcb_tmaxz+2+material_thickness]) rotate([180, 0, 0])
|
||||
sbc(sbc_model, cooling, 0, "disable", "disable", true);
|
||||
}
|
||||
translate([0, -fold_height-(pcb_depth/2)-ba, 0]) cube([pcb_width, 2, material_thickness]);
|
||||
translate([0, pcb_depth+fold_height+(pcb_depth/2)-ba, 0]) cube([pcb_width, 2, material_thickness]);
|
||||
}
|
||||
|
||||
if(case_design == "paper_full-top") {
|
||||
// rear
|
||||
difference() {
|
||||
union() {
|
||||
folded_base(fold_height, ba, flap_y, tab_x, tab_y, tab_inset, slit_len, slit_width, slit_offset);
|
||||
translate([0, -fold_height-pcb_depth-ba, 0])
|
||||
cube([pcb_width, pcb_depth+ba, material_thickness]);
|
||||
translate([0, pcb_depth+fold_height, 0])
|
||||
cube([pcb_width, (pcb_depth/4)+ba, material_thickness]);
|
||||
|
||||
// flaps rear left
|
||||
translate([tab_inset, -fold_height-pcb_depth-tab_y, 0])
|
||||
slab_r([tab_x, tab_y, material_thickness], [tab_x/2,.1,.1,tab_x/2]);
|
||||
|
||||
// flaps rear right
|
||||
translate([pcb_width-tab_x-tab_inset, -fold_height-pcb_depth-tab_y, 0])
|
||||
slab_r([tab_x, tab_y, material_thickness], [tab_x/2,.1,.1,tab_x/2]);
|
||||
|
||||
// flaps left rear
|
||||
difference() {
|
||||
translate([-(fold_height), 0, 0])
|
||||
linear_extrude(material_thickness) polygon([[0, 0],
|
||||
[1, (-pcb_depth/4)],
|
||||
[(fold_height)-2, (-pcb_depth/4)],
|
||||
[(fold_height), 0],
|
||||
[0, 0]]);
|
||||
translate([-bottom_clearence, 0, section_position]) rotate([90, 0, 270])
|
||||
sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
// flaps left front
|
||||
difference() {
|
||||
translate([-(fold_height), pcb_depth, 0])
|
||||
linear_extrude(material_thickness) polygon([[0, 0],
|
||||
[1, (pcb_depth/4)],
|
||||
[(fold_height)-2, (pcb_depth/4)],
|
||||
[(fold_height), 0],
|
||||
[0, 0]]);
|
||||
translate([-bottom_clearence, pcb_depth, pcb_depth+section_position]) rotate([-90, 0, 90])
|
||||
sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
// flaps right rear
|
||||
difference() {
|
||||
translate([pcb_width, 0, 0])
|
||||
linear_extrude(material_thickness) polygon([[0, 0],
|
||||
[2, (-pcb_depth/4)],
|
||||
[(fold_height)-1, (-pcb_depth/4)],
|
||||
[(fold_height), 0],
|
||||
[0, 0]]);
|
||||
translate([bottom_clearence+pcb_width, -pcb_width, section_position]) rotate([90, 0, 90])
|
||||
sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
|
||||
// flaps right front
|
||||
difference() {
|
||||
translate([pcb_width, pcb_depth, 0])
|
||||
linear_extrude(material_thickness) polygon([[0, 0],
|
||||
[2, (pcb_depth/4)],
|
||||
[(fold_height)-1, (pcb_depth/4)],
|
||||
[(fold_height), 0],
|
||||
[0, 0]]);
|
||||
translate([bottom_clearence+pcb_width, pcb_width+pcb_depth, section_position+pcb_depth])
|
||||
rotate([270, 0, 270]) sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
}
|
||||
// top closure tab slits
|
||||
translate([tab_inset, pcb_depth+fold_height, 0]) cube([tab_x, slit_width, material_thickness+(2*adj)]);
|
||||
translate([pcb_width-tab_x-tab_inset, pcb_depth+fold_height, 0])
|
||||
cube([tab_x, slit_width, material_thickness+2*adj]);
|
||||
|
||||
translate([0, -fold_height, pcb_tmaxz+2+material_thickness]) rotate([180, 0, 0])
|
||||
sbc(sbc_model, cooling, 0, "disable", "disable", true);
|
||||
translate([0, 2*pcb_depth+fold_height, pcb_tmaxz+2+material_thickness]) rotate([180, 0, 0])
|
||||
sbc(sbc_model, cooling, 0, "disable", "disable", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// base folding case
|
||||
module folded_base(fold_height, ba, flap_y, tab_x, tab_y, tab_inset, slit_len, slit_width, slit_offset) {
|
||||
|
||||
section_position = 2;
|
||||
|
||||
// rear
|
||||
difference() {
|
||||
translate([0, -fold_height, 0]) cube([pcb_width, fold_height, material_thickness]);
|
||||
// folding slits
|
||||
translate([slit_offset, -fold_height, -adj])
|
||||
cube([slit_len, slit_width, material_thickness+(2*adj)]);
|
||||
translate([pcb_width/2-slit_len/2, -fold_height, -adj])
|
||||
cube([slit_len, slit_width, material_thickness+(2*adj)]);
|
||||
translate([pcb_width-slit_offset-slit_len, -fold_height, -adj])
|
||||
cube([slit_len, slit_width, material_thickness+(2*adj)]);
|
||||
|
||||
translate([0, -bottom_clearence, section_position]) rotate([90, 0, 0])
|
||||
sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
// left side
|
||||
difference() {
|
||||
union() {
|
||||
translate([-fold_height, 0, 0])
|
||||
cube([fold_height, pcb_depth, material_thickness]);
|
||||
translate([-fold_height-flap_y, 0, 0]) cube([flap_y, pcb_depth, material_thickness]);
|
||||
}
|
||||
// folding slits
|
||||
translate([-fold_height, (pcb_depth/2)+tab_inset, -adj])
|
||||
cube([slit_width, tab_x, material_thickness+(2*adj)]);
|
||||
|
||||
translate([-fold_height, (pcb_depth/2)-tab_x-tab_inset, -adj])
|
||||
cube([slit_width, tab_x, material_thickness+(2*adj)]);
|
||||
|
||||
translate([-bottom_clearence, 0, section_position]) rotate([0, -90, 0])
|
||||
sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
|
||||
}
|
||||
// front
|
||||
difference() {
|
||||
translate([0, pcb_depth, 0]) cube([pcb_width, fold_height, material_thickness]);
|
||||
// folding slits
|
||||
translate([slit_offset, pcb_depth+fold_height-slit_width, -adj])
|
||||
cube([slit_len, slit_width, material_thickness+(2*adj)]);
|
||||
translate([pcb_width/2-slit_len/2, pcb_depth+fold_height-slit_width, -adj])
|
||||
cube([slit_len, slit_width, material_thickness+(2*adj)]);
|
||||
translate([pcb_width-slit_offset-slit_len, pcb_depth+fold_height-slit_width, -adj])
|
||||
cube([slit_len, slit_width, material_thickness+(2*adj)]);
|
||||
|
||||
translate([0, pcb_depth+bottom_clearence, pcb_depth+section_position]) rotate([-90, 0, 0])
|
||||
sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
// right side
|
||||
difference() {
|
||||
union() {
|
||||
translate([pcb_width, 0, 0]) cube([fold_height, pcb_depth, material_thickness]);
|
||||
translate([pcb_width+fold_height, 0, 0])
|
||||
cube([flap_y, pcb_depth, material_thickness]);
|
||||
}
|
||||
// folding slits
|
||||
translate([pcb_width+fold_height, (pcb_depth/2)+tab_inset, -adj])
|
||||
cube([slit_width, tab_x, material_thickness+(2*adj)]);
|
||||
translate([pcb_width+fold_height, (pcb_depth/2)-tab_x-tab_inset, -adj])
|
||||
cube([slit_width, tab_x, material_thickness+(2*adj)]);
|
||||
|
||||
translate([pcb_width+bottom_clearence, 0, pcb_width+section_position]) rotate([0, 90, 0])
|
||||
sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
}
|
||||
// pcb section
|
||||
difference() {
|
||||
cube([pcb_width, pcb_depth, material_thickness]);
|
||||
translate([0, 0, 1+material_thickness]) sbc(sbc_model, "disable", 0, gpio_opening, uart_opening, true);
|
||||
// pcb folding slits rear
|
||||
translate([slit_offset, 0, -adj]) cube([slit_len, slit_width, material_thickness+(2*adj)]);
|
||||
translate([pcb_width/2-slit_len/2, 0, -adj]) cube([slit_len, slit_width, material_thickness+(2*adj)]);
|
||||
translate([pcb_width-slit_offset-slit_len, 0, -adj]) cube([slit_len, slit_width, material_thickness+(2*adj)]);
|
||||
|
||||
// pcb folding slits left
|
||||
translate([0, slit_offset, -adj]) cube([slit_width, slit_len, material_thickness+(2*adj)]);
|
||||
translate([0, pcb_depth/2-slit_len/2, -adj]) cube([slit_width, slit_len, material_thickness+(2*adj)]);
|
||||
translate([0, pcb_depth-slit_offset-slit_len, -adj]) cube([slit_width, slit_len, material_thickness+(2*adj)]);
|
||||
|
||||
// pcb folding slits front
|
||||
translate([slit_offset, pcb_depth-slit_width, -adj]) cube([slit_len, slit_width, material_thickness+(2*adj)]);
|
||||
translate([pcb_width/2-slit_len/2, pcb_depth-slit_width, -adj]) cube([slit_len, slit_width, material_thickness+(2*adj)]);
|
||||
translate([pcb_width-slit_offset-slit_len, pcb_depth-slit_width, -adj]) cube([slit_len, slit_width, material_thickness+(2*adj)]);
|
||||
|
||||
// pcb folding slits right
|
||||
translate([pcb_width-slit_width, slit_offset, -adj]) cube([slit_width, slit_len, material_thickness+(2*adj)]);
|
||||
translate([pcb_width-slit_width, pcb_depth/2-slit_len/2, -adj]) cube([slit_width, slit_len, material_thickness+(2*adj)]);
|
||||
translate([pcb_width-slit_width, pcb_depth-slit_offset-slit_len, -adj]) cube([slit_width, slit_len, material_thickness+(2*adj)]);
|
||||
}
|
||||
}
|
||||
303
mod/case_side.scad
Normal file
303
mod/case_side.scad
Normal file
@@ -0,0 +1,303 @@
|
||||
/*
|
||||
This file is part of SBC Case Builder https://github.com/hominoids/SBC_Case_Builder
|
||||
Copyright 2022,2023,2024 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
|
||||
NAME: case_side
|
||||
DESCRIPTION: creates case side for supported designs and styles
|
||||
TODO: none
|
||||
|
||||
USAGE: case_side(case_design, side)
|
||||
|
||||
*/
|
||||
|
||||
module case_side(case_design, side) {
|
||||
|
||||
difference() {
|
||||
union() {
|
||||
if(case_design == "panel") {
|
||||
if(side == "rear") {
|
||||
difference() {
|
||||
union() {
|
||||
translate([-gap,-wallthick-gap,-floorthick])
|
||||
cube([width-2*wallthick,wallthick,case_z+2*floorthick]);
|
||||
// right hook
|
||||
difference() {
|
||||
translate([width-(2*wallthick)-gap-adj,-wallthick-gap,
|
||||
((case_z)/2)-4])
|
||||
cube([(2*wallthick)+.5,wallthick,8]);
|
||||
translate([width-(2*wallthick)-gap-adj,-wallthick-gap-adj,
|
||||
((case_z)/2)-4-adj])
|
||||
cube([wallthick+.25,wallthick+(2*adj),4.25]);
|
||||
}
|
||||
// left hook
|
||||
difference() {
|
||||
translate([-(2*wallthick)-gap-adj-.25,-wallthick-gap,
|
||||
((case_z)/2)-4])
|
||||
cube([(2*wallthick)+.5,wallthick,8]);
|
||||
translate([-wallthick-gap-adj-.25,-wallthick-gap-adj,
|
||||
((case_z)/2)-4-adj])
|
||||
cube([wallthick+.25,wallthick+(2*adj),4.25]);
|
||||
}
|
||||
}
|
||||
// top slots
|
||||
translate([(width*(1/5))-8.25-(wallthick+gap),-wallthick-gap-adj,
|
||||
case_z-floorthick-.25])
|
||||
cube([8.5,wallthick+2*adj,floorthick+.5]);
|
||||
translate([width-(width*(1/5))-(wallthick+gap)-.25,-wallthick-gap-adj,
|
||||
case_z-floorthick-.25])
|
||||
cube([8.5,wallthick+2*adj,floorthick+.5]);
|
||||
// bottom slots
|
||||
translate([(width*(1/5))-8.25-(wallthick+gap),-wallthick-gap-adj,-.25])
|
||||
cube([8.5,wallthick+2*adj,floorthick+.5]);
|
||||
translate([width-(width*(1/5))-(wallthick+gap)-.25,-wallthick-gap-adj,-.25])
|
||||
cube([8.5,wallthick+2*adj,floorthick+.5]);
|
||||
}
|
||||
}
|
||||
if(side == "front") {
|
||||
difference() {
|
||||
union() {
|
||||
translate([-gap,depth-2*(wallthick)-gap,-floorthick])
|
||||
cube([width-2*wallthick,wallthick,case_z+2*floorthick]);
|
||||
// right hook
|
||||
difference() {
|
||||
translate([width-(2*wallthick)-gap-adj,depth-2*(wallthick)-gap-adj,
|
||||
((case_z)/2)-4])
|
||||
cube([(2*wallthick)+.5,wallthick,8]);
|
||||
translate([width-(2*wallthick)-gap-adj,
|
||||
depth-2*(wallthick)-adj-gap-adj,((case_z)/2)-4-adj])
|
||||
cube([wallthick+.25,wallthick+(2*adj),4.25]);
|
||||
}
|
||||
// left hook
|
||||
difference() {
|
||||
translate([-(2*wallthick)-gap-adj-.25,depth-2*(wallthick)-gap-adj,(
|
||||
(case_z)/2)-4])
|
||||
cube([(2*wallthick)+.5,wallthick,8]);
|
||||
translate([-wallthick-gap-adj-.25,depth-2*(wallthick)-adj-gap-adj,
|
||||
((case_z)/2)-4-adj])
|
||||
cube([wallthick+.25,wallthick+(2*adj),4.25]);
|
||||
}
|
||||
}
|
||||
// top slots
|
||||
translate([(width*(1/5))-8.25-(wallthick+gap),depth-2*wallthick-gap-adj,
|
||||
case_z-floorthick-.25])
|
||||
cube([8.5,wallthick+2*adj,floorthick+.5]);
|
||||
translate([width-(width*(1/5))-(wallthick+gap)-.25,depth-2*wallthick-gap-adj,
|
||||
case_z-floorthick-.25])
|
||||
cube([8.5,wallthick+2*adj,floorthick+.5]);
|
||||
// bottom slots
|
||||
translate([(width*(1/5))-8.25-(wallthick+gap),depth-2*wallthick-gap-adj,-.25])
|
||||
cube([8.5,wallthick+2*adj,floorthick+.5]);
|
||||
translate([width-(width*(1/5))-(wallthick+gap)-.25,
|
||||
depth-2*wallthick-gap-adj,-.25]) cube([8.5,wallthick+2*adj,floorthick+.5]);
|
||||
}
|
||||
}
|
||||
if(side == "right") {
|
||||
difference() {
|
||||
translate([width-(2*wallthick)-gap,-(2*wallthick)-gap,-wallthick])
|
||||
cube([wallthick,depth+2*wallthick,case_z+(2*wallthick)]);
|
||||
translate([width-(2*wallthick)-gap-adj,-wallthick-gap-.25,
|
||||
((case_z)/2)]) cube([wallthick+2*adj,wallthick+.5,8.5]);
|
||||
translate([width-(2*wallthick)-gap-adj,depth-2*(wallthick)-gap-.25,
|
||||
((case_z)/2)])
|
||||
cube([wallthick+2*adj,wallthick+.5,8.5]);
|
||||
}
|
||||
}
|
||||
if(side == "left") {
|
||||
difference() {
|
||||
translate([-wallthick-gap,-(2*wallthick)-gap,-wallthick])
|
||||
cube([wallthick,depth+2*wallthick,case_z+(2*wallthick)]);
|
||||
translate([-wallthick-gap-adj,-wallthick-gap-.25,((case_z)/2)])
|
||||
cube([wallthick+2*adj,wallthick+.5,8.5]);
|
||||
translate([-wallthick-gap-adj,depth-2*(wallthick)-gap-.25,
|
||||
((case_z)/2)])
|
||||
cube([wallthick+2*adj,wallthick+.5,8.5]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(case_design == "tray_sides") {
|
||||
if(side == "right") {
|
||||
difference() {
|
||||
union() {
|
||||
translate([width-wallthick-gap,-(2*wallthick)-gap,0])
|
||||
cube([sidethick,depth+2*wallthick,case_z+(2*wallthick)]);
|
||||
translate([width-gap-wallthick-1+adj,depth-2*(wallthick+gap)-.5,case_z+(2*wallthick)-2])
|
||||
cube([1,6,2]);
|
||||
translate([width-gap-wallthick-1+adj,-2*(wallthick+gap)+1.5,case_z+(2*wallthick)-2])
|
||||
cube([1,6,2]);
|
||||
// top rail
|
||||
translate([width-6.9-adj,-gap,case_z-floorthick-.5])
|
||||
cube([4,depth-2*(wallthick+gap),2]);
|
||||
}
|
||||
// right side bottom attachment holes
|
||||
translate([width-2*(wallthick+gap)-sidethick-adj,wallthick+gap+10,
|
||||
((bottom_height+floorthick)/2)-1]) rotate([0,90,0]) cylinder(d=3, h=10+sidethick+(2*adj));
|
||||
if(depth >= 75) {
|
||||
translate([width-2*(wallthick+gap)-sidethick-adj,depth-wallthick-gap-10,
|
||||
((bottom_height+floorthick)/2)-1]) rotate([0,90,0])
|
||||
cylinder(d=3, h=10+sidethick+(2*adj));
|
||||
}
|
||||
else {
|
||||
translate([width-2*(wallthick+gap)-sidethick-adj,wallthick+gap+40,
|
||||
((bottom_height+floorthick)/2)-1]) rotate([0,90,0])
|
||||
cylinder(d=3, h=10+sidethick+(2*adj));
|
||||
}
|
||||
}
|
||||
}
|
||||
if(side == "left") {
|
||||
difference() {
|
||||
union() {
|
||||
translate([-wallthick-gap-sidethick,-(2*wallthick)-gap,0])
|
||||
cube([sidethick,depth+2*wallthick,case_z+(2*wallthick)]);
|
||||
translate([-gap-wallthick-adj,depth-2*(wallthick+gap)-.5,case_z+(2*wallthick)-2])
|
||||
cube([1,6,2]);
|
||||
translate([-gap-wallthick-adj,-2*(wallthick+gap)+1.5,case_z+(2*wallthick)-2])
|
||||
cube([1,6,2]);
|
||||
// top rail
|
||||
translate([-wallthick-gap-adj,-gap,case_z-floorthick-.5])
|
||||
cube([4,depth-2*(wallthick+gap),2]);
|
||||
}
|
||||
// left side bottom attachment holes
|
||||
translate([-wallthick-gap-adj-5,wallthick+gap+10,
|
||||
((bottom_height+floorthick)/2)-1]) rotate([0,90,0]) cylinder(d=3, h=10+sidethick+(2*adj));
|
||||
if(depth >= 75) {
|
||||
translate([-wallthick-gap-adj-6,depth-wallthick-gap-10,
|
||||
((bottom_height+floorthick)/2)-1]) rotate([0,90,0])
|
||||
cylinder(d=3, h=10+sidethick+(2*adj));
|
||||
}
|
||||
else {
|
||||
translate([-wallthick-gap-adj-6,wallthick+gap+40,
|
||||
((bottom_height+floorthick)/2)-1]) rotate([0,90,0])
|
||||
cylinder(d=3, h=10+sidethick+(2*adj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(case_design == "tray_vu5") {
|
||||
cheight = case_z+90;
|
||||
vesa = 75;
|
||||
vu_holder("vu5",side,vesa,cheight);
|
||||
}
|
||||
if(case_design == "tray_vu7") {
|
||||
cheight = case_z+122;
|
||||
vesa = 100;
|
||||
vu_holder("vu7",side,vesa,cheight);
|
||||
}
|
||||
// additive accessories
|
||||
if(accessory_name != "none") {
|
||||
for (i=[1:11:len(accessory_data[a[0]])-1]) {
|
||||
class = accessory_data[a[0]][i];
|
||||
type = accessory_data[a[0]][i+1];
|
||||
loc_x = accessory_data[a[0]][i+2];
|
||||
loc_y = accessory_data[a[0]][i+3];
|
||||
loc_z = accessory_data[a[0]][i+4];
|
||||
face = accessory_data[a[0]][i+5];
|
||||
rotation = accessory_data[a[0]][i+6];
|
||||
parametric = accessory_data[a[0]][i+7];
|
||||
size = accessory_data[a[0]][i+8];
|
||||
data = accessory_data[a[0]][i+9];
|
||||
mask = accessory_data[a[0]][i+10];
|
||||
|
||||
if (class == "add1" && face == side) {
|
||||
parametric_move_add(type,loc_x,loc_y,loc_z,face,rotation,parametric,size,data,[false,mask[1],mask[2],mask[3]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// subtractive accessories
|
||||
if(accessory_name != "none") {
|
||||
for (i=[1:11:len(accessory_data[a[0]])-1]) {
|
||||
class = accessory_data[a[0]][i];
|
||||
type = accessory_data[a[0]][i+1];
|
||||
loc_x = accessory_data[a[0]][i+2];
|
||||
loc_y = accessory_data[a[0]][i+3];
|
||||
loc_z = accessory_data[a[0]][i+4];
|
||||
face = accessory_data[a[0]][i+5];
|
||||
rotation = accessory_data[a[0]][i+6];
|
||||
parametric = accessory_data[a[0]][i+7];
|
||||
size_x = accessory_data[a[0]][i+8][0];
|
||||
size_y = accessory_data[a[0]][i+8][1];
|
||||
size_z = accessory_data[a[0]][i+8][2];
|
||||
data = accessory_data[a[0]][i+9];
|
||||
mask = accessory_data[a[0]][i+10];
|
||||
|
||||
if ((class == "sub" && face == side) || class == "suball") {
|
||||
if(accessory_highlight == false) {
|
||||
parametric_move_sub(type,loc_x,loc_y,loc_z,face,rotation,parametric,
|
||||
[size_x,size_y,size_z],data,mask);
|
||||
}
|
||||
else {
|
||||
#parametric_move_sub(type,loc_x,loc_y,loc_z,face,rotation,parametric,
|
||||
[size_x,size_y,size_z],data,mask);
|
||||
}
|
||||
}
|
||||
// create openings for additive
|
||||
if((class == "add1" || class == "add2" || class == "model") && mask[0] == true) {
|
||||
if(accessory_highlight == false) {
|
||||
parametric_move_add(type,loc_x,loc_y,loc_z,face,rotation,parametric,[size_x,size_y,size_z],data,mask);
|
||||
}
|
||||
else {
|
||||
#parametric_move_add(type,loc_x,loc_y,loc_z,face,rotation,parametric,[size_x,size_y,size_z],data,mask);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// sbc openings
|
||||
if(sbc_highlight == true) {
|
||||
#translate([pcb_loc_x ,pcb_loc_y,bottom_height-pcb_z+pcb_loc_z-adj-adj])
|
||||
sbc(sbc_model, cooling, fan_size, gpio_opening, uart_opening, true);
|
||||
}
|
||||
else {
|
||||
translate([pcb_loc_x ,pcb_loc_y,bottom_height-pcb_z+pcb_loc_z-adj-adj])
|
||||
sbc(sbc_model, cooling, fan_size, gpio_opening, uart_opening, true);
|
||||
}
|
||||
// indents
|
||||
if(indents == true) {
|
||||
|
||||
for (i=[1:11:len(sbc_data[s[0]])-2]) {
|
||||
class = sbc_data[s[0]][i+1];
|
||||
type = sbc_data[s[0]][i+2];
|
||||
id = sbc_data[s[0]][i+3];
|
||||
loc_x = sbc_data[s[0]][i+4]+pcb_loc_x;
|
||||
loc_y = sbc_data[s[0]][i+5]+pcb_loc_y;
|
||||
loc_z = sbc_data[s[0]][i+6]+pcb_loc_z;
|
||||
side = sbc_data[s[0]][i+7];
|
||||
rotation = sbc_data[s[0]][i+8];
|
||||
|
||||
indent(loc_x, loc_y, bottom_height+pcb_loc_z-adj, rotation[2], side, class, type, wallthick, gap, floorthick, pcb_z);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(accessory_name != "none") {
|
||||
for (i=[1:11:len(accessory_data[a[0]])-1]) {
|
||||
class = accessory_data[a[0]][i];
|
||||
type = accessory_data[a[0]][i+1];
|
||||
loc_x = accessory_data[a[0]][i+2];
|
||||
loc_y = accessory_data[a[0]][i+3];
|
||||
loc_z = accessory_data[a[0]][i+4];
|
||||
face = accessory_data[a[0]][i+5];
|
||||
rotation = accessory_data[a[0]][i+6];
|
||||
parametric = accessory_data[a[0]][i+7];
|
||||
size = accessory_data[a[0]][i+8];
|
||||
data = accessory_data[a[0]][i+9];
|
||||
mask = accessory_data[a[0]][i+10];
|
||||
|
||||
if (class == "add2" && face == side) {
|
||||
parametric_move_add(type,loc_x,loc_y,loc_z,face,rotation,parametric,size,data,[false,mask[1],mask[2],mask[3]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
660
mod/case_top.scad
Normal file
660
mod/case_top.scad
Normal file
@@ -0,0 +1,660 @@
|
||||
/*
|
||||
This file is part of SBC Case Builder https://github.com/hominoids/SBC_Case_Builder
|
||||
Copyright 2022,2023,2024 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
|
||||
NAME: case_top
|
||||
DESCRIPTION: creates case top for supported designs
|
||||
TODO: none
|
||||
|
||||
USAGE: case_top(case_design)
|
||||
|
||||
*/
|
||||
|
||||
module case_top(case_design) {
|
||||
|
||||
lip = 5;
|
||||
vu_rotation = [15,0,0];
|
||||
case_fn = 360; // circle segments for round cases
|
||||
case_ffn = 90; // circle segments for fillet of round cases
|
||||
adj = .01;
|
||||
|
||||
difference() {
|
||||
union() {
|
||||
difference() {
|
||||
union() {
|
||||
if(case_design == "shell") {
|
||||
difference() {
|
||||
translate([(width/2)-wallthick-gap,
|
||||
(depth/2)-wallthick-gap,bottom_height+(top_height/2)])
|
||||
cube_fillet_inside([width,depth,top_height],
|
||||
vertical=[corner_fillet,corner_fillet,corner_fillet,corner_fillet],
|
||||
top=[edge_fillet,edge_fillet,edge_fillet,edge_fillet,edge_fillet],
|
||||
bottom=[0,0,0,0], $fn=90);
|
||||
translate([(width/2)-wallthick-gap,(depth/2)-wallthick-gap,
|
||||
bottom_height+(top_height/2)-floorthick])
|
||||
cube_fillet_inside([width-(wallthick*2),depth-(wallthick*2),top_height],
|
||||
vertical=[corner_fillet-1,corner_fillet-1,corner_fillet-1,corner_fillet-1],
|
||||
top=[edge_fillet,edge_fillet,edge_fillet,edge_fillet,edge_fillet],
|
||||
bottom=[0,0,0,0], $fn=90);
|
||||
}
|
||||
}
|
||||
if(case_design == "panel") {
|
||||
union() {
|
||||
translate([-gap,-gap,case_z-floorthick])
|
||||
cube([width-(2*wallthick),depth-(2*wallthick),floorthick]);
|
||||
translate([(width*(1/5))-8-(wallthick+gap),depth-(2*wallthick)-gap-adj,
|
||||
case_z-floorthick])
|
||||
cube([8,wallthick+2*adj,floorthick]);
|
||||
translate([width-(width*(1/5))-(wallthick+gap),depth-(2*wallthick)-gap-adj,
|
||||
case_z-floorthick])
|
||||
cube([8,wallthick+2*adj,floorthick]);
|
||||
translate([(width*(1/5))-8-(wallthick+gap),-wallthick-gap+adj,
|
||||
case_z-floorthick])
|
||||
cube([8,wallthick+2*adj,floorthick]);
|
||||
translate([width-(width*(1/5))-(wallthick+gap),-wallthick-gap+adj,
|
||||
case_z-floorthick])
|
||||
cube([8,wallthick+2*adj,floorthick]);
|
||||
}
|
||||
}
|
||||
if(case_design == "stacked") {
|
||||
translate([(width/2)-wallthick-gap,(depth/2)-wallthick-gap,
|
||||
case_z-(floorthick/2)])
|
||||
cube_fillet_inside([width-(2*wallthick),depth-(2*wallthick),floorthick],
|
||||
vertical=[corner_fillet,corner_fillet,corner_fillet,corner_fillet],
|
||||
top=[0,0,0,0], bottom=[0,0,0,0], $fn=90);
|
||||
}
|
||||
if(case_design == "tray_vu5" || case_design == "tray_vu7" || case_design == "tray_sides") {
|
||||
translate([-wallthick-gap+.5,-wallthick-gap,case_z])
|
||||
cube([width-1,depth,floorthick]);
|
||||
translate([-wallthick-gap+.5,-wallthick-gap,
|
||||
case_z-floorthick+adj]) cube([width-1,wallthick,wallthick]);
|
||||
}
|
||||
if(case_design == "tray") {
|
||||
difference() {
|
||||
translate([(width/2)-wallthick-gap,(depth/2)-wallthick-gap,case_z/2])
|
||||
cube_fillet_inside([width+2*wallthick+1,depth,case_z],
|
||||
vertical=[0,0,0,0], top=[0,edge_fillet,0,edge_fillet,edge_fillet],
|
||||
bottom=[0,0,0,0], $fn=90);
|
||||
translate([(width/2)-wallthick-gap,(depth/2)-wallthick-gap,(case_z/2)-floorthick+.25])
|
||||
cube_fillet_inside([width+1,depth+(wallthick*2),case_z],
|
||||
vertical=[corner_fillet-1,corner_fillet-1,corner_fillet-1,corner_fillet-1],
|
||||
top=[0,0,0,0],bottom=[0,0,0,0], $fn=90);
|
||||
for (i=[1:11:len(sbc_data[s[0]])-2]) {
|
||||
class = sbc_data[s[0]][i+1];
|
||||
type = sbc_data[s[0]][i+2];
|
||||
id = sbc_data[s[0]][i+3];
|
||||
pcbhole_x = sbc_data[s[0]][i+4]+pcb_loc_x;
|
||||
pcbhole_y = sbc_data[s[0]][i+5]+pcb_loc_y;
|
||||
pcbhole_z = sbc_data[s[0]][i+6];
|
||||
pcbhole_size = sbc_data[s[0]][i+9][0];
|
||||
pcbhole_pos = sbc_data[s[0]][i+10][4];
|
||||
|
||||
if(class == "pcbhole" && id == pcb_id && pcbhole_pos == "left_rear") {
|
||||
if((pcbhole_y <= 10 && pcbhole_x <= 10) || (ext_top_standoffs == true && ext_top_rear_left_enable == true)) {
|
||||
translate([-wallthick-gap-adj-6,wallthick+gap+10,floorthick+3.4]) rotate([0,90,0])
|
||||
cylinder(d=3, h=10+sidethick+(2*adj));
|
||||
}
|
||||
else {
|
||||
translate([-wallthick-gap-adj-6,wallthick+gap+2,floorthick+3.4]) rotate([0,90,0])
|
||||
cylinder(d=3, h=10+sidethick+(2*adj));
|
||||
}
|
||||
}
|
||||
if(class == "pcbhole" && id == pcb_id && pcbhole_pos == "left_front") {
|
||||
if((pcbhole_y >= pcb_depth+case_offset_y-10 && pcbhole_x <= 10) || (ext_top_standoffs == true && ext_top_front_left_enable == true)) {
|
||||
translate([-wallthick-gap-adj-6,wallthick-gap+pcb_depth+case_offset_y-14,
|
||||
floorthick+3.4]) rotate([0,90,0]) cylinder(d=3, h=10+sidethick+(2*adj));
|
||||
}
|
||||
else {
|
||||
translate([-wallthick-gap-adj-6,wallthick+gap+pcb_depth+case_offset_y-8,
|
||||
floorthick+3.4]) rotate([0,90,0]) cylinder(d=3, h=10+sidethick+(2*adj));
|
||||
}
|
||||
}
|
||||
if(class == "pcbhole" && id == pcb_id && pcbhole_pos == "right_rear") {
|
||||
if((pcbhole_y <= 10 && pcbhole_x >= pcb_width-10) || (ext_top_standoffs == true && ext_top_rear_right_enable == true)) {
|
||||
translate([width-2*(wallthick+gap)-sidethick-adj,wallthick+gap+10,floorthick+3.4])
|
||||
rotate([0,90,0]) cylinder(d=3, h=10+sidethick+(2*adj));
|
||||
}
|
||||
else {
|
||||
translate([width-2*(wallthick+gap)-sidethick-adj,wallthick+gap+2,floorthick+3.4])
|
||||
rotate([0,90,0]) cylinder(d=3, h=10+sidethick+(2*adj));
|
||||
}
|
||||
}
|
||||
if(class == "pcbhole" && id == pcb_id && pcbhole_pos == "right_front") {
|
||||
if((pcbhole_y >= pcb_depth+case_offset_y-10 && pcbhole_x >= width-10) || (ext_bottom_standoffs == true && ext_bottom_front_right_enable == true)) {
|
||||
translate([width-3*(wallthick+gap)-adj,wallthick-gap+pcb_depth+case_offset_y-14,
|
||||
floorthick+3.4]) rotate([0,90,0]) cylinder(d=3, h=10+sidethick+(2*adj));
|
||||
}
|
||||
else {
|
||||
translate([width-3*(wallthick+gap)-adj,wallthick-gap+pcb_depth+case_offset_y-8,
|
||||
floorthick+3.4]) rotate([0,90,0]) cylinder(d=3, h=10+sidethick+(2*adj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(case_design == "round") {
|
||||
difference() {
|
||||
translate([pcb_width/2,pcb_depth/2,bottom_height+(top_height/2)-lip/2]) rotate([0,0,30])
|
||||
cylinder_fillet_inside(h=top_height+lip, r=case_diameter/2,
|
||||
top=edge_fillet, bottom=0, $fn=case_fn, fillet_fn=case_ffn, center=true);
|
||||
translate([pcb_width/2,pcb_depth/2,bottom_height+(top_height/2)-floorthick-lip/2]) rotate([0,0,30])
|
||||
cylinder_fillet_inside(h=top_height+lip, r=(case_diameter/2)-wallthick,
|
||||
top=edge_fillet-1, bottom=0, $fn=case_fn, fillet_fn=case_ffn, center=true);
|
||||
translate([pcb_width/2,pcb_depth/2,bottom_height-adj-lip/2]) rotate([0,0,30])
|
||||
cylinder_fillet_inside(h=lip+2*adj, r=(case_diameter/2)-wallthick/2+tol/2,
|
||||
top=edge_fillet-1, bottom=0, $fn=case_fn, fillet_fn=case_ffn, center=true);
|
||||
// io cutout
|
||||
if(width/depth >= 1.4 && sbc_model != "vim1" && sbc_model != "vim2" &&
|
||||
sbc_model != "vim3l" && sbc_model != "vim3" && sbc_model != "vim4" &&
|
||||
sbc_model != "rpizero" && sbc_model != "rpizero2w") {
|
||||
translate([width,(depth/2)-wallthick-gap,bottom_height-lip+top_height/2-floorthick])
|
||||
cube_fillet_inside([18,depth-2*(wallthick+gap)-1,top_height+lip+2],
|
||||
vertical=[0,0,0,0], top=[0,0,0,0], bottom=[0,0,0,0], $fn=90);
|
||||
}
|
||||
else {
|
||||
translate([(width/2)-wallthick-gap,-20,bottom_height-lip+top_height/2-floorthick])
|
||||
cube_fillet_inside([width-2*(wallthick+gap)-1,40,top_height+lip+2],
|
||||
vertical=[0,0,0,0], top=[0,0,0,0], bottom=[0,0,0,0], $fn=90);
|
||||
}
|
||||
}
|
||||
if(width/depth >= 1.4 && sbc_model != "vim1" && sbc_model != "vim2" &&
|
||||
sbc_model != "vim3l" && sbc_model != "vim3" && sbc_model != "vim4" &&
|
||||
sbc_model != "rpizero" && sbc_model != "rpizero2w") {
|
||||
translate([width-2*wallthick-gap-.95,depth/2-wallthick-gap-(depth-2*(floorthick+gap))/2,
|
||||
bottom_height]) cube([wallthick-adj,depth-2*(floorthick+gap),top_height+adj]);
|
||||
}
|
||||
else {
|
||||
translate([-.95,depth/2-2*wallthick-gap-(depth-2*(floorthick+gap))/2,
|
||||
bottom_height]) cube([width-2*(floorthick+gap),wallthick-adj,top_height+adj]);
|
||||
}
|
||||
}
|
||||
if(case_design == "hex") {
|
||||
if(width/depth >= 1.4 && sbc_model != "vim1" && sbc_model != "vim2" &&
|
||||
sbc_model != "vim3l" && sbc_model != "vim3" && sbc_model != "vim4" &&
|
||||
sbc_model != "rpizero" && sbc_model != "rpizero2w") {
|
||||
difference() {
|
||||
translate([pcb_width/2,pcb_depth/2,bottom_height+(top_height/2)-lip/2]) rotate([0,0,30])
|
||||
cylinder_fillet_inside(h=top_height+lip, r=case_diameter/2,
|
||||
top=edge_fillet, bottom=0, $fn=6, fillet_fn=case_ffn, center=true);
|
||||
translate([pcb_width/2,pcb_depth/2,bottom_height+(top_height/2)-floorthick-lip/2]) rotate([0,0,30])
|
||||
cylinder_fillet_inside(h=top_height+lip, r=(case_diameter/2)-wallthick,
|
||||
top=edge_fillet-1, bottom=0, $fn=6, fillet_fn=case_ffn, center=true);
|
||||
translate([pcb_width/2,pcb_depth/2,bottom_height-adj-lip/2]) rotate([0,0,30])
|
||||
cylinder_fillet_inside(h=lip+2*adj, r=(case_diameter/2)-wallthick/2+tol/2,
|
||||
top=edge_fillet-1, bottom=0, $fn=6, fillet_fn=case_ffn, center=true);
|
||||
// io cutout
|
||||
translate([width,(depth/2)-wallthick-gap,bottom_height-lip+top_height/2-floorthick])
|
||||
cube_fillet_inside([18,depth-2*(wallthick+gap)-1,top_height+lip+2],
|
||||
vertical=[0,0,0,0], top=[0,0,0,0], bottom=[0,0,0,0], $fn=90);
|
||||
}
|
||||
}
|
||||
else {
|
||||
difference() {
|
||||
translate([pcb_width/2,pcb_depth/2,bottom_height+(top_height/2)-lip/2]) rotate([0,0,0])
|
||||
cylinder_fillet_inside(h=top_height+lip, r=hex_diameter/2,
|
||||
top=edge_fillet, bottom=0, $fn=6, fillet_fn=case_ffn, center=true);
|
||||
translate([pcb_width/2,pcb_depth/2,bottom_height+(top_height/2)-floorthick-lip/2])
|
||||
rotate([0,0,0]) cylinder_fillet_inside(h=top_height+lip, r=(hex_diameter/2)-wallthick,
|
||||
top=edge_fillet-1, bottom=0, $fn=6, fillet_fn=case_ffn, center=true);
|
||||
translate([pcb_width/2,pcb_depth/2,bottom_height-adj-lip/2]) rotate([0,0,0])
|
||||
cylinder_fillet_inside(h=lip+2*adj, r=(hex_diameter/2)-wallthick/2+tol/2,
|
||||
top=edge_fillet-1, bottom=0, $fn=6, fillet_fn=case_ffn, center=true);
|
||||
// io cutout
|
||||
translate([(width/2)-wallthick-gap,-23,bottom_height-lip+top_height/2-floorthick])
|
||||
cube_fillet_inside([width-2*(wallthick+gap),40,top_height+lip+2],
|
||||
vertical=[0,0,0,0], top=[0,0,0,0], bottom=[0,0,0,0], $fn=90);
|
||||
}
|
||||
}
|
||||
if(width/depth >= 1.4 && sbc_model != "vim1" && sbc_model != "vim2" &&
|
||||
sbc_model != "vim3l" && sbc_model != "vim3" && sbc_model != "vim4" &&
|
||||
sbc_model != "rpizero" && sbc_model != "rpizero2w") {
|
||||
translate([width-2*wallthick-gap-.95,depth/2-wallthick-gap-(depth-2*(floorthick+gap))/2,
|
||||
bottom_height]) cube([wallthick-adj,depth-2*(floorthick+gap),top_height+adj]);
|
||||
}
|
||||
else {
|
||||
translate([0,depth/2-2.25*(wallthick+gap)-(depth-2*(floorthick+gap))/2,
|
||||
bottom_height]) cube([width-2*(floorthick+gap),wallthick-adj,top_height+adj]);
|
||||
}
|
||||
}
|
||||
if(case_design == "snap") {
|
||||
translate([(width/2)-wallthick-gap,(depth/2)-wallthick-gap,floorthick*1.5+case_z])
|
||||
cube_fillet_inside([width,depth,floorthick],
|
||||
vertical=[corner_fillet,corner_fillet,corner_fillet,corner_fillet],
|
||||
top=[0,0,0,0],bottom=[edge_fillet,edge_fillet,edge_fillet,edge_fillet,edge_fillet], $fn=90);
|
||||
difference() {
|
||||
translate([(width/2)-wallthick-gap,(depth/2)-wallthick-gap,case_z-adj])
|
||||
cube_fillet_inside([width-2*wallthick-tol,depth-2*wallthick-tol,2*floorthick+1.5],
|
||||
vertical=[corner_fillet,corner_fillet,corner_fillet,corner_fillet],
|
||||
top=[0,0,0,0],bottom=[edge_fillet,edge_fillet,edge_fillet,edge_fillet,edge_fillet], $fn=90);
|
||||
|
||||
translate([(width/2)-wallthick-gap,(depth/2)-wallthick-gap,case_z-adj])
|
||||
cube_fillet_inside([width-(3*wallthick),depth-(3*wallthick),2*floorthick+1.5+adj],
|
||||
vertical=[corner_fillet-1,corner_fillet-1,corner_fillet-1,corner_fillet-1],top=[0,0,0,0],
|
||||
bottom=[edge_fillet,edge_fillet,edge_fillet,edge_fillet,edge_fillet], $fn=90);
|
||||
}
|
||||
// snap top outdent
|
||||
difference() {
|
||||
translate([-wallthick-gap+1.25+tol,(depth/2)-((depth*.75)/2)+2.5-gap-wallthick,case_z-.5])
|
||||
rotate([0,45,0]) cube([4,(depth*.75)-5,4]);
|
||||
translate([-wallthick-gap+3,(depth/2)-((depth*.75)/2)+1.25-gap-wallthick,case_z+floorthick-5.75])
|
||||
rotate([0,0,0]) cube([6,(depth*.75)-2,6]);
|
||||
}
|
||||
difference() {
|
||||
translate([width-wallthick-gap-6.8-tol,(depth/2)-((depth*.75)/2)+2.5-gap-wallthick,case_z-.5])
|
||||
rotate([0,45,0]) cube([4,(depth*.75)-5,4]);
|
||||
translate([width-wallthick-gap-8.5,(depth/2)-((depth*.75)/2)+1.25-gap-wallthick,case_z+floorthick-5.75])
|
||||
rotate([0,0,0]) cube([6,(depth*.75)-2,6]);
|
||||
}
|
||||
}
|
||||
if(case_design == "fitted") {
|
||||
difference() {
|
||||
translate([(width/2)-wallthick-gap,
|
||||
(depth/2)-wallthick-gap,case_z+floorthick/2-(lip)/2])
|
||||
cube_fillet_inside([width,depth,lip+floorthick],
|
||||
vertical=[corner_fillet,corner_fillet,corner_fillet,corner_fillet],
|
||||
top=[edge_fillet,edge_fillet,edge_fillet,edge_fillet,edge_fillet],
|
||||
bottom=[0,0,0,0], $fn=90);
|
||||
translate([(width/2)-wallthick-gap,(depth/2)-wallthick-gap,case_z-floorthick-1])
|
||||
cube_fillet_inside([width-wallthick+tol,depth-wallthick+tol,lip+floorthick],
|
||||
vertical=[corner_fillet-1,corner_fillet-1,corner_fillet-1,corner_fillet-1],
|
||||
top=[edge_fillet,edge_fillet,edge_fillet,edge_fillet,edge_fillet],
|
||||
bottom=[0,0,0,0], $fn=90);
|
||||
}
|
||||
}
|
||||
if(accessory_name != "none") {
|
||||
for (i=[1:11:len(accessory_data[a[0]])-1]) {
|
||||
class = accessory_data[a[0]][i];
|
||||
type = accessory_data[a[0]][i+1];
|
||||
loc_x = accessory_data[a[0]][i+2];
|
||||
loc_y = accessory_data[a[0]][i+3];
|
||||
loc_z = accessory_data[a[0]][i+4];
|
||||
face = accessory_data[a[0]][i+5];
|
||||
rotation = accessory_data[a[0]][i+6];
|
||||
parametric = accessory_data[a[0]][i+7];
|
||||
size = accessory_data[a[0]][i+8];
|
||||
data = accessory_data[a[0]][i+9];
|
||||
mask = accessory_data[a[0]][i+10];
|
||||
|
||||
if (class == "add1" && face == "top") {
|
||||
parametric_move_add(type,loc_x,loc_y,loc_z,face,rotation,parametric,size,data,[false,mask[1],mask[2],mask[3]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// pcb standoff holes
|
||||
if(sbc_top_standoffs == true) {
|
||||
for (i=[1:11:len(sbc_data[s[0]])-2]) {
|
||||
class = sbc_data[s[0]][i+1];
|
||||
type = sbc_data[s[0]][i+2];
|
||||
id = sbc_data[s[0]][i+3];
|
||||
pcbhole_x = sbc_data[s[0]][i+4]+pcb_loc_x;
|
||||
pcbhole_y = sbc_data[s[0]][i+5]+pcb_loc_y;
|
||||
pcbhole_z = sbc_data[s[0]][i+6];
|
||||
pcbhole_size = sbc_data[s[0]][i+9][0];
|
||||
pcbhole_pos = sbc_data[s[0]][i+10][4];
|
||||
|
||||
if (class == "pcbhole" && id == pcb_id && pcbhole_pos == "left_rear" && top_rear_left_enable == true &&
|
||||
top_standoff[6] != "blind") {
|
||||
translate([pcbhole_x,pcbhole_y,top_height+5]) cylinder(d=top_standoff[4]-.2, h=top_height);
|
||||
}
|
||||
if (class == "pcbhole" && id == pcb_id && pcbhole_pos == "left_front" && top_front_left_enable == true &&
|
||||
top_standoff[6] != "blind") {
|
||||
translate([pcbhole_x,pcbhole_y,top_height+5]) cylinder(d=top_standoff[4]-.2, h=top_height);
|
||||
}
|
||||
if (class == "pcbhole" && id == pcb_id && pcbhole_pos == "right_rear" && top_rear_right_enable == true &&
|
||||
top_standoff[6] != "blind") {
|
||||
translate([pcbhole_x,pcbhole_y,top_height+5]) cylinder(d=top_standoff[4]-.2, h=top_height);
|
||||
}
|
||||
if (class == "pcbhole" && id == pcb_id && pcbhole_pos == "right_front" && top_front_right_enable == true &&
|
||||
top_standoff[6] != "blind") {
|
||||
translate([pcbhole_x,pcbhole_y,top_height+5]) cylinder(d=top_standoff[4]-.2, h=top_height);
|
||||
}
|
||||
}
|
||||
}
|
||||
// extended standoff holes
|
||||
if(ext_top_standoffs == true) {
|
||||
// right-rear standoff
|
||||
if((width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 || pcb_loc_y >= 10) &&
|
||||
ext_top_rear_right_enable == true && ext_top_standoff[6] != "blind") {
|
||||
translate([width-ext_top_standoff_support_size/4-(2*(wallthick+gap))-(corner_fillet/2),
|
||||
(corner_fillet/2)+ext_top_standoff_support_size/4,top_height+5]) cylinder(d=ext_top_standoff[4]-.2, h=top_height);
|
||||
}
|
||||
// right-front standoff
|
||||
if(((width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 && depth-pcb_loc_y-pcb_depth >= 10) ||
|
||||
(width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 && depth-pcb_loc_y-pcb_depth <= 10) ||
|
||||
(width-pcb_loc_x-pcb_width-(gap+2*wallthick) <= 10 && depth-pcb_loc_y-pcb_depth >= 10)) &&
|
||||
ext_top_front_right_enable == true && ext_top_standoff[6] != "blind") {
|
||||
translate([width-ext_top_standoff_support_size/4-(corner_fillet/2)-(2*(wallthick+gap)),
|
||||
depth-ext_top_standoff_support_size/4-(corner_fillet/2)-(2*(wallthick+gap)),top_height+5])
|
||||
cylinder(d=ext_top_standoff[4]-.2, h=top_height);
|
||||
}
|
||||
// left-rear standoff
|
||||
if((pcb_loc_x >= 10 || pcb_loc_y >= 10) && ext_top_rear_left_enable == true && ext_top_standoff[6] != "blind") {
|
||||
translate([(corner_fillet/2)+ext_top_standoff_support_size/4,
|
||||
(corner_fillet/2)+ext_top_standoff_support_size/4,top_height+5]) cylinder(d=ext_top_standoff[4]-.2, h=top_height);
|
||||
}
|
||||
// left-front standoff
|
||||
if(((pcb_loc_x >= 10 && (depth-(pcb_loc_y+pcb_depth)) >= 10) ||
|
||||
(pcb_loc_x <= 10 && (depth-(pcb_loc_y+pcb_depth)) >= 10) ||
|
||||
(pcb_loc_x >= 10 && (depth-(pcb_loc_y+pcb_depth)) <= 10)) &&
|
||||
ext_top_front_left_enable == true && ext_top_standoff[6] != "blind") {
|
||||
translate([+(corner_fillet/2)+ext_top_standoff_support_size/4,
|
||||
depth-ext_top_standoff_support_size/4-(corner_fillet/2)-(2*(wallthick+gap)),top_height+5])
|
||||
cylinder(d=ext_top_standoff[4]-.2, h=top_height);
|
||||
}
|
||||
}
|
||||
// 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 == "linear_vertical") {
|
||||
translate([0,-gap,case_z-2]) vent(wallthick,depth-2*wallthick-gap,floorthick+4,1,1,(width-2*wallthick-gap)/4,"horizontal");
|
||||
}
|
||||
if(top_cover_pattern == "linear_horizontal") {
|
||||
translate([-gap,-gap,case_z-2]) vent(width-2*wallthick-gap,wallthick,floorthick+4,1,(depth-2*wallthick-gap)/3,1,"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");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// rear io shield opening for standard form motherboards
|
||||
if(rear_io_shield == true) {
|
||||
if(sbc_model == "mini-stx_thin") {
|
||||
translate([6.2+pcb_loc_x,-4.5,-4.15+bottom_height-pcb_z+pcb_loc_z]) cube([123.95, 10+pcb_loc_y, 25]);
|
||||
}
|
||||
if(sbc_model == "mini-stx") {
|
||||
translate([6.2+pcb_loc_x,-4.5,-4.15+bottom_height-pcb_z+pcb_loc_z]) cube([123.95, 10+pcb_loc_y, 40]);
|
||||
}
|
||||
if(sbc_model == "mini-itx_thin") {
|
||||
translate([-2.62+pcb_loc_x,-4.5,-1.75+bottom_height-pcb_z+pcb_loc_z]) cube([158.75, 10+pcb_loc_y, 25]);
|
||||
}
|
||||
if(sbc_model != "mini-stx_thin" && sbc_model != "mini-stx" && sbc_model != "mini-itx_thin") {
|
||||
translate([-2.62+pcb_loc_x,-4.5,-1.75+bottom_height-pcb_z+pcb_loc_z]) cube([158.75, 10+pcb_loc_y, 44]);
|
||||
}
|
||||
}
|
||||
}
|
||||
// pcb standoffs
|
||||
if(sbc_top_standoffs == true) {
|
||||
for (i=[1:11:len(sbc_data[s[0]])-2]) {
|
||||
class = sbc_data[s[0]][i+1];
|
||||
type = sbc_data[s[0]][i+2];
|
||||
id = sbc_data[s[0]][i+3];
|
||||
pcbhole_x = sbc_data[s[0]][i+4]+pcb_loc_x;
|
||||
pcbhole_y = sbc_data[s[0]][i+5]+pcb_loc_y;
|
||||
pcbhole_z = sbc_data[s[0]][i+6];
|
||||
pcbhole_size = sbc_data[s[0]][i+9][0];
|
||||
pcbhole_pos = sbc_data[s[0]][i+10][4];
|
||||
if(class == "pcbhole" && id == pcb_id &&
|
||||
(pcbhole_pos == "left_rear" || pcbhole_pos == "left_front" || pcbhole_pos == "right_rear" || pcbhole_pos == "right_front")) {
|
||||
if (pcbhole_pos == "left_rear" && top_rear_left_enable == true) {
|
||||
top_support = top_sidewall_support == true ? top_rear_left_support : "none";
|
||||
pcb_standoff = [top_standoff[0],
|
||||
top_standoff[1],
|
||||
top_height+top_rear_left_adjust-pcb_loc_z,
|
||||
top_standoff[3],
|
||||
top_standoff[4],
|
||||
top_standoff[5],
|
||||
top_standoff[6],
|
||||
top_standoff[7],
|
||||
top_support,
|
||||
top_standoff[9],
|
||||
top_standoff[10],
|
||||
top_standoff[11],
|
||||
top_standoff[12]];
|
||||
translate([pcbhole_x,pcbhole_y,case_z]) standoff(pcb_standoff,[false,10,2,"default"]);
|
||||
}
|
||||
if (pcbhole_pos == "left_front" && top_front_left_enable == true) {
|
||||
top_support = top_sidewall_support == true ? top_front_left_support : "none";
|
||||
pcb_standoff = [top_standoff[0],
|
||||
top_standoff[1],
|
||||
top_height+top_front_left_adjust-pcb_loc_z,
|
||||
top_standoff[3],
|
||||
top_standoff[4],
|
||||
top_standoff[5],
|
||||
top_standoff[6],
|
||||
top_standoff[7],
|
||||
top_support,
|
||||
top_standoff[9],
|
||||
top_standoff[10],
|
||||
top_standoff[11],
|
||||
top_standoff[12]];
|
||||
translate([pcbhole_x,pcbhole_y,case_z]) standoff(pcb_standoff,[false,10,2,"default"]);
|
||||
}
|
||||
if (pcbhole_pos == "right_rear" && top_rear_right_enable == true) {
|
||||
top_support = top_sidewall_support == true ? top_rear_right_support : "none";
|
||||
pcb_standoff = [top_standoff[0],
|
||||
top_standoff[1],
|
||||
top_height+top_rear_right_adjust-pcb_loc_z,
|
||||
top_standoff[3],
|
||||
top_standoff[4],
|
||||
top_standoff[5],
|
||||
top_standoff[6],
|
||||
top_standoff[7],
|
||||
top_support,
|
||||
top_standoff[9],
|
||||
top_standoff[10],
|
||||
top_standoff[11],
|
||||
top_standoff[12]];
|
||||
translate([pcbhole_x,pcbhole_y,case_z]) standoff(pcb_standoff,[false,10,2,"default"]);
|
||||
}
|
||||
if (pcbhole_pos == "right_front" && top_front_right_enable == true) {
|
||||
top_support = top_sidewall_support == true ? top_front_right_support : "none";
|
||||
pcb_standoff = [top_standoff[0],
|
||||
top_standoff[1],
|
||||
top_height+top_front_right_adjust-pcb_loc_z,
|
||||
top_standoff[3],
|
||||
top_standoff[4],
|
||||
top_standoff[5],
|
||||
top_standoff[6],
|
||||
top_standoff[7],
|
||||
top_support,
|
||||
top_standoff[9],
|
||||
top_standoff[10],
|
||||
top_standoff[11],
|
||||
top_standoff[12]];
|
||||
translate([pcbhole_x,pcbhole_y,case_z]) standoff(pcb_standoff,[false,10,2,"default"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// extended standoffs
|
||||
if(ext_top_standoffs == true) {
|
||||
// extended right-rear standoff
|
||||
if((width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 || pcb_loc_y >= 10) && ext_top_rear_right_enable == true) {
|
||||
extended_standoff = [ext_top_standoff[0],
|
||||
ext_top_standoff[1],
|
||||
top_height+ext_top_rear_right_adjust,
|
||||
ext_top_standoff[3],
|
||||
ext_top_standoff[4],
|
||||
ext_top_standoff[5],
|
||||
ext_top_standoff[6],
|
||||
ext_top_standoff[7],
|
||||
ext_top_rear_right_support,
|
||||
ext_top_standoff[9],
|
||||
ext_top_standoff[10],
|
||||
ext_top_standoff[11],
|
||||
ext_top_standoff[12]];
|
||||
translate([width-ext_top_standoff_support_size/4-(2*(wallthick+gap))-(corner_fillet/2),
|
||||
(corner_fillet/2)+ext_top_standoff_support_size/4,case_z]) standoff(extended_standoff,[false,10,2,"default"]);
|
||||
}
|
||||
// extended right-front standoff
|
||||
if(((width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 && depth-pcb_loc_y-pcb_depth >= 10) ||
|
||||
(width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= 10 && depth-pcb_loc_y-pcb_depth <= 10) ||
|
||||
(width-pcb_loc_x-pcb_width-(gap+2*wallthick) <= 10 && depth-pcb_loc_y-pcb_depth >= 10)) &&
|
||||
ext_top_front_right_enable == true) {
|
||||
extended_standoff = [ext_top_standoff[0],
|
||||
ext_top_standoff[1],
|
||||
top_height+ext_top_front_right_adjust,
|
||||
ext_top_standoff[3],
|
||||
ext_top_standoff[4],
|
||||
ext_top_standoff[5],
|
||||
ext_top_standoff[6],
|
||||
ext_top_standoff[7],
|
||||
ext_top_front_right_support,
|
||||
ext_top_standoff[9],
|
||||
ext_top_standoff[10],
|
||||
ext_top_standoff[11],
|
||||
ext_top_standoff[12]];
|
||||
translate([width-ext_top_standoff_support_size/4-(corner_fillet/2)-(2*(wallthick+gap)),
|
||||
depth-ext_top_standoff_support_size/4-(corner_fillet/2)-(2*(wallthick+gap)),case_z])
|
||||
standoff(extended_standoff,[false,10,2,"default"]);
|
||||
}
|
||||
// extended left-rear standoff
|
||||
if((pcb_loc_x >= 10 || pcb_loc_y >= 10) && ext_top_rear_left_enable == true) {
|
||||
extended_standoff = [ext_top_standoff[0],
|
||||
ext_top_standoff[1],
|
||||
top_height+ext_top_rear_left_adjust,
|
||||
ext_top_standoff[3],
|
||||
ext_top_standoff[4],
|
||||
ext_top_standoff[5],
|
||||
ext_top_standoff[6],
|
||||
ext_top_standoff[7],
|
||||
ext_top_rear_left_support,
|
||||
ext_top_standoff[9],
|
||||
ext_top_standoff[10],
|
||||
ext_top_standoff[11],
|
||||
ext_top_standoff[12]];
|
||||
translate([(corner_fillet/2)+ext_top_standoff_support_size/4,
|
||||
(corner_fillet/2)+ext_top_standoff_support_size/4,case_z]) standoff(extended_standoff,[false,10,2,"default"]);
|
||||
}
|
||||
// extended left-front standoff
|
||||
if(((pcb_loc_x >= 10 && (depth-(pcb_loc_y+pcb_depth)) >= 10) ||
|
||||
(pcb_loc_x <= 10 && (depth-(pcb_loc_y+pcb_depth)) >= 10) ||
|
||||
(pcb_loc_x >= 10 && depth-(pcb_loc_y+pcb_depth) <= 10)) &&
|
||||
ext_top_front_left_enable == true) {
|
||||
extended_standoff = [ext_top_standoff[0],
|
||||
ext_top_standoff[1],
|
||||
top_height+ext_top_front_left_adjust,
|
||||
ext_top_standoff[3],
|
||||
ext_top_standoff[4],
|
||||
ext_top_standoff[5],
|
||||
ext_top_standoff[6],
|
||||
ext_top_standoff[7],
|
||||
ext_top_front_left_support,
|
||||
ext_top_standoff[9],
|
||||
ext_top_standoff[10],
|
||||
ext_top_standoff[11],
|
||||
ext_top_standoff[12]];
|
||||
translate([(corner_fillet/2)+ext_top_standoff_support_size/4,
|
||||
depth-ext_top_standoff_support_size/4-(corner_fillet/2)-(2*(wallthick+gap)), case_z])
|
||||
standoff(extended_standoff,[false,10,2,"default"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
// subtractive accessories
|
||||
if(accessory_name != "none") {
|
||||
for (i=[1:11:len(accessory_data[a[0]])-1]) {
|
||||
class = accessory_data[a[0]][i];
|
||||
type = accessory_data[a[0]][i+1];
|
||||
loc_x = accessory_data[a[0]][i+2];
|
||||
loc_y = accessory_data[a[0]][i+3];
|
||||
loc_z = accessory_data[a[0]][i+4];
|
||||
face = accessory_data[a[0]][i+5];
|
||||
rotation = accessory_data[a[0]][i+6];
|
||||
parametric = accessory_data[a[0]][i+7];
|
||||
size_x = accessory_data[a[0]][i+8][0];
|
||||
size_y = accessory_data[a[0]][i+8][1];
|
||||
size_z = accessory_data[a[0]][i+8][2];
|
||||
data = accessory_data[a[0]][i+9];
|
||||
mask = accessory_data[a[0]][i+10];
|
||||
|
||||
if ((class == "sub" && face == "top") || class == "suball") {
|
||||
if(accessory_highlight == false) {
|
||||
parametric_move_sub(type,loc_x,loc_y,loc_z,face,rotation,
|
||||
parametric,[size_x,size_y,size_z],data,mask);
|
||||
}
|
||||
else {
|
||||
#parametric_move_sub(type,loc_x,loc_y,loc_z,face,rotation,
|
||||
parametric,[size_x,size_y,size_z],data,mask);
|
||||
}
|
||||
}
|
||||
|
||||
// create openings for additive
|
||||
if((class == "add1" || class == "add2" || class == "model") && mask[0] == true) {
|
||||
if(accessory_highlight == false) {
|
||||
parametric_move_add(type,loc_x,loc_y,loc_z,face,rotation,parametric,[size_x,size_y,size_z],data,mask);
|
||||
}
|
||||
else {
|
||||
#parametric_move_add(type,loc_x,loc_y,loc_z,face,rotation,parametric,[size_x,size_y,size_z],data,mask);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// sbc openings
|
||||
if(sbc_highlight == true) {
|
||||
#translate([pcb_loc_x ,pcb_loc_y,bottom_height-pcb_z+pcb_loc_z-adj])
|
||||
sbc(sbc_model, cooling, fan_size, gpio_opening, uart_opening, true);
|
||||
}
|
||||
else {
|
||||
translate([pcb_loc_x ,pcb_loc_y,bottom_height-pcb_z+pcb_loc_z-adj])
|
||||
sbc(sbc_model, cooling, fan_size, gpio_opening, uart_opening, true);
|
||||
}
|
||||
// indents
|
||||
if(indents == true) {
|
||||
|
||||
for (i=[1:11:len(sbc_data[s[0]])-2]) {
|
||||
class = sbc_data[s[0]][i+1];
|
||||
type = sbc_data[s[0]][i+2];
|
||||
id = sbc_data[s[0]][i+3];
|
||||
loc_x = sbc_data[s[0]][i+4]+pcb_loc_x;
|
||||
loc_y = sbc_data[s[0]][i+5]+pcb_loc_y;
|
||||
loc_z = sbc_data[s[0]][i+6]+pcb_loc_z;
|
||||
side = sbc_data[s[0]][i+7];
|
||||
rotation = sbc_data[s[0]][i+8];
|
||||
|
||||
indent(loc_x, loc_y, bottom_height+pcb_loc_z-adj, rotation[2], side, class, type, wallthick, gap, floorthick, pcb_z);
|
||||
}
|
||||
}
|
||||
// clean fillets
|
||||
if(case_design == "shell") {
|
||||
translate(([(width/2)-wallthick-gap,(depth/2)-wallthick-gap,
|
||||
bottom_height+(top_height/2)]) )
|
||||
cube_negative_fillet([width,depth,top_height], radius=-1,
|
||||
vertical=[corner_fillet,corner_fillet,corner_fillet,corner_fillet],
|
||||
top=[edge_fillet,edge_fillet,edge_fillet,edge_fillet,edge_fillet],
|
||||
bottom=[0,0,0,0], $fn=90);
|
||||
}
|
||||
}
|
||||
// additive accessories
|
||||
if(accessory_name != "none") {
|
||||
for (i=[1:11:len(accessory_data[a[0]])-1]) {
|
||||
class = accessory_data[a[0]][i];
|
||||
type = accessory_data[a[0]][i+1];
|
||||
loc_x = accessory_data[a[0]][i+2];
|
||||
loc_y = accessory_data[a[0]][i+3];
|
||||
loc_z = accessory_data[a[0]][i+4];
|
||||
face = accessory_data[a[0]][i+5];
|
||||
rotation = accessory_data[a[0]][i+6];
|
||||
parametric = accessory_data[a[0]][i+7];
|
||||
size = accessory_data[a[0]][i+8];
|
||||
data = accessory_data[a[0]][i+9];
|
||||
mask = accessory_data[a[0]][i+10];
|
||||
|
||||
if (class == "add2" && face == "top") {
|
||||
parametric_move_add(type,loc_x,loc_y,loc_z,face,rotation,parametric,size,data,[false,mask[1],mask[2],mask[3]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
function poly_sides_r(r) = (max(round(4 * r),3)+1);
|
||||
|
||||
// 2d primitive for outside fillets.
|
||||
module fillet_2d_o(fillet_r, fillet_angle=90, fillet_fn=90) {
|
||||
module fillet_2d_o(fillet_r, fillet_angle=90, fillet_fn=0) {
|
||||
add=0.01;
|
||||
f_fn=(fillet_fn>0) ? fillet_fn*4 : (ceil(poly_sides_r(fillet_r)/4)*4);
|
||||
if (fillet_r>0) {
|
||||
@@ -23,7 +23,7 @@ module fillet_2d_o(fillet_r, fillet_angle=90, fillet_fn=90) {
|
||||
}
|
||||
|
||||
// 2d primitive for inside fillets.
|
||||
module fillet_2d_i(fillet_r, fillet_angle=90, fillet_fn=90) {
|
||||
module fillet_2d_i(fillet_r, fillet_angle=90, fillet_fn=0) {
|
||||
add=0.01;
|
||||
f_fn=(fillet_fn>0) ? fillet_fn*4 : (ceil(poly_sides_r(fillet_r)/4)*4);
|
||||
if (fillet_r>0) {
|
||||
@@ -41,7 +41,7 @@ module fillet_2d_i(fillet_r, fillet_angle=90, fillet_fn=90) {
|
||||
}
|
||||
|
||||
// 3d rotated outside fillet.
|
||||
module fillet_polar_o(inner_r, fillet_r, fillet_angle=90, fillet_fn=90, rotate_fn=0) {
|
||||
module fillet_polar_o(inner_r, fillet_r, fillet_angle=90, fillet_fn=0, rotate_fn=0) {
|
||||
if (fillet_r>0) {
|
||||
rotate_extrude(convexity=8, $fn=rotate_fn) {
|
||||
translate([inner_r, 0, 0]) {
|
||||
@@ -52,7 +52,7 @@ module fillet_polar_o(inner_r, fillet_r, fillet_angle=90, fillet_fn=90, rotate_f
|
||||
}
|
||||
|
||||
// 3d rotated inside fillet.
|
||||
module fillet_polar_i(inner_r, fillet_r, fillet_angle=90, fillet_fn=90, rotate_fn=0) {
|
||||
module fillet_polar_i(inner_r, fillet_r, fillet_angle=90, fillet_fn=0, rotate_fn=0) {
|
||||
if (fillet_r>0) {
|
||||
rotate_extrude(convexity=8, $fn=rotate_fn) {
|
||||
translate([inner_r, 0, 0]) {
|
||||
@@ -62,7 +62,7 @@ module fillet_polar_i(inner_r, fillet_r, fillet_angle=90, fillet_fn=90, rotate_f
|
||||
}
|
||||
|
||||
// 3d rotated inside fillet negative.
|
||||
module fillet_polar_i_n(outer_r, fillet_r, fillet_angle=90, fillet_fn=90, rotate_fn=0) {
|
||||
module fillet_polar_i_n(outer_r, fillet_r, fillet_angle=90, fillet_fn=0, rotate_fn=0) {
|
||||
if (fillet_r>0) {
|
||||
rotate_extrude(convexity=8, $fn=rotate_fn) {
|
||||
translate([outer_r, 0, 0]) {
|
||||
@@ -72,7 +72,7 @@ module fillet_polar_i_n(outer_r, fillet_r, fillet_angle=90, fillet_fn=90, rotate
|
||||
}
|
||||
|
||||
// 3d linear outside fillet.
|
||||
module fillet_linear_o(l, fillet_r, fillet_angle=90, fillet_fn=90, add=0.02) {
|
||||
module fillet_linear_o(l, fillet_r, fillet_angle=90, fillet_fn=0, add=0.02) {
|
||||
if (fillet_r>0) {
|
||||
translate([0,0,-add/2])
|
||||
linear_extrude(height=l+add, center=false) {
|
||||
@@ -82,7 +82,7 @@ translate([0,0,-add/2])
|
||||
}
|
||||
|
||||
// 3d linear inside fillet.
|
||||
module fillet_linear_i(l, fillet_r, fillet_angle=90, fillet_fn=90, add=0.02) {
|
||||
module fillet_linear_i(l, fillet_r, fillet_angle=90, fillet_fn=0, add=0.02) {
|
||||
if (fillet_r>0) {
|
||||
translate([0,0,-add/2])
|
||||
linear_extrude(height=l+add, center=false) {
|
||||
@@ -173,7 +173,7 @@ module cube_fillet_inside(size, radius=-1, vertical=[0,0,0,0], top=[0,0,0,0], bo
|
||||
}
|
||||
}
|
||||
|
||||
module cylinder_fillet_inside(h=10, r=10, top=3, bottom=3, $fn=0, fillet_fn=90, center=false) {
|
||||
module cylinder_fillet_inside(h=10, r=10, top=3, bottom=3, $fn=0, fillet_fn=0, center=false) {
|
||||
c_fn=($fn>0) ? $fn : poly_sides_r(r);
|
||||
rotfix=(($fn>0) ? 0 : 180/c_fn);
|
||||
cent=(center) ? -h/2 : 0;
|
||||
@@ -191,7 +191,7 @@ module cylinder_fillet_inside(h=10, r=10, top=3, bottom=3, $fn=0, fillet_fn=90,
|
||||
}
|
||||
}
|
||||
|
||||
module cylinder_fillet_outside(h=10, r=10, top=3, bottom=3, $fn=0, fillet_fn=90, center=false) {
|
||||
module cylinder_fillet_outside(h=10, r=10, top=3, bottom=3, $fn=0, fillet_fn=0, center=false) {
|
||||
c_fn=($fn>0) ? $fn : poly_sides_r(r);
|
||||
rotfix=(($fn>0) ? 0 : 180/c_fn);
|
||||
cent=(center) ? -h/2 : 0;
|
||||
268
mod/indent.scad
Normal file
268
mod/indent.scad
Normal file
@@ -0,0 +1,268 @@
|
||||
/*
|
||||
This file is part of SBC Case Builder https://github.com/hominoids/SBC_Case_Builder
|
||||
Copyright 2022,2023,2024 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
|
||||
NAME: indent
|
||||
DESCRIPTION: creates case IO indents
|
||||
TODO: none
|
||||
|
||||
USAGE: indent(loc_x, loc_y, loc_z, rotation, side, class, type, wallthick, gap, floorthick, pcb_z)
|
||||
|
||||
*/
|
||||
|
||||
module indent(loc_x, loc_y, loc_z, rotation, side, class, type, wallthick, gap, floorthick, pcb_z) {
|
||||
|
||||
adj = .01;
|
||||
$fn=90;
|
||||
|
||||
// hdmi indent
|
||||
if(class == "video" && type == "hdmi_a" && side == "top" && rotation == 0) {
|
||||
place(loc_x+2.375,-(wallthick+gap)+wallthick/2,loc_z+3.75,12,10,rotation,side)
|
||||
rotate([90,0,0]) long_slot(12,10,wallthick);
|
||||
}
|
||||
if(class == "video" && type == "hdmi_a" && side == "top" && rotation == 90) {
|
||||
place(-gap-wallthick/2,loc_y,loc_z+3.75,12,10,rotation,side)
|
||||
rotate([90,0,0]) long_slot(12,10,wallthick);
|
||||
}
|
||||
if(class == "video" && type == "hdmi_a" && side == "top" && rotation == 180) {
|
||||
place(loc_x,depth-(wallthick+gap)-10-wallthick/2,loc_z+3.75,12,10,rotation,side)
|
||||
rotate([90,0,0]) long_slot(12,10,wallthick);
|
||||
}
|
||||
if(class == "video" && type == "hdmi_a" && side == "top" && rotation == 270) {
|
||||
place(width-(wallthick+gap)-10-wallthick/2,loc_y+2.375,loc_z+3.75,12,10,rotation,side)
|
||||
rotate([90,0,0]) long_slot(12,10,wallthick);
|
||||
}
|
||||
if(class == "video" && type == "hdmi_a" && side == "bottom" && rotation == 0) {
|
||||
place(loc_x,-(wallthick+gap)+wallthick/2,loc_z-pcb_z-3.75,12,10,rotation,side)
|
||||
rotate([90,0,0]) long_slot(12,10,wallthick);
|
||||
}
|
||||
if(class == "video" && type == "hdmi_a" && side == "bottom" && rotation == 90) {
|
||||
place(width-(wallthick+gap)-10-wallthick/2,loc_y,loc_z-5.25,12,10,rotation,side)
|
||||
rotate([90,0,0]) long_slot(12,10,wallthick);
|
||||
}
|
||||
if(class == "video" && type == "hdmi_a" && side == "bottom" && rotation == 180) {
|
||||
place(loc_x+2.375,depth-(wallthick+gap)-10-wallthick/2,loc_z-pcb_z-3.75,12,10,rotation,side)
|
||||
rotate([90,0,0]) long_slot(12,10,wallthick);
|
||||
}
|
||||
if(class == "video" && type == "hdmi_a" && side == "bottom" && rotation == 270) {
|
||||
place(-gap-wallthick/2,loc_y+1.75,loc_z-pcb_z-3.75,12,10,rotation,side)
|
||||
rotate([90,0,0]) long_slot(12,10,wallthick);
|
||||
}
|
||||
// hdmi micro indent
|
||||
if(class == "video" && type == "hdmi_micro" && rotation == 0 && side == "top") {
|
||||
place(loc_x-.5,-(wallthick+gap)+wallthick/2,loc_z+1.5,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick);
|
||||
}
|
||||
if(class == "video" && type == "hdmi_micro" && rotation == 90 && side == "top") {
|
||||
place(-gap-wallthick/2,loc_y+1.5,loc_z+1.5,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick);
|
||||
}
|
||||
if(class == "video" && type == "hdmi_micro" && rotation == 180 && side == "top") {
|
||||
place(loc_x+1,depth-(wallthick+gap)-8-wallthick/2,loc_z+1.5,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick);
|
||||
}
|
||||
if(class == "video" && type == "hdmi_micro" && rotation == 270 && side == "top") {
|
||||
place(width-(wallthick+gap)-8-wallthick/2,loc_y-.75,loc_z+1.5,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick);
|
||||
}
|
||||
if(class == "video" && type == "hdmi_micro" && rotation == 0 && side == "bottom") {
|
||||
place(loc_x+1.5,-(wallthick+gap)+wallthick/2,loc_z-3,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick);
|
||||
}
|
||||
if(class == "video" && type == "hdmi_micro" && rotation == 90 && side == "bottom") {
|
||||
place(width-(wallthick+gap)-8-wallthick/2,loc_y+1.25,loc_z-3,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick);
|
||||
|
||||
}
|
||||
if(class == "video" && type == "hdmi_micro" && rotation == 180 && side == "bottom") {
|
||||
place(loc_x-1,depth-(wallthick+gap)-8-wallthick/2,loc_z-3,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick);
|
||||
}
|
||||
if(class == "video" && type == "hdmi_micro" && rotation == 270 && side == "bottom") {
|
||||
place(-gap-wallthick/2,loc_y-.5,loc_z-3,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick);
|
||||
}
|
||||
// hdmi mini indent
|
||||
if(class == "video" && type == "hdmi_mini" && rotation == 0 && side == "top") {
|
||||
place(loc_x+.5,loc_y-gap-wallthick/2+1,loc_z+1.5,6,10,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,10,wallthick);
|
||||
}
|
||||
if(class == "video" && type == "hdmi_mini" && rotation == 90 && side == "top") {
|
||||
place(loc_x-wallthick/2,loc_y+3.5,loc_z+1.5,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick);
|
||||
|
||||
}
|
||||
if(class == "video" && type == "hdmi_mini" && rotation == 180 && side == "top") {
|
||||
place(loc_x+4.5,loc_y-wallthick/2,loc_z+1.5,6,10,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,10,wallthick);
|
||||
}
|
||||
if(class == "video" && type == "hdmi_mini" && rotation == 270 && side == "top") {
|
||||
place(loc_x+wallthick/2,loc_y+1.5,loc_z+1.5,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick);
|
||||
}
|
||||
if(class == "video" && type == "hdmi_mini" && rotation == 0 && side == "bottom") {
|
||||
place(loc_x+4.5,loc_y-gap-wallthick/2+1,loc_z-3,6,10,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,10,wallthick);
|
||||
}
|
||||
if(class == "video" && type == "hdmi_mini" && rotation == 90 && side == "bottom") {
|
||||
place(loc_x+wallthick/2,loc_y+3.5,loc_z-3,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick);
|
||||
|
||||
}
|
||||
if(class == "video" && type == "hdmi_mini" && rotation == 180 && side == "bottom") {
|
||||
place(loc_x+.5,loc_y-wallthick/2,loc_z-3,6,10,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,10,wallthick);
|
||||
}
|
||||
if(class == "video" && type == "hdmi_mini" && rotation == 270 && side == "bottom") {
|
||||
place(loc_x-wallthick/2,loc_y+1.5,loc_z-3,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick);
|
||||
}
|
||||
// power plug indent
|
||||
if(class == "power" && type == "pwr5.5_7.5x11.5" && rotation == 0 && side == "top") {
|
||||
place(loc_x+3.75,-(wallthick+gap)+wallthick/2,loc_z+6.25,10,10,rotation,side)
|
||||
rotate([90,0,0]) cylinder(d=10, h=wallthick);
|
||||
}
|
||||
if(class == "power" && type == "pwr5.5_7.5x11.5" && rotation == 90 && side == "top") {
|
||||
place(-gap-wallthick/2,loc_y-6.25,loc_z+6.25,10,10,rotation,side)
|
||||
rotate([90,0,0]) cylinder(d=10, h=wallthick);
|
||||
}
|
||||
if(class == "power" && type == "pwr5.5_7.5x11.5" && rotation == 180 && side == "top") {
|
||||
place(loc_x-6.5,depth-10-(wallthick+gap)-wallthick/2,loc_z+6.25,10,10,rotation,side)
|
||||
rotate([90,0,0]) cylinder(d=10, h=wallthick);
|
||||
}
|
||||
if(class == "power" && type == "pwr5.5_7.5x11.5" && rotation == 270 && side == "top") {
|
||||
place(width-(wallthick+gap)-10-wallthick/2,loc_y+3.75,loc_z+6.25,10,10,rotation,side)
|
||||
rotate([90,0,0]) cylinder(d=10, h=wallthick);
|
||||
}
|
||||
if(class == "power" && type == "pwr2.5_5x7.5" && rotation == 0 && side == "top") {
|
||||
place(loc_x+2.75,-(wallthick+gap)+wallthick/2,loc_z+2.1,7,7,rotation,side)
|
||||
rotate([90,0,0]) cylinder(d=7, h=wallthick);
|
||||
}
|
||||
if(class == "power" && type == "pwr2.5_5x7.5" && rotation == 90 && side == "top") {
|
||||
place(-(wallthick+gap)+wallthick/2,loc_y-4.5,loc_z+2,7,7,rotation,side)
|
||||
rotate([90,0,0]) cylinder(d=7, h=wallthick);
|
||||
}
|
||||
if(class == "power" && type == "pwr2.5_5x7.5" && rotation == 180 && side == "top") {
|
||||
place(loc_x-4.5,depth-(wallthick+gap)-7-wallthick/2,loc_z+2,7,7,rotation,side)
|
||||
rotate([90,0,0]) cylinder(d=7, h=wallthick);
|
||||
}
|
||||
if(class == "power" && type == "pwr2.5_5x7.5" && rotation == 270 && side == "top") {
|
||||
place(width-(wallthick+gap)-7-wallthick/2,loc_y+2.5,loc_z+2,7,7,rotation,side)
|
||||
rotate([90,0,0]) cylinder(d=7, h=wallthick);
|
||||
}
|
||||
// micro usb indent
|
||||
if(class == "usb2" && type == "micro" && rotation == 0 && side == "top") {
|
||||
place(loc_x-.5,-(wallthick+gap)+wallthick/2,loc_z+1.9,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick);
|
||||
}
|
||||
if(class == "usb2" && type == "micro" && rotation == 90 && side == "top") {
|
||||
place(-gap-wallthick/2,loc_y+1.5,loc_z+1.9,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick);
|
||||
|
||||
}
|
||||
if(class == "usb2" && type == "micro" && rotation == 180 && side == "top") {
|
||||
place(loc_x+1.5,depth-(wallthick+gap)-8-wallthick/2,loc_z+1.9,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick);
|
||||
}
|
||||
if(class == "usb2" && type == "micro" && rotation == 270 && side == "top") {
|
||||
place(width-(wallthick+gap)-8-wallthick/2,loc_y-.5,loc_z+1.9,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick);
|
||||
}
|
||||
if(class == "usb2" && type == "micro" && rotation == 0 && side == "bottom") {
|
||||
place(loc_x+1.5,-(wallthick+gap)+wallthick/2,loc_z-3.25,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick);
|
||||
}
|
||||
if(class == "usb2" && type == "micro" && rotation == 90 && side == "bottom") {
|
||||
place(width-(wallthick+gap)-8-wallthick/2,loc_y+1.5,loc_z-3.25,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick);
|
||||
|
||||
}
|
||||
if(class == "usb2" && type == "micro" && rotation == 180 && side == "bottom") {
|
||||
place(loc_x-.5,depth-(wallthick+gap)-8-wallthick/2,loc_z-3.25,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick);
|
||||
}
|
||||
if(class == "usb2" && type == "micro" && rotation == 270 && side == "bottom") {
|
||||
place(-gap-wallthick/2,loc_y-.5,loc_z-3.25,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick);
|
||||
}
|
||||
// single horizontal usbc indent
|
||||
if(class == "usbc" && type == "single_horizontal" && rotation == 0 && side == "top") {
|
||||
place(loc_x+.5,-(wallthick+gap)+wallthick/2,loc_z+1.75,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick);
|
||||
}
|
||||
if(class == "usbc" && type == "single_horizontal" && rotation == 90 && side == "top") {
|
||||
place(-gap-wallthick/2,loc_y+2.5,loc_z+1.75,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick);
|
||||
}
|
||||
if(class == "usbc" && type == "single_horizontal" && rotation == 180 && side == "top") {
|
||||
place(loc_x+2.5,depth-(wallthick+gap)-8-wallthick/2,loc_z+2,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick);
|
||||
}
|
||||
if(class == "usbc" && type == "single_horizontal" && rotation == 270 && side == "top") {
|
||||
place(width-(wallthick+gap)-8-wallthick/2,loc_y+.5,loc_z+1.75,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick);
|
||||
}
|
||||
if(class == "usbc" && type == "single_horizontal" && rotation == 0 && side == "bottom") {
|
||||
place(loc_x+2.75,-(wallthick+gap)+wallthick/2,loc_z-3.25,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick);
|
||||
}
|
||||
if(class == "usbc" && type == "single_horizontal" && rotation == 90 && side == "bottom") {
|
||||
place(width-(wallthick+gap)-8-wallthick/2,loc_y+2.5,loc_z-3.25,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick-(wallthick+gap)+wallthick/2);
|
||||
}
|
||||
if(class == "usbc" && type == "single_horizontal" && rotation == 180 && side == "bottom") {
|
||||
place(loc_x+.5,depth-(wallthick+gap)-8-wallthick/2,loc_z-3.25,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick);
|
||||
}
|
||||
if(class == "usbc" && type == "single_horizontal" && rotation == 270 && side == "bottom") {
|
||||
place(-gap-wallthick/2,loc_y+.5,loc_z-3.25,6,8,rotation,side)
|
||||
rotate([90,0,0]) long_slot(6,8,wallthick);
|
||||
}
|
||||
// audio jack indent
|
||||
if(class == "audio" && type == "jack_3.5" && rotation == 0 && side == "top") {
|
||||
place(loc_x+3.15,-(wallthick+gap)+wallthick/2,loc_z+2,8,8,rotation,side)
|
||||
rotate([90,0,0]) cylinder(d=10, h=wallthick);
|
||||
}
|
||||
if(class == "audio" && type == "jack_3.5" && rotation == 90 && side == "top") {
|
||||
place(-gap-wallthick/2,loc_y-4.6,loc_z+2,8,8,rotation,side)
|
||||
rotate([90,0,0]) cylinder(d=10, h=wallthick);
|
||||
}
|
||||
if(class == "audio" && type == "jack_3.5" && rotation == 180 && side == "top") {
|
||||
place(loc_x-4.6,depth-(wallthick+gap)-8-wallthick/2,loc_z+2,8,8,rotation,side)
|
||||
rotate([90,0,0]) cylinder(d=10, h=wallthick);
|
||||
}
|
||||
if(class == "audio" && type == "jack_3.5" && rotation == 270 && side == "top") {
|
||||
place(width-(wallthick+gap)-8-wallthick/2,loc_y+3.15,loc_z+2,8,8,rotation,side)
|
||||
rotate([90,0,0]) cylinder(d=10, h=wallthick);
|
||||
}
|
||||
if(class == "audio" && type == "jack_3.5" && rotation == 0 && side == "bottom") {
|
||||
place(loc_x-4.6,-(wallthick+gap)+wallthick/2,loc_z-3.5,8,8,rotation,side)
|
||||
rotate([90,0,0]) cylinder(d=10, h=wallthick);
|
||||
}
|
||||
if(class == "audio" && type == "jack_3.5" && rotation == 90 && side == "bottom") {
|
||||
place(width-(wallthick+gap)-8-wallthick/2,loc_y-4.6,loc_z-3.5,8,8,rotation,side)
|
||||
rotate([90,0,0]) cylinder(d=10, h=wallthick);
|
||||
}
|
||||
if(class == "audio" && type == "jack_3.5" && rotation == 180 && side == "bottom") {
|
||||
place(loc_x+3.15,depth-(wallthick+gap)-8-wallthick/2,loc_z-3.5,8,8,rotation,side)
|
||||
rotate([90,0,0]) cylinder(d=10, h=wallthick);
|
||||
}
|
||||
if(class == "audio" && type == "jack_3.5" && rotation == 270 && side == "bottom") {
|
||||
place(-gap-wallthick/2,loc_y+3.15,loc_z-3.5,8,8,rotation,side)
|
||||
rotate([90,0,0]) cylinder(d=10, h=wallthick);
|
||||
}
|
||||
}
|
||||
300
mod/parametric_move.scad
Normal file
300
mod/parametric_move.scad
Normal file
@@ -0,0 +1,300 @@
|
||||
/*
|
||||
This file is part of SBC Case Builder https://github.com/hominoids/SBC_Case_Builder
|
||||
Copyright 2022,2023,2024 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
|
||||
NAME: parametric_move_add
|
||||
DESCRIPTION: places parametric additive objects
|
||||
TODO: none
|
||||
|
||||
USAGE: parametric_move_add(type, loc_x, loc_y, loc_z, face, rotation, parametric[], size[], data[], mask[])
|
||||
|
||||
type = component type
|
||||
loc_x = x location placement
|
||||
loc_y = y location placement
|
||||
loc_z = z location placement
|
||||
face = "top", "bottom", "left", "right", "front", "rear"
|
||||
rotation[] = object rotation
|
||||
parametric[] = parametric movement array
|
||||
size[] = size array x,y,z
|
||||
data[] = data filed
|
||||
mask[0] = true enables component mask
|
||||
mask[1] = mask length
|
||||
mask[2] = mask setback
|
||||
mask[3] = mstyle "default"
|
||||
|
||||
*/
|
||||
|
||||
module parametric_move_add(type, loc_x, loc_y, loc_z, face, rotation, parametric, size, data, mask) {
|
||||
|
||||
// absolute no parametrics
|
||||
if(parametric[1] == false && parametric[2] == false && parametric[3] == false) {
|
||||
add(type, loc_x, loc_y, loc_z, face, rotation, size, data, mask);
|
||||
}
|
||||
// x axis accessory parametrics
|
||||
if(parametric[1] == true && parametric[2] == false && parametric[3] == false) {
|
||||
if(parametric[0] == "case") {
|
||||
add(type, loc_x+case_offset_x, loc_y, loc_z, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc") {
|
||||
add(type, loc_x+pcb_loc_x, loc_y, loc_z, face, rotation, size, data, mask);
|
||||
}
|
||||
}
|
||||
// y axis accessory parametrics
|
||||
if(parametric[1] == false && parametric[2] == true && parametric[3] == false) {
|
||||
if(parametric[0] == "case") {
|
||||
add(type, loc_x, loc_y+case_offset_y, loc_z, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc") {
|
||||
add(type, loc_x, loc_y+pcb_loc_y, loc_z, face, rotation, size, data, mask);
|
||||
}
|
||||
}
|
||||
// z axis accessory parametrics
|
||||
if(parametric[1] == false && parametric[2] == false && parametric[3] == true) {
|
||||
if(parametric[0] == "case" && face == "top") {
|
||||
add(type, loc_x, loc_y, loc_z+case_offset_tz+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "case" && face == "bottom") {
|
||||
add(type, loc_x, loc_y, loc_z+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "case" && face != "bottom" && face != "top") {
|
||||
add(type, loc_x, loc_y, loc_z, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc") {
|
||||
add(type, loc_x, loc_y, loc_z+pcb_loc_z+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc-case_z" && face == "top") {
|
||||
add(type, loc_x, loc_y, loc_z+case_offset_tz+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc-case_z" && face == "bottom") {
|
||||
add(type, loc_x, loc_y, loc_z+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
}
|
||||
// xy axis accessory parametrics
|
||||
if(parametric[1] == true && parametric[2] == true && parametric[3] == false) {
|
||||
if(parametric[0] == "case") {
|
||||
add(type, loc_x+case_offset_x, loc_y+case_offset_y, loc_z, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc") {
|
||||
add(type, loc_x+pcb_loc_x, loc_y+pcb_loc_y, loc_z, face, rotation, size, data, mask);
|
||||
}
|
||||
}
|
||||
// xz axis accessory parametrics
|
||||
if(parametric[1] == true && parametric[2] == false && parametric[3] == true) {
|
||||
if(parametric[0] == "case" && face == "top") {
|
||||
add(type, loc_x+case_offset_x, loc_y, loc_z+case_offset_tz+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "case" && face == "bottom") {
|
||||
add(type, loc_x+case_offset_x, loc_y, loc_z+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "case" && face != "bottom" && face != "top") {
|
||||
add(type, loc_x+case_offset_x, loc_y, loc_z, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc") {
|
||||
add(type, loc_x+pcb_loc_x, loc_y, loc_z+pcb_loc_z+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc-case_z" && face == "top") {
|
||||
add(type, loc_x+pcb_loc_x, loc_y, loc_z+case_offset_tz+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc-case_z" && face == "bottom") {
|
||||
add(type, loc_x+pcb_loc_x, loc_y, loc_z+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
}
|
||||
// yz axis accessory parametrics
|
||||
if(parametric[1] == false && parametric[2] == true && parametric[3] == true) {
|
||||
if(parametric[0] == "case" && face == "top") {
|
||||
add(type, loc_x, loc_y+case_offset_y, loc_z+case_offset_tz+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "case" && face == "bottom") {
|
||||
add(type, loc_x, loc_y+case_offset_y, loc_z+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "case" && face != "bottom" && face != "top") {
|
||||
add(type, loc_x, loc_y+case_offset_y, loc_z, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc") {
|
||||
add(type, loc_x, loc_y+pcb_loc_y, loc_z+pcb_loc_z+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc-case_z" && face == "top") {
|
||||
add(type, loc_x,loc_y+pcb_loc_y, loc_z+case_offset_tz+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc-case_z" && face == "bottom") {
|
||||
add(type, loc_x, loc_y+pcb_loc_y, loc_z+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
}
|
||||
// xyz axis accessory parametrics
|
||||
if(parametric[1] == true && parametric[2] == true && parametric[3] == true) {
|
||||
if(parametric[0] == "case" && face == "top") {
|
||||
add(type, loc_x+case_offset_x, loc_y+case_offset_y, loc_z+case_offset_tz+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "case" && face == "bottom") {
|
||||
add(type, loc_x+case_offset_x, loc_y+case_offset_y, loc_z+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "case" && face != "bottom" && face != "top") {
|
||||
add(type, loc_x+case_offset_x, loc_y+case_offset_y, loc_z, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc") {
|
||||
add(type, loc_x+pcb_loc_x, loc_y+pcb_loc_y, loc_z+pcb_loc_z+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc-case_z" && face == "top") {
|
||||
add(type, loc_x+pcb_loc_x, loc_y+pcb_loc_y, loc_z+case_offset_tz+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc-case_z" && face == "bottom") {
|
||||
add(type, loc_x+pcb_loc_x, loc_y+pcb_loc_y, loc_z+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NAME: parametric_move_sub
|
||||
DESCRIPTION: places parametric subtractive objects
|
||||
TODO: none
|
||||
|
||||
USAGE: parametric_move_sub(type, loc_x, loc_y, loc_z, face, rotation, parametric[], size[], data[], mask[])
|
||||
|
||||
type = component type
|
||||
loc_x = x location placement
|
||||
loc_y = y location placement
|
||||
loc_z = z location placement
|
||||
face = "top", "bottom", "left", "right", "front", "rear"
|
||||
rotation[] = object rotation
|
||||
parametric[] = parametric movement array
|
||||
size[] = size array x,y,z
|
||||
mask[0] = true enables component mask
|
||||
mask[1] = mask length
|
||||
mask[2] = mask setback
|
||||
mask[3] = mstyle "default"
|
||||
|
||||
*/
|
||||
|
||||
module parametric_move_sub(type, loc_x, loc_y, loc_z, face, rotation, parametric, size, data, mask) {
|
||||
|
||||
// absolute no parametrics
|
||||
if(parametric[1] == false && parametric[2] == false && parametric[3] == false) {
|
||||
sub(type, loc_x, loc_y, loc_z, face, rotation, size, data, mask);
|
||||
}
|
||||
// x axis accessory parametrics
|
||||
if(parametric[1] == true && parametric[2] == false && parametric[3] == false) {
|
||||
if(parametric[0] == "case") {
|
||||
sub(type, loc_x+case_offset_x, loc_y, loc_z, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc") {
|
||||
sub(type, loc_x+pcb_loc_x, loc_y, loc_z, face, rotation, size, data, mask);
|
||||
}
|
||||
}
|
||||
// y axis accessory parametrics
|
||||
if(parametric[1] == false && parametric[2] == true && parametric[3] == false) {
|
||||
if(parametric[0] == "case") {
|
||||
sub(type, loc_x, loc_y+case_offset_y, loc_z, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc") {
|
||||
sub(type, loc_x, loc_y+pcb_loc_y, loc_z, face, rotation, size, data, mask);
|
||||
}
|
||||
}
|
||||
// z axis accessory parametrics
|
||||
if(parametric[1] == false && parametric[2] == false && parametric[3] == true) {
|
||||
if(parametric[0] == "case" && face == "top") {
|
||||
sub(type, loc_x, loc_y, loc_z+case_offset_tz+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "case" && face == "bottom") {
|
||||
sub(type, loc_x, loc_y, loc_z+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "case" && face != "bottom" && face != "top") {
|
||||
sub(type, loc_x, loc_y, loc_z, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc") {
|
||||
sub(type, loc_x, loc_y, loc_z+pcb_loc_z, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc-case_z" && face == "top") {
|
||||
sub(type, loc_x, loc_y, loc_z+case_offset_tz+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc-case_z" && face == "bottom") {
|
||||
sub(type, loc_x, loc_y, loc_z+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
}
|
||||
// xy axis accessory parametrics
|
||||
if(parametric[1] == true && parametric[2] == true && parametric[3] == false) {
|
||||
if(parametric[0] == "case") {
|
||||
sub(type, loc_x+case_offset_x, loc_y+case_offset_y, loc_z, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc") {
|
||||
sub(type, loc_x+pcb_loc_x, loc_y+pcb_loc_y,loc_z, face, rotation, size, data, mask);
|
||||
}
|
||||
}
|
||||
// xz axis accessory parametrics
|
||||
if(parametric[1] == true && parametric[2] == false && parametric[3] == true) {
|
||||
if(parametric[0] == "case" && face == "top") {
|
||||
sub(type, loc_x+case_offset_x, loc_y, loc_z+case_offset_tz+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "case" && face == "bottom") {
|
||||
sub(type, loc_x+case_offset_x, loc_y, loc_z+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "case" && face != "bottom" && face != "top") {
|
||||
sub(type, loc_x+case_offset_x, loc_y, loc_z, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc") {
|
||||
sub(type, loc_x+pcb_loc_x, loc_y, loc_z+pcb_loc_z, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc-case_z" && face == "top") {
|
||||
sub(type, loc_x+pcb_loc_x, loc_y, loc_z+case_offset_tz+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc-case_z" && face == "bottom") {
|
||||
sub(type, loc_x+pcb_loc_x, loc_y, loc_z+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
}
|
||||
// yz axis accessory parametrics
|
||||
if(parametric[1] == false && parametric[2] == true && parametric[3] == true) {
|
||||
if(parametric[0] == "case" && face == "top") {
|
||||
sub(type, loc_x, loc_y+case_offset_y, loc_z+case_offset_tz+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "case" && face == "bottom") {
|
||||
sub(type, loc_x, loc_y+case_offset_y, loc_z+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "case" && face != "bottom" && face != "top") {
|
||||
sub(type, loc_x, loc_y+case_offset_y, loc_z, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc") {
|
||||
sub(type, loc_x, loc_y+pcb_loc_y, loc_z+pcb_loc_z, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc-case_z" && face == "top") {
|
||||
sub(type, loc_x, loc_y+pcb_loc_y, loc_z+case_offset_tz+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc-case_z" && face == "bottom") {
|
||||
sub(type, loc_x, loc_y+pcb_loc_y, loc_z+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
}
|
||||
// xyz axis accessory parametrics
|
||||
if(parametric[1] == true && parametric[2] == true && parametric[3] == true) {
|
||||
if(parametric[0] == "case" && face == "top") {
|
||||
sub(type, loc_x+case_offset_x, loc_y+case_offset_y, loc_z+case_offset_tz+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "case" && face == "bottom") {
|
||||
sub(type, loc_x+case_offset_x, loc_y+case_offset_y, loc_z+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "case" && face != "bottom" && face != "top") {
|
||||
sub(type, loc_x+case_offset_x, loc_y+case_offset_y, loc_z, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc") {
|
||||
sub(type, loc_x+pcb_loc_x, loc_y+pcb_loc_y, loc_z+pcb_loc_z, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc-case_z" && face == "top") {
|
||||
sub(type, loc_x+pcb_loc_x, loc_y+pcb_loc_y, loc_z+case_offset_tz+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
if(parametric[0] == "sbc-case_z" && face == "bottom") {
|
||||
sub(type, loc_x+pcb_loc_x, loc_y+pcb_loc_y, loc_z+case_offset_bz, face, rotation, size, data, mask);
|
||||
}
|
||||
}
|
||||
}
|
||||
66
mod/place.scad
Normal file
66
mod/place.scad
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
This file is part of SBC Case Builder https://github.com/hominoids/SBC_Case_Builder
|
||||
Copyright 2022,2023,2024 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
|
||||
NAME: place
|
||||
DESCRIPTION: transformation to place objects on either side of a geometric plane of a given thickness
|
||||
TODO: none
|
||||
|
||||
USAGE: place(x, y, z, size_x, size_y, rotation, side)
|
||||
|
||||
*/
|
||||
|
||||
/* placement module *must be first* for children() */
|
||||
module place(x, y, z, size_x, size_y, rotation, side) {
|
||||
|
||||
if (side == "top") {
|
||||
if (rotation == 0 || rotation == 90 || rotation == 180 || rotation == 270) {
|
||||
if ((rotation >= 0 && rotation < 90) || (rotation < -270 && rotation > -360))
|
||||
translate([x,y,z]) rotate([0,0,-rotation]) children();
|
||||
|
||||
if ((rotation >= 90 && rotation < 180) || (rotation < -180 && rotation >= -270))
|
||||
translate([x,y+size_x,z]) rotate([0,0,-rotation]) children();
|
||||
|
||||
if ((rotation >= 180 && rotation < 270) || (rotation < -90 && rotation >= -180))
|
||||
translate([x+size_x,y+size_y,z]) rotate([0,0,-rotation]) children(0);
|
||||
|
||||
if ((rotation >= 270 && rotation < 360) || (rotation < 0 && rotation >= -90))
|
||||
translate([x+size_y,y,z]) rotate([0,0,-rotation]) children(); }
|
||||
else {
|
||||
translate([x,y,z]) rotate([0,0,-rotation]) children();
|
||||
}
|
||||
}
|
||||
if (side == "bottom") {
|
||||
if (rotation == 0 || rotation == 90 || rotation == 180 || rotation == 270) {
|
||||
if ((rotation >= 0 && rotation < 90) || (rotation < -270 && rotation > -360))
|
||||
translate([x+size_x,y,z]) rotate([0,180,rotation]) children();
|
||||
|
||||
if ((rotation >= 90 && rotation < 180) || (rotation < -180 && rotation >= -270))
|
||||
translate([x+size_y,y+size_x,z]) rotate([0,180,rotation]) children();
|
||||
|
||||
if ((rotation >= 180 && rotation < 270) || (rotation < -90 && rotation >= -180))
|
||||
translate([x,y+size_y,z]) rotate([0,180,rotation]) children();
|
||||
|
||||
if ((rotation >= 270 && rotation < 360) || (rotation < 0 && rotation >= -90))
|
||||
translate([x,y,z]) rotate([0,180,rotation]) children(); }
|
||||
else {
|
||||
translate([x,y,z]) rotate([0,180,rotation]) children();
|
||||
|
||||
}
|
||||
}
|
||||
children([1:1:$children-1]);
|
||||
}
|
||||
84
mod/sub.scad
Normal file
84
mod/sub.scad
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
This file is part of SBC Case Builder https://github.com/hominoids/SBC_Case_Builder
|
||||
Copyright 2022,2023,2024 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
|
||||
NAME: sub
|
||||
DESCRIPTION: places subtractive objects
|
||||
TODO: none
|
||||
|
||||
USAGE: sub(type, loc_x, loc_y, loc_z, face, rotation, size[], data[], mask[])
|
||||
|
||||
type = component type
|
||||
loc_x = x location placement
|
||||
loc_y = y location placement
|
||||
loc_z = z location placement
|
||||
face = "top", "bottom", "left", "right", "front", "rear"
|
||||
rotation[] = object rotation
|
||||
parametric[] = parametric movement array
|
||||
size[] = size array x,y,z
|
||||
data[] = data variable on type
|
||||
mask[0] = true enables component mask
|
||||
mask[1] = mask length
|
||||
mask[2] = mask setback
|
||||
mask[3] = mstyle "default"
|
||||
|
||||
*/
|
||||
|
||||
module sub(type, loc_x, loc_y, loc_z, face, rotation, size, data, mask) {
|
||||
|
||||
size_x = size[0];
|
||||
size_y = size[1];
|
||||
size_z = size[2];
|
||||
enablemask = mask[0];
|
||||
mlen = mask[1];
|
||||
msetback = mask[2];
|
||||
mstyle = mask[3];
|
||||
|
||||
if(type == "art") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) art(data[0],data[1],data[2]);
|
||||
}
|
||||
if(type == "fan_mask") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) fan_mask(size_x, size_z, data[0]);
|
||||
}
|
||||
if(type == "hd_holes") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hd_bottom_holes(data[0],data[1],data[2],data[3]);
|
||||
}
|
||||
if(type == "knockout") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) knockout(size_x,size_y,data[0],size_z,data[1],data[2]);
|
||||
}
|
||||
if(type == "rectangle") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) slab_r([size_x,size_y,size_z],data[0]);
|
||||
}
|
||||
if(type == "round") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) cylinder(d=size_x,h=size_z);
|
||||
}
|
||||
if(type == "slot") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) slot(size_x,size_y,size_z);
|
||||
}
|
||||
if(type == "sphere") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) sphere(d=size_x);
|
||||
}
|
||||
if(type == "text") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) linear_extrude(height = size_z) text(data_2, size=data[0]);
|
||||
}
|
||||
if(type == "vent") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) vent(size_x,size_y,size_z,data[3],data[0],data[1],data[2]);
|
||||
}
|
||||
if(type == "vent_hex") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) vent_hex(size_x,size_y,size_z,data[0],data[1],data[2]);
|
||||
}
|
||||
}
|
||||
1714
sbc_case_builder.cfg
1714
sbc_case_builder.cfg
File diff suppressed because it is too large
Load Diff
6509
sbc_case_builder.json
Normal file
6509
sbc_case_builder.json
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
436
sbc_case_builder_accessories.cfg
Normal file
436
sbc_case_builder_accessories.cfg
Normal file
@@ -0,0 +1,436 @@
|
||||
/*
|
||||
SBC Case Builder Copyright 2022,2023,2024 Edward A. Kisiel hominoid@cablemi.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
Code released under GPLv3: http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
SBC Case Builder accessory configuration file
|
||||
|
||||
see https://github.com/hominoids/SBC_Case_Builder
|
||||
*/
|
||||
|
||||
/* Instructions: All measurements from lower left corner of PCB to lower left
|
||||
corner of component or opening, holes measured to center. All measurements in mm.
|
||||
|
||||
schema:
|
||||
"accessory_name",
|
||||
"class","type",loc_x,loc_y,loc_z,face,rotation[x,y,z],parametric[association,x,y,z],[size_x,size_y,size_z],[data],mask[enablemask,mlength,msetback,mstyle]
|
||||
|
||||
|
||||
classes: add1, sub, suball, add2, model, platter
|
||||
|
||||
types for additive: access_cover,access_panel,art,batt_holder,button,button_assembly,fan_cover,feet,hd_holder,
|
||||
hk_boom_grill,hk_boom_speaker_holder,hk_boom_vring,hk_h3_port_extender_holder,hk_hc4_oled_holder,hk_uart_holder,
|
||||
hk_uart_strap,keyhole,nut_holder,pcb_holder,rectangle,round,slot,sphere,standoff,text,vent_panel_hex
|
||||
types for subtractive: art,fan_mask,hd_holes,knockout,rectangle,round,slot,sphere,text,vent,vent_hex
|
||||
types for model: adafruit_lcd,dsub,fan,hd25,hd35,hk_boom,hk_boom_speaker,hk_h3_port_extender,hk_hc4_oled,hk_lcd35,hk_m1s_ups,hk_netcard,
|
||||
hk_pwr_button,hk_speaker,hk_uart,hk_vu7c,hk_vu8m,hk_vu8s,hk_wb2,hk_xu4_shifter_shield,stl_model
|
||||
types for platter: access_cover,button_assembly,fan_cover,feet,hk_boom_speaker_holder,hk_boom_vring,hk_h3_port_extender_holder,hk_uart_strap,vent_panel_hex
|
||||
|
||||
stand_off[radius, height, holesize, 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
|
||||
|
||||
p
|
||||
a
|
||||
r
|
||||
r a s
|
||||
o m e
|
||||
t e s s s l t m
|
||||
c l l l a t i i i e s
|
||||
l t o o o f t r z z z d m n b t
|
||||
a y c c c a i i e e e a a g a y
|
||||
s p c o c t s t c l
|
||||
s, e, x, y, z, e, n, s, x,y,z, a, k h k e
|
||||
|
||||
"sub","fan_mask",10,10,24.5,"top",[0,0,0],["sbc-case_z",true,true,true],[40,0,6],[0],[true,10,2,"default"],
|
||||
|
||||
*/
|
||||
|
||||
accessory_data = [
|
||||
["none"],
|
||||
|
||||
// hk uart group
|
||||
["hk_uart",
|
||||
"add2","hk_uart_holder",-25,0,1.9,"bottom",[0,0,0],["sbc",true,false,false],[10,10,0],[0],[true,10,2,"default"],
|
||||
"suball","slot",-18.25,0,8.25,"top",[90,0,0],["sbc",true,false,false],[4,4,15],[0],[false,10,2,"default"],
|
||||
"model","hk_uart",-22.5,23,5,"bottom",[0,0,-90],["sbc",true,false,false],[10,10,0],[0],[false,10,2,"default"],
|
||||
"model","hk_uart_strap",-25,0,2,"bottom",[0,0,0],["sbc",true,false,false],[0,0,0],[0],[false,10,2,"default"],
|
||||
"platter","hk_uart_strap",-35,75,-9,"bottom",[0,0,0],["case",false,false,false],[0,0,0],[0],[false,10,2,"default"]],
|
||||
|
||||
// Odroid-C4
|
||||
["c4_shell_boombox",
|
||||
"add2","pcb_holder",.75,51.1,1.99,"bottom",[0,0,0],["case",false,true,false],[123.5,35,1.6],[2],[false,10,2,"default"],
|
||||
"add2","hk_boom_grill",16.5,60.5,22.5,"top",[90,0,180],["case",false,true,false],[0,0,0],["dome"],[false,10,2,"default"],
|
||||
"add2","hk_boom_grill",108,60.5,22.5,"top",[90,0,180],["case",false,true,false],[0,0,0],["dome"],[false,10,2,"default"],
|
||||
"sub","vent",44,60,17,"top",[0,0,0],["case",false,true,false],[2,10,4],[1,10,"vertical",1],[false,10,2,"default"],
|
||||
|
||||
"add2","hk_uart_holder",10,-1.5,5,"bottom",[0,0,0],["case",false,false,false],[10,10,0],[0],[true,10,2,"default"],
|
||||
"model","hk_uart",12.5,20.5,8,"bottom",[0,0,270],["case",false,false,false],[10,10,0],[0],[false,10,2,"default"],
|
||||
"model","hk_uart_strap",25.5,15,8,"bottom",[0,0,90],["case",false,false,false],[0,0,0],[0],[false,10,2,"default"],
|
||||
"model","hk_boom",32.25,53,5,"bottom",[90,0,0],["case",false,true,false],[0,0,0],[true,"front"],[true,10,2,"default"],
|
||||
"model","hk_boom_vring",76.75,49.5,31,"bottom",[90,0,0],["case",false,true,false],[0,0,0],[0],[false,10,2,"default"],
|
||||
"platter","hk_uart_strap",-35,75,-9,"bottom",[0,0,0],["case",false,false,false],[0,0,0],[0],[false,10,2,"default"],
|
||||
"platter","hk_boom_vring",-60,100,0,"bottom",[0,0,0],["case",false,false,false],[0,0,0],[0],[false,10,2,"default"]],
|
||||
|
||||
["c4_desktop_lcd3.5",
|
||||
"add2","button",89.875,45,27,"top",[0,0,180],["sbc-case_z",false,false,true],[12,8,2],["cutout",[2,2,2,2],2.25],[true,10,2,"default"],
|
||||
"add2","button",89.875,34,27,"top",[0,0,180],["sbc-case_z",false,false,true],[12,8,2],["cutout",[2,2,2,2],2.25],[true,10,2,"default"],
|
||||
"add2","button",89.875,23,27,"top",[0,0,180],["sbc-case_z",false,false,true],[12,8,2],["cutout",[2,2,2,2],2.25],[true,10,2,"default"],
|
||||
"add2","button",89.875,12,27,"top",[0,0,180],["sbc-case_z",false,false,true],[12,8,2],["cutout",[2,2,2,2],2.25],[true,10,2,"default"],
|
||||
"add1","rectangle",-3.5,11.25,-31,"left",[30,0,0],["case",false,false,false],[2,58.15,33.5],[[.1,.1,.1,.1]],[false,10,2,"default"],
|
||||
"sub","round",-3.75,46,-34,"left",[0,90,0],["case",false,false,false],[60,0,3],[0],[false,10,2,"default"],
|
||||
"add1","rectangle",116.5,11.25,-31,"right",[30,0,0],["case",false,false,false],[2,58.15,33.5],[[.1,.1,.1,.1]],[false,10,2,"default"],
|
||||
"sub","round",116.4,46,-34,"right",[0,90,0],["case",false,false,false],[60,0,3],[0],[false,10,2,"default"],
|
||||
"sub","vent",-3,13,10,"left",[0,0,90],["case",false,false,false],[2,10,5],[1,8,"vertical",1],[false,10,2,"default"],
|
||||
"model","hk_lcd35",95,56,20,"bottom",[0,0,180],["case",false,false,false],[0,0,0],[0],[true,10,2,"default"]],
|
||||
|
||||
["c4_deskboom_lcd3.5",
|
||||
"add1","rectangle",126.5,14.75,-37.5,"right",[30,0,0],["case",false,false,false],[2,71.15,41],[[.1,.1,.1,.1]],[false,10,2,"default"],
|
||||
"add1","rectangle",-3.5,14.75,-37.5,"left",[30,0,0],["case",false,false,false],[2,71.15,41],[[.1,.1,.1,.1]],[false,10,2,"default"],
|
||||
"sub","round",-3.75,54,-32,"left",[0,90,0],["case",false,false,false],[60,0,3],[0],[false,10,2,"default"],
|
||||
"sub","round",126.4,54,-32,"right",[0,90,0],["case",false,false,false],[60,0,3],[0],[false,10,2,"default"],
|
||||
"sub","vent",-3,22,13,"left",[0,0,90],["case",false,false,false],[2,10,5],[1,8,"vertical",1],[false,10,2,"default"],
|
||||
"add2","button",89.875,45,27,"top",[0,0,180],["sbc-case_z",false,false,true],[12,8,2],["cutout",[2,2,2,2],2.25],[true,10,2,"default"],
|
||||
"add2","button",89.875,34,27,"top",[0,0,180],["sbc-case_z",false,false,true],[12,8,2],["cutout",[2,2,2,2],2.25],[true,10,2,"default"],
|
||||
"add2","button",89.875,23,27,"top",[0,0,180],["sbc-case_z",false,false,true],[12,8,2],["cutout",[2,2,2,2],2.25],[true,10,2,"default"],
|
||||
"add2","button",89.875,12,27,"top",[0,0,180],["sbc-case_z",false,false,true],[12,8,2],["cutout",[2,2,2,2],2.25],[true,10,2,"default"],
|
||||
"add2","pcb_holder",.75,66.1,1.99,"bottom",[0,0,0],["case",false,false,false],[123.5,35,1.6],[2],[false,10,2,"default"],
|
||||
"add2","hk_boom_grill",16.5,72.5,21.5,"front",[90,0,180],["case",false,false,false],[0,0,2],["flat"],[false,10,2,"default"],
|
||||
"add2","hk_boom_grill",108,72.5,21.5,"front",[90,0,180],["case",false,false,false],[0,0,2],["flat"],[false,10,2,"default"],
|
||||
"add2","hk_uart_holder",10,0,1.9,"bottom",[0,0,0],["case",false,false,false],[10,10,0],[0],[true,10,2,"default"],
|
||||
"model","hk_uart",12.5,22,5,"bottom",[0,0,270],["case",false,false,false],[10,10,0],[0],[false,10,2,"default"],
|
||||
"model","hk_uart_strap",25,15,5,"bottom",[0,0,90],["case",false,false,false],[0,0,0],[0],[false,10,2,"default"],
|
||||
// "model","hk_boom",32.25,68,4,"bottom",[90,0,0],["case",false,false,false],[0,0,0],[true,"front"],[true,10,2,"default"],
|
||||
"model","hk_boom_vring",76.75,64.5,31,"bottom",[90,0,0],["case",false,false,false],[0,0,0],[0],[false,10,2,"default"],
|
||||
"model","hk_lcd35",106.25,55,22.5,"bottom",[0,0,180],["sbc",false,false,true],[0,0,0],[0],[true,10,2,"default"],
|
||||
"platter","hk_uart_strap",-35,75,-9,"bottom",[0,0,0],["case",false,false,false],[0,0,0],[0],[false,10,2,"default"],
|
||||
"platter","hk_boom_vring",-60,100,0,"bottom",[0,0,0],["case",false,false,false],[0,0,0],[0],[false,10,2,"default"]],
|
||||
|
||||
["c4_panel_boombox",
|
||||
"sub","vent",-3,22,13,"left",[0,0,90],["case",false,false,false],[2,10,5],[1,8,"vertical",1],[false,10,2,"default"],
|
||||
"add2","pcb_holder",.75,51.1,1.99,"bottom",[0,0,0],["case",false,true,false],[123.5,35,1.6],[2],[false,10,2,"default"],
|
||||
"add2","hk_uart_holder",10,0,1.9,"bottom",[0,0,0],["case",false,false,false],[10,10,0],[0],[true,10,2,"default"],
|
||||
"model","hk_uart",12.5,22,5,"bottom",[0,0,270],["case",false,false,false],[10,10,0],[0],[false,10,2,"default"],
|
||||
"model","hk_uart_strap",25,15,5,"bottom",[0,0,90],["case",false,false,false],[0,0,0],[0],[false,10,2,"default"],
|
||||
"add2","hk_boom_grill",16.5,57.5,21.5,"front",[90,0,180],["case",false,true,false],[0,0,2],["flat"],[false,10,2,"default"],
|
||||
"add2","hk_boom_grill",108,57.5,21.5,"front",[90,0,180],["case",false,true,false],[0,0,2],["flat"],[false,10,2,"default"],
|
||||
"model","hk_boom",32.25,53,4,"bottom",[90,0,0],["case",false,true,false],[0,0,0],[true,"front"],[true,10,2,"default"],
|
||||
"model","hk_boom_vring",76.75,49.5,31,"bottom",[90,0,0],["case",false,true,false],[0,0,0],[0],[false,10,2,"default"],
|
||||
"platter","hk_uart_strap",-35,75,-9,"bottom",[0,0,0],["case",false,false,false],[0,0,0],[0],[false,10,2,"default"],
|
||||
"platter","hk_boom_vring",-60,100,0,"bottom",[0,0,0],["case",false,false,false],[0,0,0],[0],[false,10,2,"default"]],
|
||||
|
||||
["c4_panel_lcd3.5",
|
||||
"add2","button",89.875,45,27,"top",[0,0,180],["sbc-case_z",false,false,true],[12,8,2],["cutout",[2,2,2,2],2.25],[true,10,2,"default"],
|
||||
"add2","button",89.875,34,27,"top",[0,0,180],["sbc-case_z",false,false,true],[12,8,2],["cutout",[2,2,2,2],2.25],[true,10,2,"default"],
|
||||
"add2","button",89.875,23,27,"top",[0,0,180],["sbc-case_z",false,false,true],[12,8,2],["cutout",[2,2,2,2],2.25],[true,10,2,"default"],
|
||||
"add2","button",89.875,12,27,"top",[0,0,180],["sbc-case_z",false,false,true],[12,8,2],["cutout",[2,2,2,2],2.25],[true,10,2,"default"],
|
||||
"sub","vent",-3,13,10,"left",[0,0,90],["case",false,false,false],[2,10,5],[1,8,"vertical",1],[false,10,2,"default"],
|
||||
"model","hk_lcd35",95,56,20,"top",[0,0,180],["case",false,false,false],[0,0,0],[0],[true,10,2,"default"]],
|
||||
|
||||
["c4_tray_boombox",
|
||||
"sub","vent",44,59,12,"bottom",[0,0,0],["case",false,true,false],[2,10,4],[1,10,"vertical",1],[false,10,2,"default"],
|
||||
"add2","standoff",28.5,3.5,0,"bottom",[0,0,0],["case",false,false,false],[0,0,0],[["custom",5.75,13,3.6,10,4,"countersunk","hex",false,false,4.5,5.1]],[true,10,2,"default"],
|
||||
"add2","standoff",28.5,56.25,0,"bottom",[0,0,0],["case",false,false,false],[0,0,0],[["custom",5.75,13,3.6,10,4,"countersunk","hex",false,false,4.5,5.1]],[true,10,2,"default"],
|
||||
"add2","hk_boom_speaker_holder",16.75,54.6,17.5,"bottom",[90,0,180],["case",false,true,false],[0,0,0],["friction",0],[false,10,2,"default"],
|
||||
"add2","hk_boom_speaker_holder",108.25,54.6,17.5,"bottom",[90,0,180],["case",false,true,false],[0,0,0],["friction",0],[false,10,2,"default"],
|
||||
"add2","hk_boom_grill",16.75,59,17.5,"bottom",[90,0,180],["case",false,true,false],[0,0,0],["dome"],[false,10,2,"default"],
|
||||
"add2","hk_boom_grill",108.25,59,17.5,"bottom",[90,0,180],["case",false,true,false],[0,0,0],["dome"],[false,10,2,"default"],
|
||||
"model","hk_boom_speaker",16.75,56,17.5,"bottom",[270,0,0],["case",false,true,false],[0,0,0],[false,"left"],[true,10,2,"default"],
|
||||
"model","hk_boom_speaker",108.25,56,17.5,"bottom",[270,0,0],["case",false,true,false],[0,0,0],[false,"right"],[true,10,2,"default"],
|
||||
"model","hk_boom",32,0,13,"bottom",[0,0,90],["case",false,false,false],[0,0,0],[false,"none"],[true,10,2,"pcb"],
|
||||
"model","hk_boom_vring",5,44.5,16.5,"bottom",[0,0,0],["case",false,false,false],[0,0,0],[0],[false,10,2,"default"],
|
||||
"platter","hk_boom_vring",-50,0,0,"bottom",[0,0,0],["case",false,false,false],[0,0,0],[0],[false,10,2,"default"]],
|
||||
|
||||
["c4_round",
|
||||
"suball","round",10.5,-2,14.5,"top",[90,0,0],["case",false,false,false],[11,0,18],[0],[false,10,2,"default"],
|
||||
"suball","rectangle",35,-28,4,"top",[0,0,0],["case",false,false,false],[21,12,15.5],[[1,1,1,1]],[false,10,2,"default"]],
|
||||
|
||||
["c4_hex",
|
||||
"suball","round",10.5,-2,14.5,"top",[90,0,0],["case",false,false,false],[11,0,18],[0],[false,10,2,"default"],
|
||||
"suball","rectangle",35,-26,4,"top",[0,0,0],["case",false,false,false],[21,10,15.5],[[1,1,1,1]],[false,10,2,"default"]],
|
||||
|
||||
// Odroid-XU4
|
||||
["xu4_keyhole",
|
||||
"add1","keyhole",40,30,0,"bottom",[0,0,0],["case",false,false,false],[0,0,0],[[7,3.2,6,2]],[true,10,2,"default"]],
|
||||
|
||||
// Odroid-HC4
|
||||
["hc4_shell_drivebox2.5",
|
||||
"add2","hk_hc4_oled_holder",20,82,1.99,"bottom",[0,0,0],["case",false,true,false],[0,0,2],[0],[true,10,2,"default"],
|
||||
"model","hk_hc4_oled",20,82,1.99,"bottom",[0,0,0],["case",false,true,false],[0,0,0],[0],[false,10,2,"default"],
|
||||
"model","fan",24.25,35,3,"bottom",[0,0,0],["sbc",true,true,false],[40,0,3],["box40x10"],[false,10,2,"default"],
|
||||
"sub","vent",71.85,88,30,"top",[0,0,0],["case",false,true,false],[2,13,4],[1,4,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",-3.5,35,34,"top",[0,0,90],["case",false,false,false],[2,10,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",92,35,34,"top",[0,0,90],["case",true,false,false],[2,10,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",-3.5,35,9,"bottom",[0,0,90],["case",false,false,false],[2,10,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",92,35,9,"bottom",[0,0,90],["case",true,false,false],[2,10,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"add2","hd_holder",12,-21,1.99,"bottom",[0,0,0],["case",true,true,false],[0,0,0],[2.5,"portrait"],[false,10,2,"default"],
|
||||
"model","hd25",12,-21,2,"bottom",[0,0,0],["case",true,true,false],[0,0,0],["portrait",15],[true,20,2,"both"],
|
||||
"model","hd25",12,-21,20,"bottom",[0,0,0],["case",true,true,false],[0,0,0],["portrait",15],[true,20,2,"default"],
|
||||
"model","fan",39,10,7.5,"bottom",[90,0,0],["case",true,false,false],[40,0,3],["box40x10"],[true,10,2,"fan_open"],
|
||||
"model","fan_cover",39,-4,7.5,"top",[90,0,0],["case",true,false,false],[40,0,3],["fan_1"],[false,10,2,"default"],
|
||||
"platter","fan_cover",-50,50,0,"bottom",[0,0,0],["case",false,false,false],[40,0,3],["fan_1"],[false,10,2,"default"]],
|
||||
|
||||
["hc4_shell_drivebox2.5v",
|
||||
"add2","hd_holder",47,-21,1.99,"bottom",[0,0,0],["case",true,true,false],[0,0,0],[2.5,"portrait","vertical","right"],[false,10,2,"default"],
|
||||
"add2","hd_holder",81,-21,1.99,"bottom",[0,0,0],["case",true,true,false],[0,0,0],[2.5,"portrait","vertical","left",3],[false,10,2,"default"],
|
||||
"model","hd25",47,-21,71.85,"bottom",[0,90,0],["case",true,true,false],[0,0,0],["portrait",15],[true,10,2,"default"],
|
||||
"model","hd25",81,-21,2,"bottom",[0,270,0],["case",true,true,false],[0,0,0],["portrait",15],[true,18,2,"both"],
|
||||
"model","fan",24.25,35,3,"bottom",[0,0,0],["sbc",true,true,false],[40,0,3],["box40x10"],[false,10,2,"default"],
|
||||
"sub","vent",72,88,30,"top",[0,0,0],["case",false,true,false],[2,13,4],[1,4,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",-3.5,35,34,"top",[0,0,90],["case",false,false,false],[2,10,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",92,35,34,"top",[0,0,90],["case",true,false,false],[2,10,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",-3.5,35,9,"bottom",[0,0,90],["case",false,false,false],[2,10,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",92,35,9,"bottom",[0,0,90],["case",true,false,false],[2,10,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"add1","hk_hc4_oled_holder",20,82,1.99,"bottom",[0,0,0],["case",false,true,false],[0,0,2],[0],[true,10,2,"default"],
|
||||
"model","hk_hc4_oled",20,82,1.99,"bottom",[0,0,0],["case",false,true,false],[0,0,0],[0],[false,10,2,"default"],
|
||||
"model","fan",40,10,30,"top",[90,0,0],["case",true,false,false],[40,0,3],["box40x10"],[true,10,2,"fan_open"],
|
||||
"model","fan_cover",40,-3,30,"top",[90,0,0],["case",true,false,false],[40,0,3],["fan_1"],[false,10,2,"default"],
|
||||
"platter","fan_cover",-50,50,0,"bottom",[0,0,0],["case",false,false,false],[40,0,3],["fan_1"],[false,10,2,"default"]],
|
||||
|
||||
["hc4_shell_drivebox3.5",
|
||||
"add1","hk_hc4_oled_holder",20,82,3,"bottom",[0,0,0],["case",false,true,false],[0,0,3],[0],[true,10,2,"default"],
|
||||
"model","hk_hc4_oled",20,82,1.99,"bottom",[0,0,0],["case",false,true,false],[0,0,0],[0],[false,10,2,"default"],
|
||||
"suball","vent",72,88,29,"bottom",[0,0,0],["case",false,true,false],[2,13,4],[1,4,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",-4.5,35,34,"top",[0,0,90],["case",false,false,false],[2,10,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",92,35,34,"top",[0,0,90],["case",true,false,false],[2,10,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",-4.5,35,9,"bottom",[0,0,90],["case",false,false,false],[2,10,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",92,35,9,"bottom",[0,0,90],["case",true,false,false],[2,10,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"model","fan",24.25,35,3,"bottom",[0,0,0],["sbc",true,true,false],[40,0,3],["box40x10"],[false,10,2,"default"],
|
||||
"add2","hd_holder",-21,-67,3,"bottom",[0,0,0],["case",true,true,false],[0,0,0],[3.5,"portrait"],[false,10,2,"default"],
|
||||
"model","hd35",-21,-67,3,"bottom",[0,0,0],["case",true,true,false],[0,0,0],["portrait"],[true,20,2,"both"],
|
||||
"model","hd35",-21,-67,35,"bottom",[0,0,0],["case",true,true,false],[0,0,0],["portrait"],[true,20,2,"default"],
|
||||
"model","fan_cover",5.5,-4,7,"top",[90,0,0],["case",true,false,false],[40,0,3],["fan_1"],[false,10,2,"default"],
|
||||
"model","fan",5.25,10,7.5,"bottom",[90,0,0],["case",true,false,false],[40,0,3],["box40x10"],[true,10,2,"fan_open"],
|
||||
"platter","fan_cover",-50,50,0,"bottom",[0,0,0],["case",false,false,false],[40,0,3],["fan_1"],[false,10,2,"default"]],
|
||||
|
||||
["hc4_tray_drivebox2.5",
|
||||
"add2","hk_hc4_oled_holder",20,82,1.99,"bottom",[0,0,0],["case",false,true,false],[0,0,2],[0],[true,10,2,"default"],
|
||||
"model","hk_hc4_oled",20,82,2,"bottom",[0,0,0],["case",false,true,false],[0,0,0],[0],[false,10,2,"default"],
|
||||
"suball","vent",72,87,27,"bottom",[0,0,0],["case",false,true,false],[2,13,4],[1,4,"vertical",1],[false,10,2,"default"],
|
||||
"model","fan",24.25,35,3,"bottom",[0,0,0],["sbc",true,true,false],[40,0,3],["box40x10"],[false,10,2,"default"],
|
||||
"add2","hd_holder",10,-24,1.99,"bottom",[0,0,0],["case",true,true,false],[0,0,0],[2.5,"portrait"],[false,10,2,"default"],
|
||||
"model","hd25",10,-24,2,"bottom",[0,0,0],["case",true,true,false],[0,0,0],["portrait",15],[true,17,2,"both"],
|
||||
"model","hd25",10,-24,20,"bottom",[0,0,0],["case",true,true,false],[0,0,0],["portrait",15],[true,17,2,"default"],
|
||||
"model","fan",37,10,7,"bottom",[90,0,0],["case",true,false,false],[40,0,3],["box40x10"],[true,10,2,"fan_open"],
|
||||
"model","fan_cover",37,-4,7,"bottom",[90,0,0],["case",true,false,false],[40,0,3],["fan_1"],[false,10,2,"default"],
|
||||
"platter","fan_cover",-50,50,0,"bottom",[0,0,0],["case",false,false,false],[40,0,3],["fan_1"],[false,10,2,"default"]],
|
||||
|
||||
// Odroid-M1S
|
||||
["m1s_shell_nvme",
|
||||
"sub","vent_hex",37,5,-1,"bottom",[0,0,0],["sbc",false,false,false],[11,3,5],[5,1.5,"horizontal",1],[false,10,2,"default"],
|
||||
"sub","vent_hex",0,5,-1,"bottom",[0,0,0],["sbc",false,false,false],[7,3,5],[5,1.5,"horizontal",1],[false,10,2,"default"],
|
||||
"sub","vent_hex",87,5,-1,"bottom",[0,0,0],["sbc",false,false,false],[3,3,5],[5,1.5,"horizontal",1],[false,10,2,"default"],
|
||||
"sub","vent_hex",21,60,-1,"bottom",[0,0,0],["sbc",false,false,false],[20,1,5],[5,1.5,"horizontal",1],[false,10,2,"default"],
|
||||
"sub","rectangle",73.5,5.5,2.5,"top",[0,0,45],["sbc-case_z",true,true,true],[11,3,15],[[1,1,1,1]],[false,10,2,"default"],
|
||||
"sub","rectangle",5.5,56,2.5,"top",[0,0,0],["sbc-case_z",true,true,true],[3,11,15],[[1,1,1,1]],[false,10,2,"default"],
|
||||
"sub","rectangle",81.5,56,2.5,"top",[0,0,0],["sbc-case_z",true,true,true],[3,11,15],[[1,1,1,1]],[false,10,2,"default"],
|
||||
"sub","rectangle",17.5,12,2.5,"top",[0,0,0],["sbc-case_z",true,true,true],[11,3,15],[[1,1,1,1]],[false,10,2,"default"]],
|
||||
|
||||
["m1s_shell_ups",
|
||||
"sub","vent_hex",0,5,17,"top",[0,0,0],["case",false,false,true],[9,21,8],[5,1.5,"horizontal",1],[false,10,2,"default"],
|
||||
"model","hk_m1s_ups",-1,122.5,5,"bottom",[0,0,270],["sbc",false,false,false],[0,0,0],[0],[true,10,2,"default"],
|
||||
"add2","standoff",2.5,11,0,"bottom",[0,0,0],["sbc",false,false,false],[0,0,0],[["custom",5.75,5,3.6,10,4,"countersunk","hex",false,false,4.5,5.1]],[true,10,2,"default"],
|
||||
"add2","standoff",27.5,11,0,"bottom",[0,0,0],["sbc",false,false,false],[0,0,0],[["custom",5.75,5,3.6,10,4,"countersunk","hex",false,false,4.5,5.1]],[true,10,2,"default"],
|
||||
"add2","standoff",2.5,119,0,"bottom",[0,0,0],["sbc",false,false,false],[0,0,0],[["custom",5.75,5,3.6,10,4,"countersunk","hex",false,false,4.5,5.1]],[true,10,2,"default"],
|
||||
"add2","standoff",27.5,119,0,"bottom",[0,0,0],["sbc",false,false,false],[0,0,0],[["custom",5.75,5,3.6,10,4,"countersunk","hex",false,false,4.5,5.1]],[true,10,2,"default"],
|
||||
"add2","button",2,33.5,21.2,"top",[0,0,0],["sbc-case_z",false,false,true],[10,0,23.5],["recess"],[true,10,2,"default"],
|
||||
"model","button_assembly",2,33.5,21.2,"top",[0,0,0],["sbc-case_z",false,false,true],[10,0,23.5],["recess"],[false,10,2,"default"],
|
||||
"platter","button_assembly",-20,0,0,"top",[0,0,0],["case",false,false,false],[10,0,23.5],["recess"],[false,10,2,"default"],
|
||||
"sub","rectangle",73.5,5.5,2.5,"top",[0,0,45],["sbc",true,true,true],[11,3,15],[[1,1,1,1]],[false,10,2,"default"],
|
||||
"sub","rectangle",5.5,56,2.5,"top",[0,0,0],["sbc",true,true,true],[3,11,15],[[1,1,1,1]],[false,10,2,"default"],
|
||||
"sub","rectangle",81.5,56,2.5,"top",[0,0,0],["sbc",true,true,true],[3,11,15],[[1,1,1,1]],[false,10,2,"default"],
|
||||
"sub","rectangle",17.5,12,2.5,"top",[0,0,0],["sbc",true,true,true],[11,3,15],[[1,1,1,1]],[false,10,2,"default"]],
|
||||
|
||||
["m1s_tray_nvme",
|
||||
"sub","vent_hex",30,5,-1,"bottom",[0,0,0],["sbc",true,true,false],[11,3,5],[5,1.5,"horizontal",1],[false,10,2,"default"],
|
||||
"sub","vent_hex",-10,5,-1,"bottom",[0,0,0],["sbc",true,true,false],[7,3,5],[5,1.5,"horizontal",1],[false,10,2,"default"],
|
||||
"sub","vent_hex",79,5,-1,"bottom",[0,0,0],["sbc",true,true,false],[3,3,5],[5,1.5,"horizontal",1],[false,10,2,"default"],
|
||||
"sub","rectangle",73.5,5.5,3.5,"top",[0,0,45],["sbc",true,true,true],[11,3,15],[[1,1,1,1]],[false,10,2,"default"],
|
||||
"sub","rectangle",5.5,56,3.5,"top",[0,0,0],["sbc",true,true,true],[3,11,15],[[1,1,1,1]],[false,10,2,"default"],
|
||||
"sub","rectangle",81.5,56,3.5,"top",[0,0,0],["sbc",true,true,true],[3,11,15],[[1,1,1,1]],[false,10,2,"default"],
|
||||
"sub","rectangle",17.5,12,3.5,"top",[0,0,0],["sbc",true,true,true],[11,3,15],[[1,1,1,1]],[false,10,2,"default"]],
|
||||
|
||||
// Odroid-M1
|
||||
["m1_tray_ssd",
|
||||
"model","hd25",80,22,35.5,"top",[0,180,0],["sbc-case_z",true,true,true],[0,0,0],["portrait",7],[true,10,2,"bottom"],
|
||||
"sub","vent",94.5,32,10,"top",[0,0,90],["case",true,false,false],[2,15,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",-6.5,32,10,"top",[0,0,90],["case",false,false,false],[2,15,4],[1,17,"vertical",1],[false,10,2,"default"]],
|
||||
|
||||
["m1_fitted_pizzabox2.5",
|
||||
"sub","vent",-3.75,30,9,"bottom",[0,0,90],["case",false,false,false],[2,10,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",93,30,9,"bottom",[0,0,90],["case",true,false,false],[2,10,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"model","fan",10,1,25,"top",[0,0,0],["case",true,true,true],[0,0,0],["box60x10"],[true,10,2,"fan_hex"],
|
||||
"add2","standoff",22,36,0,"bottom",[0,0,0],["case",true,true,false],[0,0,0],[["custom",5.75,5,3.6,10,4,"countersunk","hex",false,false,4.5,5.1]],[true,10,2,"default"],
|
||||
"add2","standoff",22,112.5,0,"bottom",[0,0,0],["case",true,true,false],[0,0,0],[["custom",5.75,5,3.6,10,4,"countersunk","hex",false,false,4.5,5.1]],[true,10,2,"default"],
|
||||
"add2","standoff",83.5,36,0,"bottom",[0,0,0],["case",true,true,false],[0,0,0],[["custom",5.75,5,3.6,10,4,"countersunk","hex",false,false,4.5,5.1]],[true,10,2,"default"],
|
||||
"add2","standoff",83.5,112.5,0,"bottom",[0,0,0],["case",true,true,false],[0,0,0],[["custom",5.75,5,3.6,10,4,"countersunk","hex",false,false,4.5,5.1]],[true,10,2,"default"],
|
||||
"model","hd25",18,22,5,"bottom",[0,0,0],["case",true,true,false],[0,0,0],["portrait",15],[true,10,2,"bottom"]],
|
||||
|
||||
["m1_fitted_pizzabox3.5",
|
||||
"sub","vent",-3.75,60,9,"bottom",[0,0,90],["case",false,false,false],[2,10,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",92,60,9,"bottom",[0,0,90],["case",true,false,false],[2,10,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"suball","vent",-89,126,15,"bottom",[0,0,0],["case",true,true,false],[2,13,4],[1,4,"vertical",1],[false,10,2,"default"],
|
||||
"model","fan",-100,63,25,"top",[0,0,0],["case",true,true,true],[0,0,0],["box60x10"],[true,10,2,"fan_hex"],
|
||||
"add2","standoff",-8.75,14.25,0,"bottom",[0,0,0],["case",true,true,false],[0,0,0],[["custom",5.75,5,3.6,10,4,"countersunk","hex",false,false,4.5,5.1]],[true,10,2,"default"],
|
||||
"add2","standoff",-8.75,58.75,0,"bottom",[0,0,0],["case",true,true,false],[0,0,0],[["custom",5.75,5,3.6,10,4,"countersunk","hex",false,false,4.5,5.1]],[true,10,2,"default"],
|
||||
"add2","standoff",-8.75,90.5,0,"bottom",[0,0,0],["case",true,true,false],[0,0,0],[["custom",5.75,5,3.6,10,4,"countersunk","hex",false,false,4.5,5.1]],[true,10,2,"default"],
|
||||
"add2","standoff",86.5,14.25,0,"bottom",[0,0,0],["case",true,true,false],[0,0,0],[["custom",5.75,5,3.6,10,4,"countersunk","hex",false,false,4.5,5.1]],[true,10,2,"default"],
|
||||
"add2","standoff",86.5,58.75,0,"bottom",[0,0,0],["case",true,true,false],[0,0,0],[["custom",5.75,5,3.6,10,4,"countersunk","hex",false,false,4.5,5.1]],[true,10,2,"default"],
|
||||
"add2","standoff",86.5,90.5,0,"bottom",[0,0,0],["case",true,true,false],[0,0,0],[["custom",5.75,5,3.6,10,4,"countersunk","hex",false,false,4.5,5.1]],[true,10,2,"default"],
|
||||
"model","hd35",-12,-27,5,"bottom",[0,0,0],["case",true,true,false],[0,0,0],["portrait"],[true,10,2,"bottom"]],
|
||||
|
||||
// Odroid-H3
|
||||
["h3_shell",
|
||||
"sub","vent",-3.5,30,18,"top",[0,0,90],["case",false,false,true],[2,12,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",111.5,30,18,"top",[0,0,90],["case",true,false,true],[2,12,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",-3.5,30,4,"bottom",[0,0,90],["case",false,false,true],[2,6,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",111.5,30,4,"bottom",[0,0,90],["case",true,false,true],[2,6,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"model","fan",7.5,20,43,"top",[0,0,0],["sbc-case_z",true,true,true],[0,0,0],["box80x10"],[true,10,2,"fan_hex"],
|
||||
"add2","batt_holder",101,40,55.25,"top",[180,0,-18],["sbc-case_z",true,true,true],[10,10,0],[0],[false,10,2,"default"],
|
||||
"add2","button",12.34,106.43,55.25,"top",[0,0,0],["sbc-case_z",true,true,true],[10,0,32],["recess"],[true,10,2,"default"],
|
||||
"add2","button",23.77,106.43,55.25,"top",[0,0,0],["sbc-case_z",true,true,true],[10,0,32],["recess"],[true,10,2,"default"],
|
||||
"model","button_assembly",12.34,106.43,55.25,"top",[0,0,0],["sbc-case_z",true,true,true],[10,0,36.5],["recess"],[false,10,2,"default"],
|
||||
"model","button_assembly",23.77,106.43,55.25,"top",[0,0,0],["sbc-case_z",true,true,true],[10,0,36.5],["recess"],[false,10,2,"default"],
|
||||
"platter","button_assembly",-20,0,0,"top",[0,0,0],["case",false,false,false],[10,0,36.5],["recess"],[false,10,2,"default"],
|
||||
"platter","button_assembly",-30,0,0,"top",[0,0,0],["case",false,false,false],[10,0,36.5],["recess"],[false,10,2,"default"]],
|
||||
|
||||
["h3_shell_router",
|
||||
"sub","vent",-3.5,30,40,"top",[0,0,90],["case",false,false,false],[2,10,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",111.5,30,40,"top",[0,0,90],["case",true,false,false],[2,10,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",-3.5,30,4,"bottom",[0,0,90],["case",false,false,false],[2,10,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",111.5,30,4,"bottom",[0,0,90],["case",true,false,false],[2,10,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"model","hk_netcard",0,0,9,"bottom",[0,0,0],["sbc",true,true,true],[0,0,0],["portrait"],[true,10,2,"default"],
|
||||
"add2","button",12.34,106.43,55.25,"top",[0,0,0],["sbc-case_z",true,true,true],[10,0,32],["recess"],[true,10,2,"default"],
|
||||
"add2","button",23.77,106.43,55.25,"top",[0,0,0],["sbc-case_z",true,true,true],[10,0,32],["recess"],[true,10,2,"default"],
|
||||
"model","button_assembly",12.34,106.43,55.25,"top",[0,0,0],["sbc-case_z",true,true,true],[10,0,32],["recess"],[false,10,2,"default"],
|
||||
"model","button_assembly",23.77,106.43,55.25,"top",[0,0,0],["sbc-case_z",true,true,true],[10,0,32],["recess"],[false,10,2,"default"],
|
||||
"platter","button_assembly",-20,0,0,"top",[0,0,0],["case",false,false,false],[10,0,32],["recess"],[false,10,2,"default"],
|
||||
"platter","button_assembly",-30,0,0,"top",[0,0,0],["case",false,false,false],[10,0,32],["recess"],[false,10,2,"default"]],
|
||||
|
||||
["h3_lowboy",
|
||||
"sub","rectangle",94.5,-4,32,"top",[0,0,0],["sbc-case_z",true,true,true],[14,24.5,35],[[.25,.25,.25,.25]],[false,10,2,"default"],
|
||||
"sub","rectangle",68,-4,32,"top",[0,0,0],["sbc-case_z",true,true,true],[19.5,21.5,35],[[.25,.25,.25,.25]],[false,10,2,"default"],
|
||||
"sub","rectangle",44.5,-4,32,"top",[0,0,0],["sbc-case_z",true,true,true],[20.5,31,35],[[.25,.25,.25,.25]],[false,10,2,"default"],
|
||||
"sub","rectangle",19.5,-4,32,"top",[0,0,0],["sbc-case_z",true,true,true],[20.5,31,35],[[.25,.25,.25,.25]],[false,10,2,"default"],
|
||||
"sub","vent",-3.5,30,24,"top",[0,0,90],["case",false,false,false],[2,6,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",111.5,30,24,"top",[0,0,90],["case",true,false,false],[2,6,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",-3.5,30,4,"bottom",[0,0,90],["case",false,false,false],[2,6,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",111.5,30,4,"bottom",[0,0,90],["case",true,false,false],[2,6,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"add2","button",12.34,106.43,55.25,"top",[0,0,0],["sbc-case_z",true,true,true],[10,0,11],["recess"],[true,10,2,"default"],
|
||||
"add2","button",23.77,106.43,55.25,"top",[0,0,0],["sbc-case_z",true,true,true],[10,0,11],["recess"],[true,10,2,"default"],
|
||||
"model","button_assembly",12.34,106.43,55.25,"top",[0,0,0],["sbc-case_z",true,true,true],[10,0,11],["recess"],[false,10,2,"default"],
|
||||
"model","button_assembly",23.77,106.43,55.25,"top",[0,0,0],["sbc-case_z",true,true,true],[10,0,11],["recess"],[false,10,2,"default"],
|
||||
"platter","button_assembly",-20,0,0,"top",[0,0,0],["case",false,false,false],[10,0,11],["recess"],[false,10,2,"default"],
|
||||
"platter","button_assembly",-30,0,0,"top",[0,0,0],["case",false,false,false],[10,0,11],["recess"],[false,10,2,"default"]],
|
||||
|
||||
["h3_lowboy_router",
|
||||
"sub","rectangle",94.5,-4,32,"top",[0,0,0],["sbc-case_z",true,true,true],[14,24.5,35],[[.25,.25,.25,.25]],[false,10,2,"default"],
|
||||
"sub","rectangle",68,-4,32,"top",[0,0,0],["sbc-case_z",true,true,true],[19.5,21.5,35],[[.25,.25,.25,.25]],[false,10,2,"default"],
|
||||
"sub","rectangle",44.5,-4,32,"top",[0,0,0],["sbc-case_z",true,true,true],[20.5,31,35],[[.25,.25,.25,.25]],[false,10,2,"default"],
|
||||
"sub","rectangle",19.5,-4,32,"top",[0,0,0],["sbc-case_z",true,true,true],[20.5,31,35],[[.25,.25,.25,.25]],[false,10,2,"default"],
|
||||
"sub","vent",-3.5,30,30,"top",[0,0,90],["case",false,false,false],[2,10,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",111.5,30,30,"top",[0,0,90],["case",true,false,false],[2,10,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",-3.5,30,4,"bottom",[0,0,90],["case",false,false,false],[2,10,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",111.5,30,4,"bottom",[0,0,90],["case",true,false,false],[2,10,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"add2","button",12.34,106.43,55.25,"top",[0,0,0],["sbc-case_z",true,true,true],[10,0,11],["recess"],[true,10,2,"default"],
|
||||
"add2","button",23.77,106.43,55.25,"top",[0,0,0],["sbc-case_z",true,true,true],[10,0,11],["recess"],[true,10,2,"default"],
|
||||
"model","button_assembly",12.34,106.43,55.25,"top",[0,0,0],["sbc-case_z",true,true,true],[10,0,11],["recess"],[false,10,2,"default"],
|
||||
"model","button_assembly",23.77,106.43,55.25,"top",[0,0,0],["sbc-case_z",true,true,true],[10,0,11],["recess"],[false,10,2,"default"],
|
||||
"model","hk_netcard",0,0,9,"bottom",[0,0,0],["sbc",true,true,true],[0,0,0],["portrait"],[true,10,2,"default"],
|
||||
"platter","button_assembly",-20,0,0,"top",[0,0,0],["case",false,false,false],[10,0,11],["recess"],[false,10,2,"default"],
|
||||
"platter","button_assembly",-30,0,0,"top",[0,0,0],["case",false,false,false],[10,0,11],["recess"],[false,10,2,"default"]],
|
||||
|
||||
["h3_ultimate",
|
||||
"sub","vent",-3.5,30,58,"top",[0,0,90],["case",false,false,false],[2,12,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",111.5,30,58,"top",[0,0,90],["case",true,false,false],[2,12,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",-3.5,30,19,"top",[0,0,90],["case",false,false,false],[2,12,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",111.5,30,28,"top",[0,0,90],["case",true,false,false],[2,12,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",-3.5,30,4,"bottom",[0,0,90],["case",false,false,false],[2,6,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"sub","vent",111.5,30,4,"bottom",[0,0,90],["case",true,false,false],[2,6,4],[1,17,"vertical",1],[false,10,2,"default"],
|
||||
"model","fan",7.5,20,28,"top",[0,0,0],["sbc-case_z",true,true,true],[0,0,0],["box80x25"],[true,25,2,"fan_hex"],
|
||||
"model","hk_pwr_button",20,110,55.25,"top",[0,0,0],["sbc-case_z",true,true,true],[0,0,0],[0],[true,10,2,"default"],
|
||||
"add2","hd_holder",98,10,1.99,"bottom",[0,0,0],["case",true,true,false],[0,0,0],[2.5,"portrait","vertical","left"],[false,10,2,"default"],
|
||||
"model","hd25",98,10,2,"bottom",[0,270,0],["case",true,true,false],[0,0,0],["portrait",7],[true,19,2,"both"]],
|
||||
|
||||
["h3_ultimate2",
|
||||
"model","fan",24,25,3,"bottom",[0,270,0],["case",false,false,false],[0,0,0],["box60x25"],[true,25,2,"fan_open"],
|
||||
"model","fan_cover",-4,25,3,"top",[0,270,0],["case",false,false,false],[60,0,2],["fan_hex"],[false,10,2,"default"],
|
||||
"platter","fan_cover",-100,150,0,"top",[0,0,0],["case",false,false,false],[60,0,2],["fan_hex"],[false,10,2,"default"],
|
||||
// side panel
|
||||
"model","vent_panel_hex",144,11.77,64,"top",[0,90,0],["case",false,false,false],[62,107.43,3],[5.0,1.6,"y",14],[false,10,2,"default"],
|
||||
"platter","vent_panel_hex",-200,13.77,0,"top",[0,0,0],["case",false,false,false],[62,107.43,3],[5.0,1.6,"y",14],[false,10,2,"default"],
|
||||
"suball","rectangle",111,26.77,62,"top",[0,90,0],["case",true,false,false],[58,77.43,4],[[2,2,2,2]],[false,10,2,"default"],
|
||||
"add2","nut_holder",144,16.57,57,"top",[0,270,0],["case",false,false,false],[8,16,5],["m3","sloped"],[true,10,4,"default"],
|
||||
"add2","nut_holder",144,16.57,9 ,"bottom",[0,270,0],["case",false,false,false],[8,16,5],["m3","sloped"],[true,10,4,"default"],
|
||||
"add2","nut_holder",144,114.4,57,"top",[0,270,0],["case",false,false,false],[8,16,5],["m3","sloped"],[true,10,4,"default"],
|
||||
"add2","nut_holder",144,114.4,9 ,"bottom",[0,270,0],["case",false,false,false],[8,16,5],["m3","sloped"],[true,10,4,"default"],
|
||||
// clearence trim
|
||||
"sub","rectangle",100.5,17,25,"top",[0,0,0],["sbc-case_z",true,true,true],[9,4,15],[[1,1,1,1]],[false,10,2,"default"],
|
||||
// front wall support
|
||||
"add1","round",23,111.5,10,"top",[0,0,0],["case",true,true,true],[4,0,44],[0],[false,10,2,"default"],
|
||||
"add1","round",71,111.5,10,"top",[0,0,0],["case",true,true,true],[4,0,44],[0],[false,10,2,"default"],
|
||||
"add1","round",101,111.5,10,"top",[0,0,0],["case",true,true,true],[4,0,44],[0],[false,10,2,"default"],
|
||||
"add1","round",-10,111.5,10,"top",[0,0,0],["case",true,true,true],[4,0,44],[0],[false,10,2,"default"],
|
||||
// fan side wall support
|
||||
"add1","round",-31.5,3,10,"top",[0,0,0],["case",true,true,true],[4,0,44],[0],[false,10,2,"default"],
|
||||
"add1","round",-31.5,77,10,"top",[0,0,0],["case",true,true,true],[4,0,44],[0],[false,10,2,"default"],
|
||||
// rear wall support
|
||||
"add1","round",91.25,-16.5,10,"top",[0,0,0],["case",true,true,true],[4,0,44],[0],[false,10,2,"default"],
|
||||
"add1","round",66.25,-16.5,10,"top",[0,0,0],["case",true,true,true],[4,0,44],[0],[false,10,2,"default"],
|
||||
"add1","round",42.25,-16.5,10,"top",[0,0,0],["case",true,true,true],[4,0,44],[0],[false,10,2,"default"],
|
||||
"add1","round",16.25,-16.5,10,"top",[0,0,0],["case",true,true,true],[4,0,44],[0],[false,10,2,"default"],
|
||||
"add1","round",-1,-16.5,9,"top",[0,0,0],["case",true,true,true],[4,0,44],[0],[false,10,2,"default"],
|
||||
// top stiffeners
|
||||
"add1","rectangle",2,7,51,"top",[0,0,0],["case",true,true,true],[4,80,3],[[.25,.25,.25,.25]],[false,10,2,"default"],
|
||||
"add1","rectangle",27,-16.5,51,"top",[0,0,0],["case",true,true,true],[4,130,3],[[.25,.25,.25,.25]],[false,10,2,"default"],
|
||||
"add1","rectangle",52,-16.5,51,"top",[0,0,0],["case",true,true,true],[4,130,3],[[.25,.25,.25,.25]],[false,10,2,"default"],
|
||||
"add1","rectangle",77,-16.5,51,"top",[0,0,0],["case",true,true,true],[4,130,3],[[.25,.25,.25,.25]],[false,10,2,"default"],
|
||||
"add1","rectangle",104,7,51,"top",[0,0,0],["case",true,true,true],[4,80,3],[[.25,.25,.25,.25]],[false,10,2,"default"],
|
||||
"model","hk_h3_port_extender",63.5,117,4,"top",[90,0,180],["case",true,false,true],[0,0,0],["remote"],[true,15,5,"default"],
|
||||
"model","hk_h3_port_extender_holder",31,119,4,"top",[0,0,-90],["case",true,false,true],[0,0,0],[2.5,"both"],[false,10,2,"default"],
|
||||
"platter","hk_h3_port_extender_holder",-170,150,0,"top",[0,0,-90],["case",true,false,true],[0,0,0],[2.5,"remote"],[false,10,2,"default"],
|
||||
"model","hk_pwr_button",18,113,55.25,"top",[0,0,180],["case",false,false,true],[0,0,0],[0],[true,10,2,"default"],
|
||||
"model","dsub",18,-1,46,"top",[90,90,0],["case",false,false,false],[0,0,0],["db9","female"],[true,10,2,"default"]],
|
||||
|
||||
["show2_shell",
|
||||
"model","hk_wb2",6.25,24.675,16,"bottom",[0,0,180],["sbc",true,true,true],[0,0,0],[0],[false,10,2,"default"],
|
||||
"sub","rectangle",.5,8,8.5,"top",[0,0,0],["case",false,false,false],[6,16.5,8],[[.5,.5,.5,.5]],[false,10,2,"default"]],
|
||||
|
||||
|
||||
// Standard Motherboard Cases
|
||||
["adapter_mini-stx_m1s",
|
||||
"add2","standoff",5,100,0,"bottom",[0,0,0],["sbc",false,false,false],[0,0,0],[["custom",5.75,5,3.6,10,4,"countersunk","hex",false,false,4.5,5.1]],[true,10,2,"default"],
|
||||
"add2","standoff",5,125,0,"bottom",[0,0,0],["sbc",false,false,false],[0,0,0],[["custom",5.75,5,3.6,10,4,"countersunk","hex",false,false,4.5,5.1]],[true,10,2,"default"],
|
||||
"add2","standoff",113,100,0,"bottom",[0,0,0],["sbc",false,false,false],[0,0,0],[["custom",5.75,5,3.6,10,4,"countersunk","hex",false,false,4.5,5.1]],[true,10,2,"default"],
|
||||
"add2","standoff",113,125,0,"bottom",[0,0,0],["sbc",false,false,false],[0,0,0],[["custom",5.75,5,3.6,10,4,"countersunk","hex",false,false,4.5,5.1]],[true,10,2,"default"],
|
||||
"model","hk_m1s_ups",2,97,5,"bottom",[0,0,0],["sbc",false,false,false],[0,0,0],[0],[true,110,2,"default"]],
|
||||
];
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
BIN
stl/h3_port_extender.stl
Normal file
BIN
stl/h3_port_extender.stl
Normal file
Binary file not shown.
Reference in New Issue
Block a user