panel_nas case design and SBCMF update

This commit is contained in:
Edward Kisiel
2025-04-23 17:50:45 -04:00
13 changed files with 2081 additions and 222 deletions

View File

@@ -93,7 +93,7 @@ The *3D Case Adjustments* tab makes up the bulk of the possible case adjustments
### Fan and Vent Openings Tab
This tab handles the fan and cooling options for case designs. The *top cover pattern* and *bottom cover pattern* contain several options for the creation of vent patterns that cover the complete top and bottom respectively, including a solid covering. The *cooling* pickbox selects fan and vent openings exclusively for the heatsink associated with the device in SBC Model Framework.
This tab handles the fan and cooling options for case designs. The *top cover pattern*, *bottom cover pattern* and *front cover pattern* contain several options for the creation of vent patterns that cover the complete panel, including a solid covering. The *cooling* pickbox selects fan and vent openings exclusively for the heatsink associated with the device in SBC Model Framework.
```
disable - turns off the heatsink model and mask
off - heatsink model is off, mask is on and default will be used
@@ -102,7 +102,7 @@ none - heatsink model is on and mask is off.
fan and vent pattern selections - open, fan_open, fan_1, fan_2, fan_hex, vent, vent_hex_5mm, vent_hex_8mm
custom - uses the file ./SBC_Model_Framework/customfan.dxf
```
The *fan size* allows the selection of different fan size masks over the default size selected by 0.
The *fan size* allows the selection of different fan size masks over the default size selected by 0. The rear fan entries are for the *panel_nas* case design and allow for the same types of fan adjustments as the heatsink. There is also the choice of one or two rear fans as well as additional adjustments for the position and spacing of them.
### Bottom Access Panel Tab
@@ -110,7 +110,7 @@ This tab allows the creation of a bottom access panel and its entries are self e
### Options and Accessories
The entrys in this tab allow for the enablement and selection of different GPIO and UART openings based on their type identifier in SBC_Model_Framework.
The entrys in this tab allow for the enablement and selection of different options and accessories. It includes case indents, GPIO, and UART openings based on their type identifier in SBC_Model_Framework. It also contains hard drive options for the panel_nas case.
#### GPIO Selections
```
@@ -130,6 +130,11 @@ mask opening selections - open, knockout
The *indent* checkbox enables indents for a select group of components defined in SBC Model Framework. The currently support components are - video-hmdi_a, video-hdmi_micro, video-hdmi_mini, power-pwr5.5_7.5x11.5, power-pwr2.5_5x7.5, usb2-micro, usbc-single_horizontal, audio-jack_3.5. The *accessory name* pickbox uses the unique accessory group name to associate a given accessory set with a case design. Entries are stored in the file sbc_case_builder_accessories.cfg which is covered in detail with the Accessory Subsystem in this document. The remaining two entries select the color and proportional font used with the *sbc information* display when enabled in the *View* tab.
#### NAS HD Options
The *nas sbc location* pickbox allows the positioning of the SBC at the top or bottom of a NAS case. *hd bays* sets the number of drive bays, *hd reverse* checkbox rotates the drives 180 degrees while *hd center* centers the drives in the x-axis. The next entry, *hd space* determines the spacing between drives and *hd y position* and *hd z position* sets the respective axis locations.
#### Accessory Group Name
The *accessory name* allows the selection of an accessory group to be associated with the current case. These groups are located in the file sbc_case_builder_accessories.cfg and provide a means to add or subtract geometry, models and add items to the print platter. See the *Accessory Subsystem* area below for further details and use.
### Standoff Tabs
There are 3 types of standoffs available in the user interface, SBC Standoffs, Extended Case Standoffs and Multi-PCB Standoffs. The SBC standoffs control adjustments for the SBC or pcbid 0 as defined by the entry in SBC Model Framework file ./SBC_Model_Framework/sbc_models.cfg. The Extended Case Standoffs control case corner standoffs when the case exceeds the SBC size by the *SBC Standoff Support Size*. The Multi-PCB standoffs are used for additional PCB in multi-PCB configurations as defined in ./SBC_Model_Framework/sbc_models.cfg e.g. pcbid 1, pcbid 2, etc. All three standoff types have similar controls made up of a global tab and individual Settings tab in the GUI.
@@ -1076,6 +1081,7 @@ DESCRIPTION: creates hard drive holes for 2.5 and 3.5 drives in various orientat
data[1] = "portrait", "landscape"
data[2] = "left", "right", "both", "bottom", "all"
data[3] = floor thickness
data[4] = "hole", "slot"
mask[0] = false, not used
mask[1] = length
mask[2] = set back

View File

@@ -28,16 +28,20 @@
*/
module cableholder_spacer() {
module cableholder_spacer(length) {
size = [9.4,16,6];
adj = .01;
$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);
union() {
translate([size[0]/2,size[0]/2,0]) rotate([0,0,90]) long_slot(size[0],size[1],size[2]);
translate([-length,5,3]) rotate([0,90,0]) cylinder(d=6, h=length+9.4);
}
translate([-length-adj,5,3]) rotate([0,90,0]) cylinder(d=3.2, h=length+size[0]+2*adj);
translate([-1,8,-1]) cube([2,20,9]);
translate([5,9.5,-1]) rotate([0,0,90]) long_slot(4.5,11,9);
translate([3,20,-1]) rotate([0,0,45]) cube([2,6,9]);
}
}

View File

@@ -22,7 +22,7 @@
hdd35_25holder(length)
hd35_tab(side)
hd35_vtab(side)
hd_bottom_holes(hd, orientation, side, thick)
hd_bottom_holes(hd, orientation, side, thick, holetype)
hd_mount(hd, orientation, position, side)
*/
@@ -614,21 +614,25 @@ module hd35_vtab(side) {
DESCRIPTION: creates 2.5" and 3.5" hard drive hole mask for mounting
TODO: none
USAGE: hd_bottom_holes(hd, orientation, side, thick)
USAGE: hd_holes(hd, orientation, side, thick, holetype)
hd = 2.5, 3.5
orientation = "portrait", "landscape"
side = "left", "right", "both", "bottom", "all"
thick = floor thickness
holetype = "hole", "slot"
*/
module hd_holes(hd, orientation, side, thick) {
module hd_holes(hd=3.5, orientation="portrait", side="all", thick=2, holetype="slot") {
hd25_x = 100;
hd25_y = 69.85;
hd35_x = 147;
hd35_y = 101.6;
hd35_z = 26.1;
hole_size = 3.2;
hole_len = 3 * hole_size;
slot_size = [hole_size, hole_len, thick];
adj = .01;
$fn = 90;
@@ -636,35 +640,83 @@ module hd_holes(hd, orientation, side, thick) {
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(holetype == "hole") {
translate([9.4,-thick,3]) rotate([270,0,0]) cylinder(d=hole_size,h=thick);
translate([86,-thick,3]) rotate([270,0,0]) cylinder(d=hole_size,h=thick);
}
if(holetype == "slot") {
translate([9.4-(1.5*hole_size),-thick,3]) rotate([270,0,0])
slot(hole_size, hole_len, thick);
translate([86-(1.5*hole_size),-thick,3]) rotate([270,0,0])
slot(hole_size, hole_len, 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(holetype == "hole") {
translate([9.4,hd25_y+thick,3]) rotate([90,0,0]) cylinder(d=hole_size,h=thick);
translate([86,hd25_y+thick,3]) rotate([90,0,0]) cylinder(d=hole_size,h=thick);
}
if(holetype == "slot") {
translate([9.4-(1.5*hole_size),hd25_y+thick,3]) rotate([90,0,0])
slot(hole_size, hole_len, thick);
translate([86-(1.5*hole_size),hd25_y+thick,3]) rotate([90,0,0])
slot(hole_size, hole_len, 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(holetype == "hole") {
translate([9.4,4.07,0]) cylinder(d=hole_size,h=thick);
translate([86,4.07,0]) cylinder(d=hole_size,h=thick);
translate([86,65.79,0]) cylinder(d=hole_size,h=thick);
translate([9.4,65.79,0]) cylinder(d=hole_size,h=thick);
}
if(holetype == "slot") {
translate([9.4-(1.5*hole_size),4.07,0]) slot(hole_size, hole_len, thick);
translate([86-(1.5*hole_size),4.07,0]) slot(hole_size, hole_len, thick);
translate([86-(1.5*hole_size),65.79,0]) slot(hole_size, hole_len, thick);
translate([9.4-(1.5*hole_size),65.79,0]) slot(hole_size, hole_len, 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(holetype == "hole") {
translate([9.4,-thick,3]) rotate([270,0,0]) cylinder(d=hole_size,h=thick);
translate([86,-thick,3]) rotate([270,0,0]) cylinder(d=hole_size,h=thick);
}
if(holetype == "slot") {
translate([9.4-(1.5*hole_size),-thick,3]) rotate([270,0,0])
slot(hole_size, hole_len, thick);
translate([86-(1.5*hole_size),-thick,3]) rotate([270,0,0])
slot(hole_size, hole_len, 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(holetype == "hole") {
translate([9.4,hd25_y+thick,3]) rotate([90,0,0]) cylinder(d=hole_size,h=thick);
translate([86,hd25_y+thick,3]) rotate([90,0,0]) cylinder(d=hole_size,h=thick);
}
if(holetype == "slot") {
translate([9.4-(1.5*hole_size),hd25_y+thick,3]) rotate([90,0,0])
slot(hole_size, hole_len, thick);
translate([86-(1.5*hole_size),hd25_y+thick,3]) rotate([90,0,0])
slot(hole_size, hole_len, 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(holetype == "hole") {
translate([9.4,4.07,-thick]) cylinder(d=hole_size,h=thick);
translate([86,4.07,-thick]) cylinder(d=hole_size,h=thick);
translate([86,65.79,-thick]) cylinder(d=hole_size,h=thick);
translate([9.4,65.79,-thick]) cylinder(d=hole_size,h=thick);
}
if(holetype == "slot") {
translate([9.4-(1.5*hole_size),4.07,-thick]) slot(hole_size, hole_len, thick);
translate([86-(1.5*hole_size),4.07,-thick]) slot(hole_size, hole_len, thick);
translate([86-(1.5*hole_size),65.79,-thick]) slot(hole_size, hole_len, thick);
translate([9.4-(1.5*hole_size),65.79,-thick]) slot(hole_size, hole_len, thick);
}
}
}
}
@@ -672,45 +724,103 @@ module hd_holes(hd, orientation, side, thick) {
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(holetype == "hole") {
translate([16.9,-thick,6.35]) rotate([270,0,0]) cylinder(d=hole_size,h=thick);
translate([76.6,-thick,6.35]) rotate([270,0,0]) cylinder(d=hole_size,h=thick);
translate([118.5,-thick,6.35]) rotate([270,0,0]) cylinder(d=hole_size,h=thick);
}
if(holetype == "slot") {
translate([16.9-(1.5*hole_size),-thick,6.35]) rotate([270,0,0])
slot(hole_size, hole_len, thick);
translate([76.6-(1.5*hole_size),-thick,6.35]) rotate([270,0,0])
slot(hole_size, hole_len, thick);
translate([118.5-(1.5*hole_size),-thick,6.35]) rotate([270,0,0])
slot(hole_size, hole_len, 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(holetype == "hole") {
translate([118.5,hd35_y+thick,6.35]) rotate([90,0,0]) cylinder(d=hole_size,h=thick);
translate([76.6,hd35_y+thick,6.35]) rotate([90,0,0]) cylinder(d=hole_size,h=thick);
translate([16.9,hd35_y+thick,6.35]) rotate([90,0,0]) cylinder(d=hole_size,h=thick);
}
if(holetype == "slot") {
translate([118.5-(1.5*hole_size),hd35_y+thick,6.35]) rotate([90,0,0])
slot(hole_size, hole_len, thick);
translate([76.6-(1.5*hole_size),hd35_y+thick,6.35]) rotate([90,0,0])
slot(hole_size, hole_len, thick);
translate([16.9-(1.5*hole_size),hd35_y+thick,6.35]) rotate([90,0,0])
slot(hole_size, hole_len, 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(holetype == "hole") {
translate([29.52,3.18,0]) cylinder(d=hole_size,h=thick);
translate([61.27,3.18,0]) cylinder(d=hole_size,h=thick);
translate([105.72,3.18,0]) cylinder(d=hole_size,h=thick);
translate([29.52,98.43,0]) cylinder(d=hole_size,h=thick);
translate([61.27,98.43,0]) cylinder(d=hole_size,h=thick);
translate([105.72,98.43,0]) cylinder(d=hole_size,h=thick);
}
if(holetype == "slot") {
translate([29.52-(1.5*hole_size),3.18,0]) slot(hole_size, hole_len, thick);
translate([61.27-(1.5*hole_size),3.18,0]) slot(hole_size, hole_len, thick);
translate([105.72-(1.5*hole_size),3.18,0]) slot(hole_size, hole_len, thick);
translate([29.52-(1.5*hole_size),98.43,0]) slot(hole_size, hole_len, thick);
translate([61.27-(1.5*hole_size),98.43,0]) slot(hole_size, hole_len, thick);
translate([105.72-(1.5*hole_size),98.43,0]) slot(hole_size, hole_len, 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(holetype == "hole") {
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(holetype == "slot") {
translate([16.9-(1.5*hole_size),-thick,6.35]) rotate([270,0,0])
slot(hole_size, hole_len, thick);
translate([76.6-(1.5*hole_size),-thick,6.35]) rotate([270,0,0])
slot(hole_size, hole_len, thick);
translate([118.5-(1.5*hole_size),-thick,6.35]) rotate([270,0,0])
slot(hole_size, hole_len, 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(holetype == "hole") {
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(holetype == "slot") {
translate([118.5-(1.5*hole_size),hd35_y+thick,6.35]) rotate([90,0,0])
slot(hole_size, hole_len, thick);
translate([76.6-(1.5*hole_size),hd35_y+thick,6.35]) rotate([90,0,0])
slot(hole_size, hole_len, thick);
translate([16.9-(1.5*hole_size),hd35_y+thick,6.35]) rotate([90,0,0])
slot(hole_size, hole_len, 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);
if(holetype == "hole") {
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);
}
if(holetype == "slot") {
translate([29.52-(1.5*hole_size),3.18,-thick]) slot(hole_size, hole_len, thick);
translate([61.27-(1.5*hole_size),3.18,-thick]) slot(hole_size, hole_len, thick);
translate([105.72-(1.5*hole_size),3.18,-thick]) slot(hole_size, hole_len, thick);
translate([29.52-(1.5*hole_size),98.43,-thick]) slot(hole_size, hole_len, thick);
translate([61.27-(1.5*hole_size),98.43,-thick]) slot(hole_size, hole_len, thick);
translate([105.72-(1.5*hole_size),98.43,-thick]) slot(hole_size, hole_len, thick);
}
}
}
}

View File

@@ -1,63 +0,0 @@
/*
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);
}
}
}

View File

@@ -62,6 +62,22 @@ module case_bottom(case_design) {
cube([8,wallthick+2*adj,floorthick]);
}
}
if(case_design == "panel_nas") {
x_adj = pcb_width > 100 ? width-2*sidethick : width-2*(gap+sidethick);
xtab_adj = pcb_width > 100 ? width-gap-2*sidethick-adj : width-gap-2*(gap+sidethick)-adj;
union() {
translate([-gap,-wallthick,0])
cube([x_adj,depth-(2*wallthick),floorthick]);
translate([-gap-sidethick-(2*adj),depth-(3*wallthick)-gap-adj-20,0])
cube([sidethick+(2*adj),10,floorthick]);
translate([xtab_adj,depth-(3*wallthick)-gap-adj-20,0])
cube([sidethick+2*adj,10,floorthick]);
translate([-gap-sidethick-(2*adj),40-wallthick-gap+adj,0])
cube([sidethick+2*adj,10,floorthick]);
translate([xtab_adj,40-wallthick-gap+adj,0])
cube([sidethick+2*adj,10,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],
@@ -126,12 +142,14 @@ module case_bottom(case_design) {
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);
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);
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);
}
}
}
@@ -139,11 +157,11 @@ module case_bottom(case_design) {
// 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]);
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]);
cube([width,wallthick,top_height-floorthick]);
}
// rear panel
@@ -218,21 +236,21 @@ module case_bottom(case_design) {
}
else {
difference() {
translate([pcb_width/2,pcb_depth/2,bottom_height/2]) rotate([0,0,0])
translate([pcb_width/2,pcb_depth/2,bottom_height/2])
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])
translate([pcb_width/2,pcb_depth/2,(bottom_height/2)+floorthick])
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])
translate([pcb_width/2,pcb_depth/2,bottom_height-lip])
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])
translate([pcb_width/2,pcb_depth/2,bottom_height-lip])
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])
translate([pcb_width/2,pcb_depth/2,(bottom_height/2)+2*floorthick])
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);
@@ -497,24 +515,61 @@ echo(pcb_depth+case_offset_y-10);
}
// bottom cover pattern
if(bottom_cover_pattern != "solid") {
xvent8_adj = pcb_width > 100 ? width/5.5 : width/6;
if(bottom_cover_pattern == "hex_5mm") {
translate([1,0,-2]) vent_hex((width)/3.75,(depth)/6,floorthick+4,5,1.5,"horizontal");
if(case_design == "panel_nas") {
translate([6,5,-floorthick+adj])
vent_hex((width-10)/3.75,(depth-10)/7,floorthick+4,5,1.5,"horizontal");
}
else {
translate([1,0,-floorthick]) 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(case_design == "panel_nas") {
translate([-gap+5,6,-floorthick+adj]) vent_hex(xvent8_adj,depth/9.5,floorthick+4,8,1.5,"horizontal");
}
else {
translate([1,2,-floorthick]) 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(case_design == "panel_nas") {
translate([wallthick+gap,wallthick,-floorthick+adj])
vent(wallthick,depth-6*wallthick-gap,floorthick+4,1,1,(width-2*(sidethick+gap))/5.35,"horizontal");
}
else {
translate([0,-gap,-floorthick])
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(case_design == "panel_nas") {
translate([wallthick+gap,wallthick,-floorthick+adj])
vent(width-4*(sidethick+gap),wallthick,floorthick+4,1,
(depth-2*(wallthick-gap))/4.35,1,"horizontal");
}
else {
translate([-gap,-gap,-floorthick])
vent(width-2*(wallthick+gap),wallthick,floorthick+4,1,(depth-2*wallthick-gap)/3,1,"horizontal");
}
}
if(bottom_cover_pattern == "astroid") {
if(case_design == "panel_nas") {
xast_adj = pcb_width <= 100 ? 8 : 6;
for(c=[xast_adj:12:depth-16]) {
for(r=[12:12:width-16]) {
translate([r,c,-floorthick]) linear_extrude(floorthick+5) import("./dxf/astroid_8mm.dxf");
}
}
}
else {
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");
translate([r,c,-(2*floorthick)]) linear_extrude(floorthick+5) import("./dxf/astroid_8mm.dxf");
}
}
}
}
}
}
// rear io shield opening for standard form motherboards

View File

@@ -128,6 +128,311 @@ module case_side(case_design, side) {
}
}
}
if(case_design == "panel_nas") {
x_adj = pcb_width > 100 ? width-2*sidethick : width-2*(gap+sidethick);
xtab_adj = pcb_width > 100 ? width-gap-2*sidethick-adj : width-gap-2*(gap+sidethick)-adj;
xvent8_adj = pcb_width > 100 ? width/5.5 : width/6;
if(side == "rear") {
difference() {
union() {
translate([-gap,-(2*wallthick),0])
cube([x_adj,wallthick,case_z-wallthick]);
// bottom right tab
translate([xtab_adj,-(2*wallthick),20])
cube([sidethick+(2*adj),wallthick,10]);
// top right tab
translate([xtab_adj,-(2*wallthick),case_z-30])
cube([sidethick+(2*adj),wallthick,10]);
// bottom left tab
translate([-sidethick-gap-adj,-(2*wallthick),20])
cube([sidethick+(2*adj),wallthick,10]);
// top left tab
translate([-sidethick-gap-adj,-(2*wallthick),case_z-30])
cube([sidethick+(2*adj),wallthick,10]);
if(hd_bays > 3) {
// middle right tab
translate([xtab_adj,-(2*wallthick),(case_z/2)-5])
cube([sidethick+(2*adj),wallthick,10]);
// middle left tab
translate([-sidethick-gap-adj,-(2*wallthick),(case_z/2)-5])
cube([sidethick+(2*adj),wallthick,10]);
}
}
if(rear_fan == 1 || rear_fan == 2) {
if(rear_fan_center == false) {
translate([-1+(101.6-rear_fan_size)/2,-1,rear_fan_position])
rotate([90,0,0]) fan_mask(rear_fan_size, wallthick+2, rear_cooling);
}
if(rear_fan_center == true) {
translate([-1+(101.6-rear_fan_size)/2+(width-2*(sidethick+gap)-101.6)/2,-1,rear_fan_position])
rotate([90,0,0]) fan_mask(rear_fan_size, wallthick+2, rear_cooling);
}
}
if(rear_fan == 2) {
if(rear_fan_center == false) {
translate([-1+(101.6-rear_fan_size)/2,-1,rear_fan_position+rear_dualfan_spacing+rear_fan_size])
rotate([90,0,0]) fan_mask(rear_fan_size, wallthick+2, rear_cooling);
}
if(rear_fan_center == true) {
translate([-1+(101.6-rear_fan_size)/2+(width-2*(sidethick+gap)-101.6)/2,
-1,rear_fan_position+rear_dualfan_spacing+rear_fan_size])
rotate([90,0,0]) fan_mask(rear_fan_size, wallthick+2, rear_cooling);
}
}
}
}
if(side == "front") {
difference() {
union() {
translate([-gap,depth-(4*wallthick),floorthick])
cube([x_adj,wallthick,case_z-3*wallthick]);
// bottom right tab
translate([xtab_adj,depth-(4*wallthick),20])
cube([sidethick+(2*adj),wallthick,10]);
// top right tab
translate([xtab_adj,depth-(4*wallthick),case_z-30])
cube([sidethick+(2*adj),wallthick,10]);
// bottom left tab
translate([-sidethick-gap-adj,depth-(4*wallthick),20])
cube([sidethick+(2*adj),wallthick,10]);
// top left tab
translate([-sidethick-gap-adj,depth-(4*wallthick),case_z-30])
cube([sidethick+(2*adj),wallthick,10]);
if(hd_bays > 3) {
// middle right tab
translate([xtab_adj,depth-(4*wallthick),(case_z/2)-5])
cube([sidethick+(2*adj),wallthick,10]);
// middle left tab
translate([-sidethick-gap-adj,depth-(4*wallthick),(case_z/2)-5])
cube([sidethick+(2*adj),wallthick,10]);
}
}
// front cover pattern
if(front_cover_pattern != "solid" && case_design == "panel_nas") {
xvent_pos = pcb_width <= 100 ? -gap+3 : -gap+6;
if(front_cover_pattern == "hex_5mm" && hd_bays < 6) {
translate([xvent_pos,depth-3*(wallthick)+gap,hd_z_position-5])
vent_hex(round(width/3.85),round(hd_bays*(27.1+hd_space)/5.75),wallthick+4,5,1.5,"vertical");
}
if(front_cover_pattern == "hex_5mm" && hd_bays == 6) {
translate([xvent_pos,depth-3*(wallthick)+gap,hd_z_position])
vent_hex(round(width/3.85),round(hd_bays*(27.1+hd_space)/5.75),wallthick+4,5,1.5,"vertical");
}
if(front_cover_pattern == "hex_8mm") {
translate([-gap+4,depth-3*(wallthick)+gap,hd_z_position])
vent_hex(xvent8_adj,round(hd_bays*(27.1+hd_space)/5.75)-5,floorthick+4,8,1.5,"vertical");
}
if(front_cover_pattern == "linear_vertical") {
translate([-gap+4,depth-3*(wallthick)+gap,hd_z_position])
vent(wallthick,(case_z-2*(wallthick+gap)-20)/8,floorthick+4,1,1,
(width-2*(sidethick+gap))/5.35,"vertical");
translate([-gap+4,depth-3*(wallthick)+gap,case_z-(top_height+bottom_height+4*floorthick)-5])
vent(wallthick,(case_z-2*(wallthick+gap)-20)/8,floorthick+4,1,1,
(width-2*(sidethick+gap))/5.35,"vertical");
}
if(front_cover_pattern == "linear_horizontal") {
translate([wallthick+gap,depth-3*(wallthick)+gap,hd_z_position])
vent(width-2*(wallthick+gap+sidethick)-4,wallthick,floorthick+4,2,
(case_z-2*(wallthick+gap)-20)/20,1,"vertical");
translate([wallthick+gap,depth-3*(wallthick)+gap,
case_z-(top_height+bottom_height+4*floorthick)-20])
vent(width-4*(sidethick+gap),,wallthick,floorthick+4,2,
(case_z-2*(wallthick+gap)-20)/20,1,"vertical");
}
if(front_cover_pattern == "astroid") {
xast_adj = pcb_width <= 100 ? 8 : 6;
for(c=[xast_adj:12:case_z-20]) {
for(r=[8:12:width-8]) {
translate([r,depth-2*wallthick,c]) rotate([90,0,0])
linear_extrude(wallthick+5) import("./dxf/astroid_8mm.dxf");
}
}
}
}
}
}
if(side == "right") {
difference() {
if(case_design == "panel_nas" && pcb_width > 100) {
translate([pcb_width+sidethick+gap+case_offset_x,-(3*wallthick)-gap,-2*wallthick])
rotate([0,-90,0]) slab([case_z+(3*wallthick),depth+2*wallthick,sidethick],corner_fillet);
}
else {
translate([width-2*sidethick+gap,-(3*wallthick)-gap,-2*wallthick])
rotate([0,-90,0]) slab([case_z+(3*wallthick),depth+2*wallthick,sidethick],corner_fillet);
}
// rear edge top tab openings
translate([width-3*sidethick+gap-adj,-2*wallthick+adj,case_z-30])
cube([2*sidethick+2*adj,wallthick+tol,20]);
translate([width-3*sidethick+gap-adj,-(4*wallthick)+2*adj,case_z-20-tol])
cube([2*sidethick+(2*adj),2*wallthick,10+tol]);
// rear edge bottom tab openings
translate([width-3*sidethick+gap-adj,-2*wallthick+adj,20])
cube([2*sidethick+2*adj,wallthick+tol,20]);
translate([width-3*sidethick+gap-adj,-(4*wallthick)+2*adj,30-tol])
cube([2*sidethick+(2*adj),3*wallthick,10+tol]);
// front edge top tab openings
translate([width-3*sidethick+gap-adj,depth-(4*wallthick),case_z-30])
cube([2*sidethick+(2*adj),wallthick,20]);
translate([width-3*sidethick+gap-adj,depth-(4*wallthick),case_z-20-tol])
cube([2*sidethick+(2*adj),3*wallthick,10+tol]);
// front edge bottom tab openings
translate([width-3*sidethick+gap-adj,depth-(4*wallthick),20])
cube([2*sidethick+(2*adj),wallthick,20]);
translate([width-3*sidethick+gap-adj,depth-(4*wallthick),30-tol])
cube([2*sidethick+(2*adj),3*wallthick,10+tol]);
if(hd_bays > 3) {
// front edge middle tab openings
translate([width-3*sidethick+gap-adj,depth-(4*wallthick),(case_z/2)-5])
cube([2*sidethick+2*adj,wallthick+tol,20]);
translate([width-3*sidethick+gap-adj,depth-(4*wallthick),(case_z/2)-5+10])
cube([2*sidethick+(2*adj),3*wallthick,10+tol]);
// rear edge middle tab openings
translate([width-3*sidethick+gap-adj,-2*wallthick+adj,(case_z/2)-5])
cube([2*sidethick+2*adj,wallthick+tol,20]);
translate([width-3*sidethick+gap-adj,-(4*wallthick),(case_z/2)-5+10])
cube([2*sidethick+(2*adj),3*wallthick,10+tol]);
}
// hd holes for bays
if(hd_reverse == false) {
for( i=[0:1:hd_bays-1]) {
translate([(width-101.6)-(3*sidethick)-gap+adj,
-(3*wallthick)-gap+hd_y_position,hd_z_position+(hd_space+27.1)*i])
hd_holes(3.5, "portrait", "both", 2*sidethick+2);
}
}
else {
for( i=[0:1:hd_bays-1]) {
translate([width-(3*sidethick)-adj,-(3*wallthick)-gap+hd_y_position+147,
hd_z_position+(hd_space+27.1)*i])
rotate([0,0,180]) hd_holes(3.5, "portrait", "both", 2*sidethick+2);
}
}
// top edge front tab opening
translate([width-3*sidethick+gap-adj,depth-(3*wallthick)-gap-adj-30,
case_z-(2*floorthick)])
cube([2*sidethick+(2*adj),20,floorthick+tol]);
translate([width-3*sidethick+gap-adj,depth-(3*wallthick)-gap-adj-30-tol,
case_z-(2*floorthick)])
cube([2*sidethick+(2*adj),10+tol,(3*floorthick)+adj]);
// top edge rear tab opening
translate([width-3*sidethick+gap-adj,40-wallthick-gap-adj,
case_z-(2*floorthick)])
cube([2*sidethick+(2*adj),10+adj,floorthick+tol]);
translate([width-3*sidethick+gap-adj,30-wallthick-gap+adj-tol,
case_z-(2*floorthick)])
cube([2*sidethick+(2*adj),10+tol,(3*floorthick)+adj]);
// bottom edge front tab opening
translate([width-3*sidethick+gap-adj,depth-(3*wallthick)-gap-adj-30-tol,-tol])
cube([2*sidethick+2*adj,20+tol,floorthick+tol]);
translate([width-3*sidethick+gap-adj,depth-(3*wallthick)-gap-adj-30-tol,-(3*floorthick)+adj])
cube([2*sidethick+2*adj,10+tol,(3*floorthick)+adj]);
// bottom edge rear tab opening
translate([width-3*sidethick+gap-adj,30-wallthick-gap+adj-tol,-tol])
cube([2*sidethick+2*adj,20+tol,floorthick+tol]);
translate([width-3*sidethick+gap-adj,30-wallthick-gap+adj-tol,-(3*floorthick)+adj])
cube([2*sidethick+(2*adj),10+tol,(3*floorthick)+adj]);
}
}
if(side == "left") {
difference() {
translate([-gap,-(3*wallthick)-gap,-2*wallthick])
rotate([0,-90,0]) slab([case_z+(3*wallthick),depth+(2*wallthick),sidethick],corner_fillet);
// rear edge top tab openings
translate([-sidethick-gap-adj,-2*wallthick+adj,case_z-30])
cube([sidethick+2*adj,wallthick+tol,20]);
translate([-sidethick-gap-adj,-(4*wallthick),case_z-20-tol])
cube([sidethick+(2*adj),3*wallthick+adj,10+tol]);
// rear edge bottom tab openings
translate([-sidethick-gap-adj,-2*wallthick+adj,20])
cube([sidethick+2*adj,wallthick+tol,20]);
translate([-sidethick-gap-adj,-(4*wallthick),30-tol])
cube([sidethick+(2*adj),3*wallthick,10+tol]);
// front edge top tab openings
translate([-sidethick-gap-adj,depth-(4*wallthick),case_z-30])
cube([sidethick+(2*adj),wallthick,20]);
translate([-sidethick-gap-adj,depth-(4*wallthick),case_z-20-tol])
cube([sidethick+(2*adj),3*wallthick,10+tol]);
// front edge bottom tab openings
translate([-sidethick-gap-adj,depth-(4*wallthick),20])
cube([sidethick+(2*adj),wallthick,20]);
translate([-sidethick-gap-adj,depth-(4*wallthick),30-tol])
cube([sidethick+(2*adj),3*wallthick,10+tol]);
if(hd_bays > 3) {
// rear edge middle tab openings
translate([-sidethick-gap-adj,-2*wallthick+adj,(case_z/2)-5])
cube([sidethick+2*adj,wallthick+tol,20]);
translate([-sidethick-gap-adj,-(4*wallthick),(case_z/2)-5+10])
cube([sidethick+(2*adj),3*wallthick,10+tol]);
// front edge middle tab openings
translate([-sidethick-gap-adj,depth-(4*wallthick),(case_z/2)-5])
cube([sidethick+2*adj,wallthick+tol,20]);
translate([-sidethick-gap-adj,depth-(4*wallthick),(case_z/2)-5+10])
cube([sidethick+(2*adj),3*wallthick,10+tol]);
}
// hd holes for bays
if(hd_reverse == false) {
for( i=[0:1:hd_bays-1]) {
translate([-gap+adj,-(3*wallthick)-gap+hd_y_position,hd_z_position+(hd_space+27.1)*i])
hd_holes(3.5, "portrait", "both", sidethick+2);
}
}
else {
for( i=[0:1:hd_bays-1]) {
translate([101.6-gap+adj,-(3*wallthick)-gap+hd_y_position+147,
hd_z_position+(hd_space+27.1)*i])
rotate([0,0,180]) hd_holes(3.5, "portrait", "both", sidethick+2);
}
}
// top edge front tab openings
translate([-gap-sidethick-adj,depth-(3*wallthick)-gap-adj-30,
case_z-(2*floorthick)])
cube([sidethick+(2*adj),20,floorthick+tol]);
translate([-gap-sidethick-adj,depth-(3*wallthick)-gap-adj-30-tol,
case_z-(2*floorthick)])
cube([sidethick+(2*adj),10+tol,(3*floorthick)+adj]);
// top edge rear tab openings
translate([-gap-sidethick-adj,30-wallthick-gap+adj,
case_z-(2*floorthick)])
cube([sidethick+(2*adj),20,floorthick+tol]);
translate([-gap-sidethick-adj,30-wallthick-gap+adj-tol,
case_z-(2*floorthick)])
cube([sidethick+(2*adj),10+tol,(3*floorthick)+adj]);
// bottom edge front tab openings
translate([-gap-sidethick-adj,depth-(3*wallthick)-gap-adj-30,-tol])
cube([sidethick+(2*adj),20,floorthick+tol]);
translate([-gap-sidethick-adj,depth-(3*wallthick)-gap-adj-30-tol,-(2*floorthick)-adj])
cube([sidethick+(2*adj),10+tol,(3*floorthick)+adj]);
// bottom edge rear tab openings
translate([-gap-sidethick-adj,30-wallthick-gap+adj,-tol])
cube([sidethick+(2*adj),20,floorthick+tol]);
translate([-gap-sidethick-adj,30-wallthick-gap+adj-tol,-(2*floorthick)-adj])
cube([sidethick+(2*adj),10+tol,(3*floorthick)+adj]);
}
}
}
if(case_design == "tray_sides") {
if(side == "right") {
difference() {
@@ -256,13 +561,37 @@ module case_side(case_design, side) {
}
}
// 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);
if(case_design != "panel_nas") {
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);
}
}
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);
if(nas_sbc_location == "top") {
if(sbc_highlight == true) {
#translate([pcb_loc_x ,pcb_loc_y,case_z-(top_height+pcb_loc_z+(2*floorthick))])
sbc(sbc_model, cooling, fan_size, gpio_opening, uart_opening, true);
}
else {
translate([pcb_loc_x ,pcb_loc_y,case_z-(top_height+pcb_loc_z+(2*floorthick))])
sbc(sbc_model, cooling, fan_size, gpio_opening, uart_opening, true);
}
}
if(nas_sbc_location == "bottom") {
if(sbc_highlight == true) {
#translate([pcb_loc_x ,pcb_loc_y,bottom_height-pcb_z+pcb_loc_z])
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])
sbc(sbc_model, cooling, fan_size, gpio_opening, uart_opening, true);
}
}
}
// indents
if(indents == true) {
@@ -283,9 +612,18 @@ module case_side(case_design, side) {
loc_z = sbc_data[s[0]][i+6]+pcb_loc_z+pcbloc_z;
side = sbc_data[s[0]][i+7];
rotation = sbc_data[s[0]][i+8];
if(id == pcbid) {
if(id == pcbid && case_design != "panel_nas") {
indent(loc_x, loc_y, bottom_height+loc_z-adj, rotation[2], side, class, type, wallthick, gap, floorthick, pcb_z);
}
if(id == pcbid && case_design == "panel_nas" && nas_sbc_location == "bottom") {
indent(loc_x, loc_y, bottom_height+loc_z-adj, rotation[2], side, class,
type, 2*wallthick, gap, floorthick, pcb_z);
}
if(id == pcbid && case_design == "panel_nas" && nas_sbc_location == "top") {
indent(loc_x, loc_y, case_z-(top_height+pcb_loc_z+(2*floorthick))+.5, rotation[2],
side, class, type, 2*wallthick, gap, floorthick, pcb_z);
}
}
}
}

View File

@@ -70,6 +70,26 @@ module case_top(case_design) {
cube([8,wallthick+2*adj,floorthick]);
}
}
if(case_design == "panel_nas") {
x_adj = pcb_width > 100 ? width-2*sidethick : width-2*(gap+sidethick);
xtab_adj = pcb_width > 100 ? width-gap-2*sidethick-adj : width-gap-2*(gap+sidethick)-adj;
union() {
translate([-gap,-wallthick,case_z-2*floorthick])
cube([x_adj,depth-(2*wallthick),floorthick]);
translate([-gap-sidethick+(2*adj),depth-(3*wallthick)-gap-adj-20,
case_z-2*floorthick])
cube([sidethick+(2*adj),10,floorthick]);
translate([xtab_adj,depth-(3*wallthick)-gap-adj-20,
case_z-2*floorthick])
cube([sidethick+2*adj,10,floorthick]);
translate([-gap-sidethick+(2*adj),40-wallthick-gap+adj,
case_z-2*floorthick])
cube([sidethick+2*adj,10,floorthick]);
translate([xtab_adj,40-wallthick-gap+adj,
case_z-2*floorthick])
cube([sidethick+2*adj,10,floorthick]);
}
}
if(case_design == "stacked") {
translate([(width/2)-wallthick-gap,(depth/2)-wallthick-gap,
case_z-(floorthick/2)])
@@ -91,8 +111,8 @@ module case_top(case_design) {
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-wallthick,corner_fillet-wallthick,corner_fillet-wallthick,corner_fillet-wallthick],
top=[0,0,0,0],bottom=[0,0,0,0], $fn=90);
vertical=[corner_fillet-wallthick,corner_fillet-wallthick,corner_fillet-wallthick,
corner_fillet-wallthick],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];
@@ -208,13 +228,13 @@ module case_top(case_design) {
}
else {
difference() {
translate([pcb_width/2,pcb_depth/2,bottom_height+(top_height/2)-lip/2]) rotate([0,0,0])
translate([pcb_width/2,pcb_depth/2,bottom_height+(top_height/2)-lip/2])
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,
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])
translate([pcb_width/2,pcb_depth/2,bottom_height-adj-lip/2])
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
@@ -247,21 +267,22 @@ module case_top(case_design) {
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-wallthick,corner_fillet-wallthick,corner_fillet-wallthick,corner_fillet-wallthick],top=[0,0,0,0],
bottom=[edge_fillet,edge_fillet,edge_fillet,edge_fillet,edge_fillet], $fn=90);
vertical=[corner_fillet-wallthick,corner_fillet-wallthick,corner_fillet-wallthick,
corner_fillet-wallthick],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]);
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]);
translate([width-wallthick-gap-8.5,(depth/2)-((depth*.75)/2)+1.25-gap-wallthick,
case_z+floorthick-5.75]) cube([6,(depth*.75)-2,6]);
}
}
if(case_design == "fitted") {
@@ -312,23 +333,28 @@ module case_top(case_design) {
pcbhole_pos = sbc_data[s[0]][i+10][4];
case_z = case_design == "fitted" || case_design == "tray_sides" ||
case_design == "tray_vu5" || case_design == "tray_vu7" ? case_z+floorthick :
case_design == "snap" ? case_z+(2 * floorthick) : case_z;
case_design == "snap" ? case_z+(2 * floorthick) :
case_design == "panel_nas" ? case_z-floorthick : case_z;
if (class == "pcbhole" && id == 0 && pcbhole_pos == "left_rear" &&
top_rear_left_enable == true && top_standoff[6] != "blind") {
translate([pcbhole_x,pcbhole_y,case_z-(floorthick+adj)]) cylinder(d=top_standoff[4]-.2, h=floorthick+(2*adj));
translate([pcbhole_x,pcbhole_y,case_z-(floorthick+adj)])
cylinder(d=top_standoff[4]-.2, h=floorthick+(2*adj));
}
if (class == "pcbhole" && id == 0 && pcbhole_pos == "left_front" &&
top_front_left_enable == true && top_standoff[6] != "blind") {
translate([pcbhole_x,pcbhole_y,case_z-(floorthick+adj)]) cylinder(d=top_standoff[4]-.2, h=floorthick+(2*adj));
translate([pcbhole_x,pcbhole_y,case_z-(floorthick+adj)])
cylinder(d=top_standoff[4]-.2, h=floorthick+(2*adj));
}
if (class == "pcbhole" && id == 0 && pcbhole_pos == "right_rear" &&
top_rear_right_enable == true && top_standoff[6] != "blind") {
translate([pcbhole_x,pcbhole_y,case_z-(floorthick+adj)]) cylinder(d=top_standoff[4]-.2, h=floorthick+(2*adj));
translate([pcbhole_x,pcbhole_y,case_z-(floorthick+adj)])
cylinder(d=top_standoff[4]-.2, h=floorthick+(2*adj));
}
if (class == "pcbhole" && id == 0 && pcbhole_pos == "right_front" &&
top_front_right_enable == true && top_standoff[6] != "blind") {
translate([pcbhole_x,pcbhole_y,case_z-(floorthick+adj)]) cylinder(d=top_standoff[4]-.2, h=floorthick+(2*adj));
translate([pcbhole_x,pcbhole_y,case_z-(floorthick+adj)])
cylinder(d=top_standoff[4]-.2, h=floorthick+(2*adj));
}
}
}
@@ -354,7 +380,8 @@ module case_top(case_design) {
pcbhole_pos = sbc_data[s[0]][i+10][4];
case_z = case_design == "fitted" || case_design == "tray_sides" ||
case_design == "tray_vu5" || case_design == "tray_vu7" ? case_z+floorthick :
case_design == "snap" ? case_z+(2 * floorthick) : case_z;
case_design == "snap" ? case_z+(2 * floorthick) :
case_design == "panel_nas" ? case_z-floorthick : case_z;
if(id == pcbid && id != 0 && pcbclass == "pcbhole") {
if (pcbclass == "pcbhole" && pcbhole_pos == "left_rear" &&
@@ -391,7 +418,8 @@ module case_top(case_design) {
case_z = case_design == "fitted" || case_design == "tray_sides" ||
case_design == "tray_vu5" || case_design == "tray_vu7" ? case_z+floorthick :
case_design == "snap" ? case_z+(2 * floorthick) : case_z;
case_design == "snap" ? case_z+(2 * floorthick) :
case_design == "panel_nas" ? case_z-floorthick : case_z;
// right-rear standoff
if((width-pcb_loc_x-pcb_width-(gap+2*wallthick) >= ext_top_standoff_support_size ||
@@ -434,26 +462,63 @@ module case_top(case_design) {
}
// top cover pattern
if(top_cover_pattern != "solid") {
xvent8_adj = pcb_width > 100 ? width/5.5 : width/6;
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(case_design == "panel_nas") {
translate([6,5,case_z-(2*floorthick)])
vent_hex((width-10)/3.75,(depth-10)/7,floorthick+4,5,1.5,"horizontal");
}
else {
translate([1,0,case_z-(2*floorthick)]) 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 == "hex_8mm") {
if(case_design == "panel_nas") {
translate([-gap+5,6,case_z-(2*floorthick)]) vent_hex(xvent8_adj,depth/9.5,floorthick+4,8,1.5,"horizontal");
}
else {
translate([1,2,case_z-(2*floorthick)]) 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(case_design == "panel_nas") {
translate([wallthick+gap,wallthick,case_z-(2*floorthick)])
vent(wallthick,depth-6*wallthick-gap,floorthick+4,1,1,(width-2*(sidethick+gap))/5.35,"horizontal");
}
else {
translate([0,-gap,case_z-(2*floorthick)])
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(case_design == "panel_nas") {
translate([wallthick+gap,wallthick,case_z-(2*floorthick)])
vent(width-4*(sidethick+gap),wallthick,floorthick+4,1,
(depth-2*(wallthick-gap))/4.35,1,"horizontal");
}
else {
translate([-gap,-gap,case_z-(2*floorthick)])
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");
xast_adj = pcb_width <= 100 ? 8 : 6;
if(case_design == "panel_nas") {
for(c=[xast_adj:12:depth-16]) {
for(r=[8:12:width-16]) {
translate([r,c,case_z-(2*floorthick)-adj])
linear_extrude(floorthick+5) import("./dxf/astroid_8mm.dxf");
}
}
}
}
else {
for(c=[3:12:depth-8]) {
for(r=[4:12:width-8]) {
translate([r,c,case_z-(2*floorthick)-adj])
linear_extrude(floorthick+5) import("./dxf/astroid_8mm.dxf");
}
}
}
}
}
// rear io shield opening for standard form motherboards
@@ -485,7 +550,8 @@ module case_top(case_design) {
pcbhole_pos = sbc_data[s[0]][i+10][4];
case_z = case_design == "fitted" || case_design == "tray_sides" ||
case_design == "tray_vu5" || case_design == "tray_vu7" ? case_z+floorthick :
case_design == "snap" ? case_z+(2 * floorthick) : case_z;
case_design == "snap" ? case_z+(2 * floorthick) :
case_design == "panel_nas" ? case_z-floorthick : case_z;
stand_off_adj = case_design == "fitted" || case_design == "tray_sides" ||
case_design == "tray_vu5" || case_design == "tray_vu7" ? floorthick :
case_design == "snap" ? 2 * floorthick : 0;
@@ -586,7 +652,8 @@ module case_top(case_design) {
pcbhole_pos = sbc_data[s[0]][i+10][4];
case_z = case_design == "fitted" || case_design == "tray_sides" ||
case_design == "tray_vu5" || case_design == "tray_vu7" ? case_z+floorthick :
case_design == "snap" ? case_z+(2 * floorthick) : case_z;
case_design == "snap" ? case_z+(2 * floorthick) :
case_design == "panel_nas" ? case_z-floorthick : case_z;
stand_off_adj = case_design == "fitted" || case_design == "tray_sides" ||
case_design == "tray_vu5" || case_design == "tray_vu7" ? floorthick :
case_design == "snap" ? 2 * floorthick : 0;
@@ -674,7 +741,8 @@ module case_top(case_design) {
case_z = case_design == "fitted" || case_design == "tray_sides" ||
case_design == "tray_vu5" || case_design == "tray_vu7" ? case_z+floorthick :
case_design == "snap" ? case_z+(2 * floorthick) : case_z;
case_design == "snap" ? case_z+(2 * floorthick) :
case_design == "panel_nas" ? case_z-floorthick : case_z;
stand_off_adj = case_design == "fitted" || case_design == "tray_sides" ||
case_design == "tray_vu5" || case_design == "tray_vu7" ? floorthick :
case_design == "snap" ? 2 * floorthick : 0;
@@ -800,22 +868,48 @@ module case_top(case_design) {
// 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);
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);
#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);
if(case_design != "panel_nas") {
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);
}
}
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);
if(nas_sbc_location == "top") {
if(sbc_highlight == true) {
#translate([pcb_loc_x ,pcb_loc_y,case_z-(top_height+pcb_loc_z+(2*floorthick))])
sbc(sbc_model, cooling, fan_size, gpio_opening, uart_opening, true);
}
else {
translate([pcb_loc_x ,pcb_loc_y,case_z-(top_height+pcb_loc_z+(2*floorthick))])
sbc(sbc_model, cooling, fan_size, gpio_opening, uart_opening, true);
}
}
if(nas_sbc_location == "bottom") {
if(sbc_highlight == true) {
#translate([pcb_loc_x ,pcb_loc_y,bottom_height-pcb_z+pcb_loc_z])
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])
sbc(sbc_model, cooling, fan_size, gpio_opening, uart_opening, true);
}
}
}
// indents
if(indents == true) {
@@ -837,7 +931,8 @@ module case_top(case_design) {
side = sbc_data[s[0]][i+7];
rotation = sbc_data[s[0]][i+8];
if(id == pcbid) {
indent(loc_x, loc_y, bottom_height+loc_z-adj, rotation[2], side, class, type, wallthick, gap, floorthick, pcb_z);
indent(loc_x, loc_y, bottom_height+loc_z-adj, rotation[2],
side, class, type, wallthick, gap, floorthick, pcb_z);
}
}
}
@@ -869,7 +964,8 @@ module case_top(case_design) {
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]]);
parametric_move_add(type,loc_x,loc_y,loc_z,face,rotation,
parametric,size,data,[false,mask[1],mask[2],mask[3]]);
}
}
}

View File

@@ -55,7 +55,7 @@ module sub(type, loc_x, loc_y, loc_z, face, rotation, size, data, 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]);
translate([loc_x,loc_y,loc_z]) rotate(rotation) hd_bottom_holes(data[0],data[1],data[2],data[3],data[4]);
}
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]);

File diff suppressed because it is too large Load Diff

View File

@@ -40,7 +40,7 @@ sbc_highlight = false;
// enable highlight for accessory subtractive geometry
accessory_highlight = false;
// base case design
case_design = "shell"; // [shell,panel,stacked,tray,tray_sides,tray_vu5,tray_vu7,round,hex,snap,fitted,paper_split-top,paper_full-top,adapter_ssi-eeb,adapter_ssi-ceb,adapter_atx,adapter_micro-atx,adapter_dtx,adapter_flex-atx,adapter_mini-dtx,adapter_mini-itx,adapter_mini-itx_thin,adapter_mini-stx,adapter_mini-stx_thin]
case_design = "shell"; // [shell,panel,panel_nas,stacked,tray,tray_sides,tray_vu5,tray_vu7,round,hex,snap,fitted,paper_split-top,paper_full-top,adapter_ssi-eeb,adapter_ssi-ceb,adapter_atx,adapter_micro-atx,adapter_dtx,adapter_flex-atx,adapter_mini-dtx,adapter_mini-itx,adapter_mini-itx_thin,adapter_mini-stx,adapter_mini-stx_thin]
// raises top mm in model view or < 0 = off
raise_top = 0; // [-1:100]
@@ -83,17 +83,17 @@ case_offset_x = 0; //[0:.01:300]
// additional y axis case size
case_offset_y = 0; //[0:.01:300]
// additional z axis case top size
case_offset_tz = 0; //[-10:.01:100]
case_offset_tz = 0; //[-50:.01:300]
// additional z axis case bottom size
case_offset_bz = 0; //[0:.01:100]
case_offset_bz = 0; //[-50:.01:300]
// case wall thickness
wallthick = 2; //[1:.01:5]
// case floor thickness
floorthick = 2; //[1:.01:5]
// side wall thickness for tray_side cases only
sidethick = 2; //[1:.01:5]
wallthick = 2; //[1:.25:5]
// case floor and ceiling thickness
floorthick = 2; //[1:.25:5]
// side wall thickness for tray_side and panel_nas cases only
sidethick = 2; //[1:.25:5]
// distance between pcb and case
gap = 1; //[.5:.01:5]
gap = 1; //[.5:.25:5]
// corner fillets
corner_fillet = 3; //[0:.5:9]
// edge fillets
@@ -104,11 +104,24 @@ tol = .25; //[-.5:.0625:.5]
/* [Fan and Vent Openings] */
// top cover pattern
top_cover_pattern = "solid"; //[solid,hex_5mm,hex_8mm,linear_vertical,linear_horizontal,astroid]
// front cover pattern for nas cases
front_cover_pattern = "solid"; //[solid,hex_5mm,hex_8mm,linear_vertical,linear_horizontal,astroid]
// bottom cover pattern
bottom_cover_pattern = "solid"; //[solid,hex_5mm,hex_8mm,linear_vertical,linear_horizontal,astroid]
// heatsink opening
cooling = "default"; // [default,none,open,fan_open,fan_1,fan_2,fan_hex,vent,vent_hex_5mm,vent_hex_8mm,custom]
fan_size = 0; // [0,25,30,40,50,60,70,80,92]
// number of rear fans for nas cases
rear_fan = 1; // [1:2]
// rear fan x-axis center
rear_fan_center = false; // [true,false]
// rear fan opening
rear_cooling = "fan_hex"; // [fan_open,fan_1,fan_2,fan_hex,custom]
rear_fan_size = 80; // [0,25,30,40,50,60,70,80,92]
// rear fan z-axis position
rear_fan_position = 0; // [0:1:300]
// space between dual rear fans
rear_dualfan_spacing = 6; // [0:1:50]
/* [Bottom Access Panel] */
bottom_access_panel_enable = false;
@@ -124,8 +137,22 @@ gpio_opening = "default"; // [default,none,open,block,knockout,vent]
uart_opening = "default"; // [default,none,open,knockout]
// enable indentations around io openings
indents = true;
// nas sbc location
nas_sbc_location = "top"; // ["top","bottom"]
// number of nas drive bays
hd_bays = 2; // [1:6]
// rotate hd 180 degrees in the z-axis
hd_reverse = false; // [true, false]
// center hd in the x-axis
hd_center = false; // [true, false]
// distance between drives
hd_space = 10; // [1:50]
hd_y_position = 25; // [0:300]
hd_z_position = 40; // [0:300]
// case accessory group to load
accessory_name = "none"; // ["none", "hk_uart", "c4_shell_boombox", "c4_desktop_lcd3.5", "c4_deskboom_lcd3.5", "c4_panel_boombox", "c4_panel_lcd3.5", "c4_tray_boombox", "c4_round", "c4_hex", "xu4_shifter_shield", "xu4_keyhole", "hc4_shell_drivebox2.5", "hc4_shell_drivebox2.5v", "hc4_shell_drivebox3.5", "hc4_tray_drivebox2.5", "m2_shell", "m2_eyespi_eink1.54", "m2_eyespi_lcd2.8", "m1s_shell_nvme", "m1s_shell_ups", "m1s_tray_nvme", "m1_tray_ssd", "m1_fitted_pizzabox2.5", "m1_fitted_pizzabox3.5", "h3_shell", "h3_shell_router", "h3_lowboy", "h3_lowboy_router", "h3_ultimate", "h3_ultimate2", "show2_shell", "rpi5_m2hat", "rpi5_bottom_m2hat", "rock5b", "adapter_mini-stx_m1s", "cs_solarmeter", "n2l_env_sensors", "avr_env_sensors", "adafruit_solar_charger"]
accessory_name = "none"; // ["none", "hk_uart", "c4_shell_boombox", "c4_desktop_lcd3.5", "c4_deskboom_lcd3.5", "c4_panel_boombox", "c4_panel_lcd3.5", "c4_tray_boombox", "c4_round", "c4_hex", "xu4_shifter_shield", "xu4_keyhole", "hc4_panel_nas", "hc4_shell_drivebox2.5", "hc4_shell_drivebox2.5v", "hc4_shell_drivebox3.5", "hc4_tray_drivebox2.5", "m2_shell", "m2_eyespi_eink1.54", "m2_eyespi_lcd2.8", "m1s_shell_nvme", "m1s_shell_ups", "m1s_tray_nvme", "m1_tray_ssd", "m1_fitted_pizzabox2.5", "m1_fitted_pizzabox3.5", "h3_shell", "h3_shell_router", "h3_lowboy", "h3_lowboy_router", "h3_panel_nas", "h3_ultimate", "h3_ultimate2", "h4_panel_nas", "show2_shell", "rpi5_m2hat", "rpi5_bottom_m2hat", "rock5b", "adapter_mini-stx_m1s", "nas", "cs_solarmeter", "n2l_env_sensors", "avr_env_sensors", "adafruit_solar_charger"]
// sbc information text color
text_color = "Green"; // [Green, Black, Dimgrey, White, Yellow, Orange, Red, DarkbBlue]
// sbc information text font
@@ -354,13 +381,17 @@ pcb_color = sbc_data[s[0]][11][1];
pcb_radius = sbc_data[s[0]][11][0];
pcb_z = sbc_model == "ssi-eeb" || sbc_model == "ssi-ceb" || sbc_model == "atx" || sbc_model == "micro-atx" || sbc_model == "dtx" || sbc_model == "flex-atx" || sbc_model == "mini-dtx" || sbc_model == "mini-itx" || sbc_model == "mini-itx_thin" || sbc_model == "mini-stx" || sbc_model == "mini-stx_thin" || sbc_model == "nano-itx" || sbc_model == "nuc" || sbc_model == "pico-itx" ? pcb_z_orig + standard_motherboard_thickness : pcb_z_orig;
width = pcb_width+2*(wallthick+gap)+case_offset_x;
depth = pcb_depth+2*(wallthick+gap)+case_offset_y;
width = case_design == "panel_nas" && pcb_width <= 100 ? pcb_width+2*(sidethick+gap)+case_offset_x+(101.6-pcb_width) : case_design == "panel_nas" && pcb_width > 100 ? pcb_width+2*(sidethick+gap)+case_offset_x : pcb_width+(2*(wallthick+gap))+case_offset_x;
depth = case_design == "panel_nas" ? pcb_depth+2*(wallthick+gap)+case_offset_y + 147-pcb_depth+hd_y_position : pcb_depth+2*(wallthick+gap)+case_offset_y;
top_height = pcb_tmaxz+floorthick+case_offset_tz+pcb_loc_z;
bottom_height = (case_design == "tray" || case_design == "tray_vu5" || case_design == "tray_vu7" || case_design == "tray_sides") ? pcb_z+pcb_bmaxz+floorthick+case_offset_bz+4 : pcb_z+pcb_bmaxz+floorthick+case_offset_bz;
case_z = bottom_height+top_height;
case_z = case_design == "panel_nas" ? bottom_height+top_height+hd_z_position+(hd_bays * (hd_space + 26.1)) : bottom_height+top_height;
case_diameter = sqrt(pow(width-wallthick-gap,2)+pow(depth-wallthick-gap,2));
hex_diameter = sqrt(pow(width+2*(wallthick+gap),2)+pow(depth+2*(wallthick+gap),2));
//hd_spacer = case_design == "panel_nas" && pcb_width > 100 ? (pcb_width+case_offset_x+2*gap)-101.6 :
// case_design == "panel_nas" && pcb_width <= 100 ? (width-2*(sidethick+gap)-101.6) : 0;
hd_spacer = case_design == "panel_nas" && pcb_width > 100 ? (pcb_width+case_offset_x+2*gap)-101.6 :
case_design == "panel_nas" && pcb_width <= 100 ? (width-2*(sidethick+gap)-101.6) : 0;
/* [Hidden] */
top_standoff = [top_standoff_size,
@@ -456,16 +487,25 @@ if (view == "platter") {
case_bottom(case_design);
translate([0,(2*depth)+20,case_z]) rotate([180,0,0]) case_top(case_design);
}
if(case_design == "panel") {
if(case_design == "panel" || case_design == "panel_nas") {
case_bottom(case_design);
translate([0,(2*depth)+5,case_z]) rotate([180,0,0]) case_top(case_design);
translate([width+25,0,-gap]) rotate([-90,0,0]) case_side(case_design,"rear");
translate([width+25,2*(case_z)+10,-depth+wallthick+gap+floorthick])
rotate([90,0,0]) case_side(case_design,"front");
translate([2.5*width,0,-width+(2*wallthick)+gap]) rotate([0,-90,-90])
translate([2.5*width,0,-width+(3*sidethick)+gap]) rotate([0,-90,-90])
case_side(case_design,"right");
translate([-20,0,-gap]) rotate([0,90,90])
case_side(case_design,"left");
// nas hd spacers
if(case_design == "panel_nas" && (pcb_width > 100 || width > 112)) {
if(hd_center == false) {
translate([0,-35,0]) rotate([270,0,0]) cableholder_spacer(hd_spacer-9.4);
}
else {
translate([0,-35,0]) rotate([270,0,0]) cableholder_spacer(hd_spacer/2-9.4);
}
}
}
if(case_design == "stacked") {
case_bottom(case_design);
@@ -545,12 +585,6 @@ if (view == "platter") {
if(case_design == "paper_split-top" || case_design == "paper_full-top") {
case_folded(case_design);
}
if(case_design == "tray" || case_design == "tray_vu5" || case_design == "tray_vu7" || case_design == "tray_sides") {
echo(Case_Width=width+2*sidethick,Depth=depth,Top=top_height,Bottom=bottom_height);
}
else {
echo(Case_Width=width,Depth=depth,Top=top_height,Bottom=bottom_height);
}
}
// model view
@@ -634,6 +668,181 @@ if (view == "model") {
sbc(sbc_model, cooling, fan_size, gpio_opening, uart_opening, false);
}
}
if(case_design == "panel_nas") {
if(lower_bottom >= 0) {
color("grey",1) translate([0,0,-lower_bottom]) case_bottom(case_design);
}
if(raise_top >= 0) {
color("grey",1) translate([0,0,raise_top])case_top(case_design);
}
if(move_front >= 0) {
color("grey",1) translate([0,move_front,0]) case_side(case_design,"front");
}
if(move_rear >= 0) {
color("grey",1) translate([0,-move_rear,0]) case_side(case_design,"rear");
}
if(move_rightside >= 0) {
color("dimgrey",1) translate([move_rightside,0,0]) case_side(case_design,"right");
}
if(move_leftside >= 0) {
color("dimgrey",1) translate([-move_leftside,0,0]) case_side(case_design,"left");
}
if(sbc_off == false && nas_sbc_location == "bottom") {
translate([pcb_loc_x ,pcb_loc_y,bottom_height-pcb_z+pcb_loc_z])
sbc(sbc_model, cooling, fan_size, gpio_opening, uart_opening, false);
}
if(sbc_off == false && nas_sbc_location == "top") {
translate([pcb_loc_x ,pcb_loc_y,case_z-(top_height+pcb_loc_z+(2*floorthick))+.5])
sbc(sbc_model, cooling, fan_size, gpio_opening, uart_opening, false);
}
for( i=[0:1:hd_bays-1]) {
if(hd_reverse == false) {
if(hd_center == false) {
translate([-gap,-(3*wallthick)-gap+hd_y_position,hd_z_position+(hd_space+27.1)*i])
hd35("portrait", [false,0,0,"default"]);
if(pcb_width > 100 || width-2*(sidethick+gap) > 101.6) {
translate([101.6-gap+hd_spacer-9.4,
28.5-(3*wallthick)-gap+hd_y_position+101.6,
hd_z_position+6+(hd_space+27.1)*i])
cableholder_spacer(hd_spacer-9.4);
translate([101.6-gap+hd_spacer-9.4,
-31-(3*wallthick)-gap+hd_y_position+101.6,
hd_z_position+6+(hd_space+27.1)*i])
cableholder_spacer(hd_spacer-9.4);
translate([101.6-gap+hd_spacer-9.4,
-73-(3*wallthick)-gap+hd_y_position+101.6,
hd_z_position+6+(hd_space+27.1)*i])
cableholder_spacer(hd_spacer-9.4);
}
}
if(hd_center == true) {
translate([-gap+hd_spacer/2,
-(3*wallthick)-gap+hd_y_position,hd_z_position+(hd_space+27.1)*i])
hd35("portrait", [false,0,0,"default"]);
if(pcb_width > 100 || width-2*(sidethick+gap) > 101.6) {
// right side spacers
translate([101.6-gap+hd_spacer-9.4,
28.5-(3*wallthick)-gap+hd_y_position+101.6,
hd_z_position+6.5+(hd_space+27.1)*i])
cableholder_spacer(hd_spacer/2-9.4);
translate([101.6-gap+hd_spacer-9.4,
-31-(3*wallthick)-gap+hd_y_position+101.6,
hd_z_position+6.5+(hd_space+27.1)*i])
cableholder_spacer(hd_spacer/2-9.4);
translate([101.6-gap+hd_spacer-9.4,
-73-(3*wallthick)-gap+hd_y_position+101.6,
hd_z_position+6.5+(hd_space+27.1)*i])
cableholder_spacer(hd_spacer/2-9.4);
// left side spacers
translate([-(hd_spacer/2-9.4)-gap+hd_spacer/2,
28.5-(3*wallthick)-gap+hd_y_position+101.6,
hd_z_position+6.5+(hd_space+27.1)*i]) rotate([0,0,180])
cableholder_spacer(hd_spacer/2-9.4);
translate([-(hd_spacer/2-9.4)-gap+hd_spacer/2,
-31-(3*wallthick)-gap+hd_y_position+101.6,
hd_z_position+6.5+(hd_space+27.1)*i]) rotate([0,0,180])
cableholder_spacer(hd_spacer/2-9.4);
translate([-(hd_spacer/2-9.4)-gap+hd_spacer/2,
-73-(3*wallthick)-gap+hd_y_position+101.6,
hd_z_position+6.5+(hd_space+27.1)*i]) rotate([0,0,180])
cableholder_spacer(hd_spacer/2-9.4);
}
}
}
if(hd_reverse == true) {
if(hd_center == false) {
translate([101.6-gap,-(3*wallthick)-gap+hd_y_position+147,
hd_z_position+(hd_space+27.1)*i])
rotate([0,0,180]) hd35("portrait", [false,0,0,"default"]);
if(pcb_width > 100 || width-2*(sidethick+gap) > 101.6) {
translate([101.6-gap+hd_spacer-9.4,
17-(3*wallthick)-gap+hd_y_position+101.6,
hd_z_position+6.5+(hd_space+27.1)*i])
cableholder_spacer(hd_spacer-9.4);
translate([101.6-gap+hd_spacer-9.4,
-25-(3*wallthick)-gap+hd_y_position+101.6,
hd_z_position+6.5+(hd_space+27.1)*i])
cableholder_spacer(hd_spacer-9.4);
translate([101.6-gap+hd_spacer-9.4,
-84.5-(3*wallthick)-gap+hd_y_position+101.6,
hd_z_position+6.5+(hd_space+27.1)*i])
cableholder_spacer(hd_spacer-9.4);
}
}
if(hd_center == true) {
translate([101.6-gap+hd_spacer/2,
-(3*wallthick)-gap+hd_y_position+147,
hd_z_position+(hd_space+27.1)*i])
rotate([0,0,180]) hd35("portrait", [false,0,0,"default"]);
if(pcb_width > 100 || width-2*(sidethick+gap) > 101.6) {
// right side spacers
translate([101.6-gap+hd_spacer-9.4,
17-(3*wallthick)-gap+hd_y_position+101.6,
hd_z_position+6.5+(hd_space+27.1)*i])
cableholder_spacer(hd_spacer/2-9.4);
translate([101.6-gap+hd_spacer-9.4,
-25-(3*wallthick)-gap+hd_y_position+101.6,
hd_z_position+6.5+(hd_space+27.1)*i])
cableholder_spacer(hd_spacer/2-9.4);
translate([101.6-gap+hd_spacer-9.4,
-84.5-(3*wallthick)-gap+hd_y_position+101.6,
hd_z_position+6.5+(hd_space+27.1)*i])
cableholder_spacer(hd_spacer/2-9.4);
// left side spacers
translate([-(hd_spacer/2-9.4)-gap+hd_spacer/2,
17-(3*wallthick)-gap+hd_y_position+101.6,
hd_z_position+6.5+(hd_space+27.1)*i]) rotate([0,0,180])
cableholder_spacer(hd_spacer/2-9.4);
translate([-(hd_spacer/2-9.4)-gap+hd_spacer/2,
-25-(3*wallthick)-gap+hd_y_position+101.6,
hd_z_position+6.5+(hd_space+27.1)*i]) rotate([0,0,180])
cableholder_spacer(hd_spacer/2-9.4);
translate([-(hd_spacer/2-9.4)-gap+hd_spacer/2,
-84.5-(3*wallthick)-gap+hd_y_position+101.6,
hd_z_position+6.5+(hd_space+27.1)*i]) rotate([0,0,180])
cableholder_spacer(hd_spacer/2-9.4);
}
}
}
}
if(move_rear >= 0) {
fan_model = rear_fan_size == 92 ? "box92x10" : rear_fan_size == 80 ? "box80x10" : rear_fan_size == 60 ? "box60x10" : "box40x10";
if(rear_fan == 1 || rear_fan == 2) {
if(rear_fan_center == false) {
translate([-1+(101.6-rear_fan_size)/2,10-wallthick,rear_fan_position])
rotate([90,0,0]) fans(fan_model,[false,0,0,"default"]);
}
if(rear_fan_center == true) {
translate([-1+(101.6-rear_fan_size)/2+(width-2*(sidethick+gap)-101.6)/2,
10-wallthick,rear_fan_position]) rotate([90,0,0])
fans(fan_model,[false,0,0,"default"]);
}
}
if(rear_fan == 2) {
if(rear_fan_center == false) {
translate([-1+(101.6-rear_fan_size)/2,10-wallthick,
rear_fan_position+rear_dualfan_spacing+rear_fan_size])
rotate([90,0,0]) fans(fan_model,[false,0,0,"default"]);
}
if(rear_fan_center == true) {
translate([-1+(101.6-rear_fan_size)/2+(width-2*(sidethick+gap)-101.6)/2,
10-wallthick,rear_fan_position+rear_dualfan_spacing+rear_fan_size])
rotate([90,0,0]) fans(fan_model,[false,0,0,"default"]);
}
}
}
}
if(case_design == "stacked") {
if(lower_bottom >= 0) {
color("grey",1) translate([0,0,-lower_bottom]) case_bottom(case_design);
@@ -869,12 +1078,6 @@ if (view == "model") {
rotate([90, 0, 0]) text(str(sbc_data[s[0]][1][i]), 5, font = text_font);
}
}
if(case_design == "tray" || case_design == "tray_vu5" || case_design == "tray_vu7" || case_design == "tray_sides") {
echo(Case_Width=width+2*sidethick,Depth=depth,Top=top_height,Bottom=bottom_height);
}
else {
echo(Case_Width=width,Depth=depth,Top=top_height,Bottom=bottom_height);
}
}
//}
// part
@@ -883,7 +1086,7 @@ if (view == "part") {
if(case_design == "shell") {
translate([0,depth,case_z]) rotate([180,0,0]) case_top(case_design);
}
if(case_design == "panel") {
if(case_design == "panel" || case_design == "panel_nas") {
translate([0,depth,case_z]) rotate([180,0,0]) case_top(case_design);
}
if(case_design == "stacked") {
@@ -914,18 +1117,18 @@ if (view == "part") {
}
}
if(individual_part == "front") {
if(case_design == "panel") {
if(case_design == "panel" || case_design == "panel_nas") {
translate([0,case_z,-depth+wallthick+gap+floorthick])
rotate([90,0,0]) case_side(case_design,"front");
}
}
if(individual_part == "rear") {
if(case_design == "panel") {
if(case_design == "panel" || case_design == "panel_nas") {
translate([0,0,-gap]) rotate([-90,0,0]) case_side(case_design,"rear");
}
}
if(individual_part == "right") {
if(case_design == "panel") {
if(case_design == "panel" || case_design == "panel_nas") {
translate([gap,0,-width+(2*wallthick)+gap]) rotate([0,-90,-90])
case_side(case_design,"right");
}
@@ -934,7 +1137,7 @@ if (view == "part") {
}
}
if(individual_part == "left") {
if(case_design == "panel") {
if(case_design == "panel" || case_design == "panel_nas") {
translate([depth,0,-gap]) rotate([0,90,90])
case_side(case_design,"left");
}
@@ -949,6 +1152,10 @@ if (view == "part") {
}
}
if(individual_part == "accessories") {
// nas hd spacers
if(case_design == "panel_nas" && (pcb_width > 100 || width > 101.6)) {
rotate([270,0,0]) cableholder_spacer(hd_spacer-9.4);
}
// ui access panel
if(bottom_access_panel_enable == true) {
if(access_panel_rotation == 0) {
@@ -1002,10 +1209,16 @@ if (view == "part") {
}
}
}
if(case_design == "tray" || case_design == "tray_vu5" || case_design == "tray_vu7" || case_design == "tray_sides") {
echo(width=width+2*sidethick,depth=depth,top=top_height,bottom=bottom_height);
}
if(case_design == "tray" || case_design == "tray_vu5" || case_design == "tray_vu7" || case_design == "tray_sides") {
echo(width=width+2*sidethick,depth=depth,top=top_height,bottom=bottom_height);
}
else {
if(case_design == "panel_nas") {
echo(width=width+hd_spacer,depth=depth,top=top_height,bottom=bottom_height, height=case_z+(3*wallthick));
echo(drive_spacer=hd_spacer);
}
else {
echo(width=width,depth=depth,top=top_height,bottom=bottom_height);
}
}
echo(width=width,depth=depth,top=top_height,bottom=bottom_height);
}
}

View File

@@ -190,6 +190,10 @@ accessory_data = [
"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_panel_nas",
"add2","hk_hc4_oled_holder",35,178,2.99,"bottom",[0,0,0],["case",true,true,false],[0,0,2],[0],[true,10,2,"default"],
"model","hk_hc4_oled",35,178,2.99,"bottom",[0,0,0],["case",true,true,false],[0,0,0],[0],[true,10,2,"default"]],
["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"],
@@ -407,6 +411,9 @@ accessory_data = [
"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_panel_nas",
"model","hk_pwr_button",20,150,137,"top",[0,0,0],["case",true,true,true],[0,0,0],[0],[true,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"],
@@ -459,6 +466,10 @@ accessory_data = [
"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"]],
// Odroid-H4
["h4_panel_nas",
"model","hk_pwr_button",20,150,206,"top",[0,0,0],["case",true,true,true],[0,0,0],[0],[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"]],
@@ -499,6 +510,9 @@ accessory_data = [
"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"]],
// NAS Case
["nas",
"model","hd35",-1,-67,40,"bottom",[0,0,0],["case",true,true,false],[0,0,0],["portrait"],[true,20,2,"both"]],
// circuitsetup solar energy meter
["cs_solarmeter",

View File

@@ -51,4 +51,3 @@ include <./lib/oem_adafruit.scad>;
include <./lib/oem_hk.scad>;
include <./lib/oem_rpi.scad>;
include <./lib/standoff.scad>;
include <./lib/vent.scad>;