minor gui format change, lib/vent.scad replaced

This commit is contained in:
Edward Kisiel
2025-04-25 22:00:34 -04:00
parent 43f7e0f476
commit 2979144e28
3 changed files with 72 additions and 9 deletions

63
lib/vent.scad Normal file
View 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);
}
}
}

View File

@@ -159,7 +159,6 @@ accessory_name = "none"; // ["none", "hk_uart", "c4_shell_boombox", "c4_desktop_
text_color = "Green"; // [Green, Black, Dimgrey, White, Yellow, Orange, Red, DarkbBlue]
// sbc information text font
text_font = "Nimbus Mono PS"; // [Nimbus Mono PS, Liberation Mono, Noto Sans Mono]
/* [SBC Top Standoff Global Settings] */
// enable case top standoffs
sbc_top_standoffs = true;
@@ -232,7 +231,7 @@ bottom_front_right_enable = true;
bottom_front_right_adjust = 0; //[-30:.01:30]
bottom_front_right_support = "front"; //[none,left,rear,front,right]
/* [Extended Case Top Standoffs] */
/* [ Extended Case Top Standoffs] */
// enable case extended standoffs
ext_top_standoffs = false;
ext_top_standoff_reverse = true;
@@ -248,7 +247,7 @@ ext_top_standoff_support_height = 4; //[0:.01:50]
ext_top_standoff_insert = false;
ext_top_standoff_insert_dia = 4.2; //.01
ext_top_standoff_insert_height = 5.1; //.01
/* [Extended Case Top Standoff Individual Settings] */
/* [ Extended Case Top Standoff Individual Settings] */
// extended case top - lower left standoff settings
ext_top_rear_left_enable = true;
ext_top_rear_left_adjust = 0; //[-20:.01:20]
@@ -266,7 +265,7 @@ ext_top_front_right_enable = true;
ext_top_front_right_adjust = 0; //[-20:.01:20]
ext_top_front_right_support = "front"; //[none,left,rear,front,right]
/* [Extended Case Bottom Standoffs] */
/* [ Extended Case Bottom Standoffs] */
// enable case bottom extended standoffs
ext_bottom_standoffs = false;
ext_bottom_standoff_reverse = false;
@@ -283,7 +282,7 @@ ext_bottom_standoff_insert = false;
ext_bottom_standoff_insert_dia = 4.2; //.01
ext_bottom_standoff_insert_height = 5.1; //.01
/* [Extended Case Bottom Standoff Individual Settings] */
/* [ Extended Case Bottom Standoff Individual Settings] */
// extended case bottom - rear left standoff settings
ext_bottom_rear_left_enable = true;
ext_bottom_rear_left_adjust = 0; //[-20:.01:20]
@@ -301,7 +300,7 @@ ext_bottom_front_right_enable = true;
ext_bottom_front_right_adjust = 0; //[-20:.01:20]
ext_bottom_front_right_support = "front"; //[none,left,rear,front,right]
/* [Multiple PCB Top Standoffs] */
/* [ Multiple PCB Top Standoffs] */
// enable multiple pcb standoffs
multipcb_top_standoffs = false;
multipcb_top_standoff_reverse = true;
@@ -317,7 +316,7 @@ multipcb_top_standoff_support_height = 4; //[0:.01:50]
multipcb_top_standoff_insert = false;
multipcb_top_standoff_insert_dia = 4.2; //.01
multipcb_top_standoff_insert_height = 5.1; //.01
/* [Multiple PCB Top Standoff Individual Settings] */
/* [ Multiple PCB Top Standoff Individual Settings] */
// multiple pcb top - lower left standoff settings
multipcb_top_rear_left_enable = true;
multipcb_top_rear_left_adjust = 0; //[-20:.01:20]
@@ -335,7 +334,7 @@ multipcb_top_front_right_enable = true;
multipcb_top_front_right_adjust = 0; //[-20:.01:20]
multipcb_top_front_right_support = "front"; //[none,left,rear,front,right]
/* [Multiple PCB Bottom Standoffs] */
/* [ Multiple PCB Bottom Standoffs] */
// enable multiple pcb extended standoffs
multipcb_bottom_standoffs = false;
multipcb_bottom_standoff_reverse = false;
@@ -352,7 +351,7 @@ multipcb_bottom_standoff_insert = false;
multipcb_bottom_standoff_insert_dia = 4.2; //.01
multipcb_bottom_standoff_insert_height = 5.1; //.01
/* [Multiple PCB Bottom Standoff Individual Settings] */
/* [ Multiple PCB Bottom Standoff Individual Settings] */
// multiple pcb bottom - rear left standoff settings
multipcb_bottom_rear_left_enable = true;
multipcb_bottom_rear_left_adjust = 0; //[-20:.01:20]

View File

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