diff options
author | xengineering <me@xengineering.eu> | 2024-12-24 12:39:34 +0100 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2024-12-26 12:06:36 +0100 |
commit | db966c966929dd3abc29ebab7ce47d638ba4a94f (patch) | |
tree | af2b844a2938de1698712642261bc2f8aa52732a /case/panel_front.scad | |
parent | 03d41e8069623b5d627dfb298c471a16c380c91d (diff) | |
download | soundbox-db966c966929dd3abc29ebab7ce47d638ba4a94f.tar soundbox-db966c966929dd3abc29ebab7ce47d638ba4a94f.tar.zst soundbox-db966c966929dd3abc29ebab7ce47d638ba4a94f.zip |
WIP: Move `mech` directory to `case`
TODO: There are outdated references (see grep -R mech .)
The directory name should reflect what is inside, not the field of
engineering it belongs to.
Diffstat (limited to 'case/panel_front.scad')
-rw-r--r-- | case/panel_front.scad | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/case/panel_front.scad b/case/panel_front.scad new file mode 100644 index 0000000..da06927 --- /dev/null +++ b/case/panel_front.scad @@ -0,0 +1,70 @@ +use <pcb_case/conversion.scad> +use <pcb_case/panel.scad> + +tol = 2; + +module panel_front(pcb_dim, margins, t) { + dim = dim_pcb_to_case(pcb_dim, margins, t); + x_off = dim[0]-2*t; + + difference() { + pcb_case_panel_front(pcb_dim, margins, t); + mini_hdmi_hole(pcb_dim, margins, t); + for(v=[ + [usb_max_y-usb_max_delta_y-tol/2, 0.75*t], + [usb_max_y-usb_delta_y-tol/2, t] + ]) { + translate([0, v[0], 0]) { + micro_usb_hole(pcb_dim, margins, t, v[1]); + } + } + for(y = [cinch_min_y+0.5*cinch_d, cinch_min_y+1.5*cinch_d+cinch_delta_y]) { + translate([0, y, 0]) { + cinch_hole(pcb_dim, margins, t); + } + } + } +} + +hdmi_delta_y = 11.8; +hdmi_delta_z = 3.9; +hdmi_max_y = 31.7; +hdmi_max_z = 13.7; +module mini_hdmi_hole(pcb_dim, margins, t) { + case_dim = dim_pcb_to_case(pcb_dim, margins, t); + translate([ + case_dim[0]-2*t, + hdmi_max_y-hdmi_delta_y-tol/2, + hdmi_max_z-hdmi_delta_z-tol/2]) { + cube([t, hdmi_delta_y+tol, hdmi_delta_z+tol]); + } +} + +usb_delta_y = 8; +usb_max_delta_y = 20.6; +usb_delta_z = 3; +usb_max_y = 71.55; +usb_max_z = 12.7; +module micro_usb_hole(pcb_dim, margins, t, dx) { + echo(dx); + case_dim = dim_pcb_to_case(pcb_dim, margins, t); + translate([ + case_dim[0]-2*t, + 0, + usb_max_z-usb_delta_z-tol/2]) { + cube([dx, usb_delta_y+tol, usb_delta_z+tol]); + } +} + +cinch_d = 8.3; +cinch_min_y = 45; +cinch_delta_y = 8.2; +cinch_max_z = 34.25; +module cinch_hole(pcb_dim, margins, t) { + case_dim = dim_pcb_to_case(pcb_dim, margins, t); + translate([case_dim[0]-2*t, 0, cinch_max_z-cinch_d/2]) { + rotate([0, 90, 0]) { + cylinder(d=cinch_d+tol, h=t, $fn=30); + } + } +} |