added sbc information in ui and plumbed
This commit is contained in:
@@ -178,6 +178,10 @@ indents = true;
|
||||
sata_knockout = false;
|
||||
// case accessory group to load
|
||||
accessory_name = "none"; // ["none", "hk_uart", "sensors", "c1+_shell_boombox", "c1+_panel_boombox", "c1+_panel_lcd3.5", "c1+_desktop_lcd3.5", "c1+_deskboom_lcd3.5", "c1+_tray_boombox", "c1+_round", "c1+_hex", "c2_shell_boombox", "c2_panel_boombox", "c2_panel_lcd3.5", "c2_desktop_lcd3.5", "c2_deskboom_lcd3.5", "c2_tray_boombox", "c2_round", "c2_hex", "c4_shell_boombox", "c4_panel_lcd3.5", "c4_desktop_lcd3.5", "c4_deskboom_lcd3.5", "c4_panel_boombox", "c4_tray_boombox", "c4_round", "c4_hex", "xu4_keyhole", "hc4_tray_drivebox2.5", "hc4_shell_drivebox2.5", "hc4_shell_drivebox2.5v", "hc4_shell_drivebox3.5", "n2l_tray", "n2l_gpio", "n2+_tray_vu7_fan", "m1s_shell", "m1s_shell_nvme", "m1s_shell_ups", "m1s_panel", "m1s_tray_nvme", "m1s_snap", "m1s_fitted", "m1_panel", "m1_tray", "m1_tray_ssd", "m1_tray_sides", "m1_tray_vu5", "m1_tray_vu7", "m1_fitted_drivebox2.5", "m1_fitted_drivebox3.5", "m1_fitted_pizzabox", "m1_fitted_drivebox3.5v", "h2_shell", "h2_shell_router", "h2_shell_router-ssd", "h2_lowboy", "h2_lowboy_router", "h2_tray", "h2_tray_sides", "h2_tray_router", "h2_router_station", "h2_round", "h2_hex", "h3_shell", "h3_lowboy", "h3_lowboy_router", "h3_tallboy", "h3_tallboy-ssd", "h3_ultimate", "h3_ultimate2", "h3_shell_drivebox2.5v", "show2_shell", "jetsonnano_shell", "jetsonnano_panel", "jetsonnano_stacked", "jetsonnano_tray", "jetsonnano_tray_sides", "jetsonnano_round", "jetsonnano_hex", "jetsonnano_snap", "jetsonnano_fitted", "rock64_round", "rock64_hex", "rockpro64_shell", "rockpro64_panel", "rockpro64_stacked", "rockpro64_tray", "rockpro64_tray_sides", "rockpro64_round", "rockpro64_hex", "rockpro64_snap", "rockpro64_fitted", "star64_shell", "rpi1b+_round", "rpi1b+_hex", "rpi3b_round", "rpi3b_hex", "rpi3b+_round", "rpi3b+_hex", "rpi4b_round", "rpi4b_hex", "rpi4b_shell_geeekpi_poe_hat", "rpi5_round", "rpi5_hex", "rock4b+_round", "rock4b+_hex", "rock4c_round", "rock4c_hex", "rock4c+_round", "rock4c+_hex", "rock5b", "rock5b_shell", "rock5bq", "rock5bq_shell", "rock5bq_tray", "rock5bq_tray_sides", "rock5bq_snap", "rock5bq_fitted", "rock5b-v1.3", "tinkerboard_round", "tinkerboard_hex", "tinkerboard-s_round", "tinkerboard-s_hex", "tinkerboard-2_round", "tinkerboard-2_hex", "tinkerboard-r2_round", "tinkerboard-r2_hex", "visonfive2_shell", "visonfive2_panel", "visonfive2_stacked", "visonfive2_tray", "visonfive2_snap", "visonfive2_fitted", "visonfive2q_shell", "visonfive2q_panel", "visonfive2q_stacked", "visonfive2q_tray", "visonfive2q_snap", "visonfive2q_fitted"]
|
||||
// sbc information display
|
||||
sbc_information = false;
|
||||
text_color = "Green"; // [Green, Black, Dimgrey, White, Yellow, Orange, Red, DarkbBlue]
|
||||
text_font = "Nimbus Mono PS"; // [Nimbus Mono PS, Liberation Mono, Noto Sans Mono]
|
||||
|
||||
|
||||
a = search([accessory_name],accessory_data);
|
||||
@@ -230,6 +234,13 @@ case_fn = 360; // circle segments for round cases
|
||||
case_ffn = 90; // circle segments for fillet of round cases
|
||||
lip = 5;
|
||||
vu_rotation = [15,0,0];
|
||||
text_offset = 25;
|
||||
text_height = case_z + (len(sbc_data[s[0]][1]) * 7);
|
||||
text_indent = [0,-32.5,4,0,-20.5,-8,4,4,4,4,-12,-16,-4,-12.5,-8,-4,-12,0,4,0,4,8,-.5,-12.5,-4.5,-8.5,0,-8];
|
||||
|
||||
ctext_offset = 15;
|
||||
ctext_height = 130;
|
||||
|
||||
adj = .01;
|
||||
$fn=90;
|
||||
|
||||
@@ -595,6 +606,14 @@ if (view == "model") {
|
||||
if(case_design == "paper" && flat_blank_section == true) {
|
||||
projection() case_folded(case_design, case_style);
|
||||
}
|
||||
// create sbc information text
|
||||
if(sbc_information == true) {
|
||||
for (i=[0:1:len(sbc_data[s[0]][1])-1]) {
|
||||
color(text_color)
|
||||
translate([text_offset + text_indent[i], depth, (text_height-i*7)+raise_top])
|
||||
rotate([90, 0, 0]) text(str(sbc_data[s[0]][1][i]), 5, font = text_font);
|
||||
}
|
||||
}
|
||||
if(case_design == "tray") {
|
||||
echo(width=width+2*sidethick,depth=depth,top=top_height,bottom=bottom_height);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user