From 43f7e0f47631eca1c35a0c08ddf27978f8db2f96 Mon Sep 17 00:00:00 2001 From: Edward Kisiel Date: Thu, 24 Apr 2025 19:59:56 -0400 Subject: [PATCH] added section part under view tab for panel case part 2d sections --- README.md | 2 +- sbc_case_builder.scad | 55 ++++++++++++++++++++++++++++++++++++------- 2 files changed, 47 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index af048ee..6245313 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ The GUI has multiple tabs that control what model and case is displayed, how it ![Image](SBC_Case_Builder_GUI.gif) ### View Tab -The View Tab allows the selection of various viewing modes and the selection of the device model for which a case is being generated. The *view* pickbox allows the respective case to be displayed as a 3D model, platter for 3D printing and as an individual case part, which can be selected using the *individual part* pickbox. The *sbc model* pickbox selects the device (SBC, MCU, Motherbaard, etc). The *sbc off* and *sbc information* are self explanatory. The *sbc highlight* shows the subtractive openings that are being automatically created by SBC Model Framework while the *accessory highlight* shows the subtractive openings being generated by entries in the file sbc_case_builder_accessories.cfg. The later is useful when trying to visually place a subtractive accessory. +The View Tab allows the selection of various viewing modes and the selection of the device model for which a case is being generated. The *view* pickbox allows the respective case to be displayed as a 3D model, platter for 3D printing and as an individual case part, which can be selected using the *individual part* pickbox. The *section part* checkbox sections the selected part for dxf or other 2D export. The *sbc model* pickbox selects the device (SBC, MCU, Motherbaard, etc). The *sbc off* and *sbc information* are self explanatory. The *sbc highlight* shows the subtractive openings that are being automatically created by SBC Model Framework while the *accessory highlight* shows the subtractive openings being generated by entries in the file sbc_case_builder_accessories.cfg. The later is useful when trying to visually place a subtractive accessory. ### Folded Case Adjustments Tab diff --git a/sbc_case_builder.scad b/sbc_case_builder.scad index 676a908..40bcccf 100644 --- a/sbc_case_builder.scad +++ b/sbc_case_builder.scad @@ -28,6 +28,8 @@ include <./sbc_case_builder_accessories.cfg>; // viewing mode "model", "platter", "part" view = "model"; // [model, platter, part] individual_part = "bottom"; // [top, bottom, right, left, front, rear, io_shield, accessories] +// section individual parts for panel cases +section_part = false; // [true,false] // single board computer model sbc_model = "c1+"; // ["c1+", "c2", "c4", "hc4", "xu4", "xu4q", "mc1", "hc1", "n1", "n2", "n2+", "n2l", "n2lq", "m1", "m1s", "m2", "h2", "h2+", "h3", "h3+", "h4", "h4+", "h4_ultra", "show2", "rpipico", "rpipicow", "rpicm4+ioboard", "rpicm1", "rpicm3", "rpicm3l", "rpicm3+", "rpicm4s", "rpicm4", "rpicm4l", "rpizero", "rpizerow", "rpizero2w", "rpi1a+", "rpi1b+", "rpi2b", "rpi3a+", "rpi3b", "rpi3b+", "rpi4b", "rpi5", "a64", "a64lts", "rock64", "rockpro64", "quartz64a", "quartz64b", "h64b", "star64", "soedge_a-baseboard", "soedge_rk1808", "rock4a", "rock4b", "rock4a+", "rock4b+", "rock4c", "rock4c+", "rock5b-v1.3", "rock5b", "rock5bq", "rock5b+", "nio12l", "vim1", "vim2", "vim3", "vim3l", "vim4", "tinkerboard", "tinkerboard-s", "tinkerboard-2", "tinkerboard-2s", "tinkerboard-r2", "tinkerboard-r2s", "opizero", "opizero2", "opir1plus_lts", "opir1", "opi5", "opi5max", "jetsonnano", "lepotato", "sweetpotato", "tritium-h2+", "tritium-h3", "tritium-h5", "solitude", "alta", "atomicpi", "visionfive2", "visionfive2q", "bpif3", "milk-v_duos", "licheerv+dock", "rak19007", "cnano-avr128da48", "nodemcu-32s", "cs-solarmeter", "feather-m0_express", "feather-m0_wifi", "feather-m4_express", "ssi-eeb", "ssi-ceb", "atx", "micro-atx", "dtx", "flex-atx", "mini-dtx", "mini-itx", "mini-itx_thin", "mini-stx", "mini-stx_thin", "nano-itx", "nuc", "pico-itx"] @@ -1087,7 +1089,12 @@ if (view == "part") { translate([0,depth,case_z]) rotate([180,0,0]) case_top(case_design); } if(case_design == "panel" || case_design == "panel_nas") { - translate([0,depth,case_z]) rotate([180,0,0]) case_top(case_design); + if(section_part == false) { + translate([0,depth,case_z]) rotate([180,0,0]) case_top(case_design); + } + else { + projection() translate([0,depth,case_z]) rotate([180,0,0]) case_top(case_design); + } } if(case_design == "stacked") { translate([0,depth,case_z]) rotate([180,0,0]) case_top(case_design); @@ -1113,24 +1120,47 @@ if (view == "part") { case_adapter(case_design); } else { - case_bottom(case_design); + if(section_part == false) { + case_bottom(case_design); + } + else { + projection() case_bottom(case_design); + } } } if(individual_part == "front") { 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(section_part == false) { + translate([0,case_z,-depth+wallthick+gap+floorthick]) + rotate([90,0,0]) case_side(case_design,"front"); + } + else { + projection() 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" || case_design == "panel_nas") { - translate([0,0,-gap]) rotate([-90,0,0]) case_side(case_design,"rear"); + if(section_part == false) { + translate([0,0,-gap]) rotate([-90,0,0]) case_side(case_design,"rear"); + } + else { + projection() translate([0,0,-gap]) rotate([-90,0,0]) case_side(case_design,"rear"); + } } } if(individual_part == "right") { if(case_design == "panel" || case_design == "panel_nas") { - translate([gap,0,-width+(2*wallthick)+gap]) rotate([0,-90,-90]) - case_side(case_design,"right"); + if(section_part == false) { + translate([gap,0,-width+(2*wallthick)+gap]) rotate([0,-90,-90]) + case_side(case_design,"right"); + } + else { + projection() translate([gap,0,-width+(2*wallthick)+gap]) rotate([0,-90,-90]) + case_side(case_design,"right"); + } } if(case_design == "tray_vu5" || case_design == "tray_vu7" || case_design == "tray_sides") { translate([depth,0,width-gap]) rotate([0,90,90]) case_side(case_design,"right"); @@ -1138,8 +1168,15 @@ if (view == "part") { } if(individual_part == "left") { if(case_design == "panel" || case_design == "panel_nas") { - translate([depth,0,-gap]) rotate([0,90,90]) - case_side(case_design,"left"); + if(section_part == false) { + translate([depth,0,-gap]) rotate([0,90,90]) + case_side(case_design,"left"); + } + else { + projection() translate([depth,0,-gap]) rotate([0,90,90]) + case_side(case_design,"left"); + + } } if(case_design == "tray_vu5" || case_design == "tray_vu7" || case_design == "tray_sides") { translate([gap,0,2*sidethick+gap]) rotate([0,-90,-90])