From 4ab67184aaea1adcd492096bd607316cf9e415b0 Mon Sep 17 00:00:00 2001 From: Edward Kisiel Date: Sun, 2 Oct 2022 15:03:24 -0400 Subject: [PATCH] finished rewrite of indents, added hdmi_mini,hdmi_micro,pwr5.5_7.5x11.5,pwr2.5_5x7.5 --- sbc_case_builder.scad | 247 +++++++++++++++++++++- sbc_case_builder_library.scad | 374 +++++++--------------------------- 2 files changed, 325 insertions(+), 296 deletions(-) diff --git a/sbc_case_builder.scad b/sbc_case_builder.scad index 63adc4a..7bfa6b4 100644 --- a/sbc_case_builder.scad +++ b/sbc_case_builder.scad @@ -39,7 +39,7 @@ added round, hexagon, snap and fitted cases, setup additional sbc from SBC_Model_Framework, added components and masks, added multi-associative parametric positioning for accessories, added individual variable height sbc standoffs, added cutaway view when case face - is not movable. + is not movable, finished indents for select components and orientations. see https://github.com/hominoids/SBC_Case_Builder */ @@ -2743,3 +2743,248 @@ module parametric_move_sub(type,loc_x,loc_y,loc_z,face,rotation,parametric, } } } + + +/* indent module */ +module indent(loc_x,loc_y,loc_z,rotation,side,class,type,wallthick,gap,floorthick,pcb_z) { + + adjust = .01; + $fn=90; + + // hdmi indent + if(class == "video" && type == "hdmi_a" && side == "top" && rotation == 0) { + place(loc_x+2.375,-(wallthick+gap)+wallthick/2,loc_z+3.75,12,10,rotation,side) + rotate([90,0,0]) slot(12,10,wallthick); + } + if(class == "video" && type == "hdmi_a" && side == "top" && rotation == 90) { + place(-gap-wallthick/2,loc_y,loc_z+3.75,12,10,rotation,side) + rotate([90,0,0]) slot(12,10,wallthick); + } + if(class == "video" && type == "hdmi_a" && side == "top" && rotation == 180) { + place(loc_x,depth-(wallthick+gap)-10-wallthick/2,loc_z+3.75,12,10,rotation,side) + rotate([90,0,0]) slot(12,10,wallthick); + } + if(class == "video" && type == "hdmi_a" && side == "top" && rotation == 270) { + place(width-(wallthick+gap)-10-wallthick/2,loc_y+2.375,loc_z+3.75,12,10,rotation,side) + rotate([90,0,0]) slot(12,10,wallthick); + } + if(class == "video" && type == "hdmi_a" && side == "bottom" && rotation == 0) { + place(loc_x,-(wallthick+gap)+wallthick/2,loc_z-pcb_z-3.75,12,10,rotation,side) + rotate([90,0,0]) slot(12,10,wallthick); + } + if(class == "video" && type == "hdmi_a" && side == "bottom" && rotation == 90) { + place(width-(wallthick+gap)-10-wallthick/2,loc_y,loc_z-5.25,12,10,rotation,side) + rotate([90,0,0]) slot(12,10,wallthick); + } + if(class == "video" && type == "hdmi_a" && side == "bottom" && rotation == 180) { + place(loc_x+2.375,depth-(wallthick+gap)-10-wallthick/2,loc_z-pcb_z-3.75,12,10,rotation,side) + rotate([90,0,0]) slot(12,10,wallthick); + } + if(class == "video" && type == "hdmi_a" && side == "bottom" && rotation == 270) { + place(-gap-wallthick/2,loc_y+1.75,loc_z-pcb_z-3.75,12,10,rotation,side) + rotate([90,0,0]) slot(12,10,wallthick); + } + // hdmi micro indent + if(class == "video" && type == "hdmi_micro" && rotation == 0 && side == "top") { + place(loc_x-.5,-(wallthick+gap)+wallthick/2,loc_z+1.5,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick); + } + if(class == "video" && type == "hdmi_micro" && rotation == 90 && side == "top") { + place(-gap-wallthick/2,loc_y+1.5,loc_z+1.5,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick); + } + if(class == "video" && type == "hdmi_micro" && rotation == 180 && side == "top") { + place(loc_x+1,depth-(wallthick+gap)-8-wallthick/2,loc_z+1.5,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick); + } + if(class == "video" && type == "hdmi_micro" && rotation == 270 && side == "top") { + place(width-(wallthick+gap)-8-wallthick/2,loc_y-.75,loc_z+1.5,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick); + } + if(class == "video" && type == "hdmi_micro" && rotation == 0 && side == "bottom") { + place(loc_x+1.5,-(wallthick+gap)+wallthick/2,loc_z-3,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick); + } + if(class == "video" && type == "hdmi_micro" && rotation == 90 && side == "bottom") { + place(width-(wallthick+gap)-8-wallthick/2,loc_y+1.25,loc_z-3,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick); + + } + if(class == "video" && type == "hdmi_micro" && rotation == 180 && side == "bottom") { + place(loc_x-1,depth-(wallthick+gap)-8-wallthick/2,loc_z-3,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick); + } + if(class == "video" && type == "hdmi_micro" && rotation == 270 && side == "bottom") { + place(-gap-wallthick/2,loc_y-.5,loc_z-3,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick); + } + // hdmi mini indent + if(class == "video" && type == "hdmi_mini" && rotation == 0 && side == "top") { + place(loc_x+.5,loc_y-gap-wallthick/2+1,loc_z+1.5,6,10,rotation,side) + rotate([90,0,0]) slot(6,10,wallthick); + } + if(class == "video" && type == "hdmi_mini" && rotation == 90 && side == "top") { + place(loc_x-wallthick/2,loc_y+3.5,loc_z+1.5,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick); + + } + if(class == "video" && type == "hdmi_mini" && rotation == 180 && side == "top") { + place(loc_x+4.5,loc_y-wallthick/2,loc_z+1.5,6,10,rotation,side) + rotate([90,0,0]) slot(6,10,wallthick); + } + if(class == "video" && type == "hdmi_mini" && rotation == 270 && side == "top") { + place(loc_x+wallthick/2,loc_y+1.5,loc_z+1.5,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick); + } + if(class == "video" && type == "hdmi_mini" && rotation == 0 && side == "bottom") { + place(loc_x+4.5,loc_y-gap-wallthick/2+1,loc_z-3,6,10,rotation,side) + rotate([90,0,0]) slot(6,10,wallthick); + } + if(class == "video" && type == "hdmi_mini" && rotation == 90 && side == "bottom") { + place(loc_x+wallthick/2,loc_y+3.5,loc_z-3,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick); + + } + if(class == "video" && type == "hdmi_mini" && rotation == 180 && side == "bottom") { + place(loc_x+.5,loc_y-wallthick/2,loc_z-3,6,10,rotation,side) + rotate([90,0,0]) slot(6,10,wallthick); + } + if(class == "video" && type == "hdmi_mini" && rotation == 270 && side == "bottom") { + place(loc_x-wallthick/2,loc_y+1.5,loc_z-3,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick); + } + // power plug indent + if(type == "pwr5.5_7.5x11.5" && rotation == 0 && side == "top") { + place(loc_x+3.75,-(wallthick+gap)+wallthick/2,loc_z+6.25,10,10,rotation,side) + rotate([90,0,0]) cylinder(d=10, h=wallthick); + } + if(type == "pwr5.5_7.5x11.5" && rotation == 90 && side == "top") { + place(-gap-wallthick/2,loc_y-6.25,loc_z+6.25,10,10,rotation,side) + rotate([90,0,0]) cylinder(d=10, h=wallthick); + } + if(type == "pwr5.5_7.5x11.5" && rotation == 180 && side == "top") { + place(loc_x-6.5,depth-10-(wallthick+gap)-wallthick/2,loc_z+6.25,10,10,rotation,side) + rotate([90,0,0]) cylinder(d=10, h=wallthick); + } + if(type == "pwr5.5_7.5x11.5" && rotation == 270 && side == "top") { + place(width-(wallthick+gap)-10-wallthick/2,loc_y+3.75,loc_z+6.25,10,10,rotation,side) + rotate([90,0,0]) cylinder(d=10, h=wallthick); + } + if(type == "pwr2.5_5x7.5" && rotation == 0 && side == "top") { + place(loc_x+2.75,-(wallthick+gap)+wallthick/2,loc_z+2.1,7,7,rotation,side) + rotate([90,0,0]) cylinder(d=7, h=wallthick); + } + if(type == "pwr2.5_5x7.5" && rotation == 90 && side == "top") { + place(-(wallthick+gap)+wallthick/2,loc_y-4.5,loc_z+2,7,7,rotation,side) + rotate([90,0,0]) cylinder(d=7, h=wallthick); + } + if(type == "pwr2.5_5x7.5" && rotation == 180 && side == "top") { + place(loc_x-4.5,depth-(wallthick+gap)-7-wallthick/2,loc_z+2,7,7,rotation,side) + rotate([90,0,0]) cylinder(d=7, h=wallthick); + } + if(type == "pwr2.5_5x7.5" && rotation == 270 && side == "top") { + place(width-(wallthick+gap)-7-wallthick/2,loc_y+2.5,loc_z+2,7,7,rotation,side) + rotate([90,0,0]) cylinder(d=7, h=wallthick); + } + // micro usb indent + if(class == "usb2" && type == "micro" && rotation == 0 && side == "top") { + place(loc_x-.5,-(wallthick+gap)+wallthick/2,loc_z+1.9,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick); + } + if(class == "usb2" && type == "micro" && rotation == 90 && side == "top") { + place(-gap-wallthick/2,loc_y+1.5,loc_z+1.9,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick); + + } + if(class == "usb2" && type == "micro" && rotation == 180 && side == "top") { + place(loc_x+1.5,depth-(wallthick+gap)-8-wallthick/2,loc_z+1.9,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick); + } + if(class == "usb2" && type == "micro" && rotation == 270 && side == "top") { + place(width-(wallthick+gap)-8-wallthick/2,loc_y-.5,loc_z+1.9,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick); + } + if(class == "usb2" && type == "micro" && rotation == 0 && side == "bottom") { + place(loc_x+1.5,-(wallthick+gap)+wallthick/2,loc_z-3.25,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick); + } + if(class == "usb2" && type == "micro" && rotation == 90 && side == "bottom") { + place(width-(wallthick+gap)-8-wallthick/2,loc_y+1.5,loc_z-3.25,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick); + + } + if(class == "usb2" && type == "micro" && rotation == 180 && side == "bottom") { + place(loc_x-.5,depth-(wallthick+gap)-8-wallthick/2,loc_z-3.25,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick); + } + if(class == "usb2" && type == "micro" && rotation == 270 && side == "bottom") { + place(-gap-wallthick/2,loc_y-.5,loc_z-3.25,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick); + } + // single horizontal usbc indent + if(class == "usbc" && type == "single_horizontal" && rotation == 0 && side == "top") { + place(loc_x+.5,-(wallthick+gap)+wallthick/2,loc_z+1.75,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick); + } + if(class == "usbc" && type == "single_horizontal" && rotation == 90 && side == "top") { + place(-gap-wallthick/2,loc_y+2.5,loc_z+1.75,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick); + } + if(class == "usbc" && type == "single_horizontal" && rotation == 180 && side == "top") { + place(loc_x+2.5,depth-(wallthick+gap)-8-wallthick/2,loc_z+2,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick); + } + if(class == "usbc" && type == "single_horizontal" && rotation == 270 && side == "top") { + place(width-(wallthick+gap)-8-wallthick/2,loc_y+.5,loc_z+1.75,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick); + } + if(class == "usbc" && type == "single_horizontal" && rotation == 0 && side == "bottom") { + place(loc_x+2.75,-(wallthick+gap)+wallthick/2,loc_z-3.25,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick); + } + if(class == "usbc" && type == "single_horizontal" && rotation == 90 && side == "bottom") { + place(width-(wallthick+gap)-8-wallthick/2,loc_y+2.5,loc_z-3.25,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick-(wallthick+gap)+wallthick/2); + } + if(class == "usbc" && type == "single_horizontal" && rotation == 180 && side == "bottom") { + place(loc_x+.5,depth-(wallthick+gap)-8-wallthick/2,loc_z-3.25,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick); + } + if(class == "usbc" && type == "single_horizontal" && rotation == 270 && side == "bottom") { + place(-gap-wallthick/2,loc_y+.5,loc_z-3.25,6,8,rotation,side) + rotate([90,0,0]) slot(6,8,wallthick); + } + // audio jack indent + if(class == "audio" && type == "jack_3.5" && rotation == 0 && side == "top") { + place(loc_x+3.15,-(wallthick+gap)+wallthick/2,loc_z+2,8,8,rotation,side) + rotate([90,0,0]) cylinder(d=8, h=wallthick); + } + if(class == "audio" && type == "jack_3.5" && rotation == 90 && side == "top") { + place(-gap-wallthick/2,loc_y-4.6,loc_z+2,8,8,rotation,side) + rotate([90,0,0]) cylinder(d=8, h=wallthick); + } + if(class == "audio" && type == "jack_3.5" && rotation == 180 && side == "top") { + place(loc_x-4.6,depth-(wallthick+gap)-8-wallthick/2,loc_z+2,8,8,rotation,side) + rotate([90,0,0]) cylinder(d=8, h=wallthick); + } + if(class == "audio" && type == "jack_3.5" && rotation == 270 && side == "top") { + place(width-(wallthick+gap)-8-wallthick/2,loc_y+3.15,loc_z+2,8,8,rotation,side) + rotate([90,0,0]) cylinder(d=8, h=wallthick); + } + if(class == "audio" && type == "jack_3.5" && rotation == 0 && side == "bottom") { + place(loc_x-4.6,-(wallthick+gap)+wallthick/2,loc_z-3.5,8,8,rotation,side) + rotate([90,0,0]) cylinder(d=8, h=wallthick); + } + if(class == "audio" && type == "jack_3.5" && rotation == 90 && side == "bottom") { + place(width-(wallthick+gap)-8-wallthick/2,loc_y-4.6,loc_z-3.5,8,8,rotation,side) + rotate([90,0,0]) cylinder(d=8, h=wallthick); + } + if(class == "audio" && type == "jack_3.5" && rotation == 180 && side == "bottom") { + place(loc_x+3.15,depth-(wallthick+gap)-8-wallthick/2,loc_z-3.5,8,8,rotation,side) + rotate([90,0,0]) cylinder(d=8, h=wallthick); + } + if(class == "audio" && type == "jack_3.5" && rotation == 270 && side == "bottom") { + place(-gap-wallthick/2,loc_y+3.15,loc_z-3.5,8,8,rotation,side) + rotate([90,0,0]) cylinder(d=8, h=wallthick); + } +} diff --git a/sbc_case_builder_library.scad b/sbc_case_builder_library.scad index e9078c4..9171f39 100644 --- a/sbc_case_builder_library.scad +++ b/sbc_case_builder_library.scad @@ -2563,115 +2563,152 @@ module mask(loc_x,loc_y,loc_z,rotation,side,class,type,wallthick,gap,floorthick, place(loc_x-1,loc_y-1,loc_z-pcb_z,15,11.5,rotation,side) hdmi_open("hdmi_a"); } // hdmi micro opening - if(type == "hdmi_micro" && rotation == 0) { + if(class == "video" && type == "hdmi_micro" && rotation == 0 && side == "top") { place(loc_x,loc_y,loc_z,7.25,6.5,rotation,side) hdmi_open("hdmi_micro"); } - if(type == "hdmi_micro" && rotation == 90) { + if(class == "video" && type == "hdmi_micro" && rotation == 90 && side == "top") { + place(loc_x,loc_y-.75,loc_z,7.25,6.5,rotation,side) hdmi_open("hdmi_micro"); + } + if(class == "video" && type == "hdmi_micro" && rotation == 180 && side == "top") { + place(loc_x-.75,loc_y+1,loc_z,7.25,6.5,rotation,side) hdmi_open("hdmi_micro"); + } + if(class == "video" && type == "hdmi_micro" && rotation == 270 && side == "top") { place(loc_x,loc_y,loc_z,7.25,6.5,rotation,side) hdmi_open("hdmi_micro"); } - if(type == "hdmi_micro" && rotation == 180) { - place(loc_x,loc_y,loc_z,7.25,6.5,rotation,side) hdmi_open("hdmi_micro"); + if(class == "video" && type == "hdmi_micro" && rotation == 0 && side == "bottom") { + place(loc_x-1.5,loc_y,loc_z-1.5,8,3,rotation,side) hdmi_open("hdmi_micro"); } - if(type == "hdmi_micro" && rotation == 270) { - place(loc_x,loc_y,loc_z,7.25,6.5,rotation,side) hdmi_open("hdmi_micro"); + if(class == "video" && type == "hdmi_micro" && rotation == 90 && side == "bottom") { + place(loc_x+4.5,loc_y-1.5,loc_z-1.5,8,3,rotation,side) hdmi_open("hdmi_micro"); } + if(class == "video" && type == "hdmi_micro" && rotation == 180 && side == "bottom") { + place(loc_x,loc_y+4.5,loc_z-1.5,8,3,rotation,side) hdmi_open("hdmi_micro"); + } + if(class == "video" && type == "hdmi_micro" && rotation == 270 && side == "bottom") { + place(loc_x,loc_y,loc_z-1.5,8,3,rotation,side) hdmi_open("hdmi_micro"); + } + // hdmi mini opening - if(type == "hdmi_mini" && rotation == 0) { - place(loc_x,loc_y,loc_z,11.5,8,rotation,side) hdmi_open("hdmi_mini"); + if(class == "video" && type == "hdmi_mini" && rotation == 0 && side == "top") { + place(loc_x+.125,loc_y,loc_z,11.5,8,rotation,side) hdmi_open("hdmi_mini"); } - if(type == "hdmi_mini" && rotation == 90) { - place(loc_x,loc_y,loc_z,11.5,8,rotation,side) hdmi_open("hdmi_mini"); + if(class == "video" && type == "hdmi_mini" && rotation == 90 && side == "top") { + place(loc_x,loc_y-.375,loc_z,11.5,8,rotation,side) hdmi_open("hdmi_mini"); } - if(type == "hdmi_mini" && rotation == 180) { - place(loc_x,loc_y,loc_z,11.5,8,rotation,side) hdmi_open("hdmi_mini"); + if(class == "video" && type == "hdmi_mini" && rotation == 180 && side == "top") { + place(loc_x-.5,loc_y,loc_z,11.5,8,rotation,side) hdmi_open("hdmi_mini"); } - if(type == "hdmi_mini" && rotation == 270) { - place(loc_x,loc_y,loc_z,11.5,8,rotation,side) hdmi_open("hdmi_mini"); + if(class == "video" && type == "hdmi_mini" && rotation == 270 && side == "top") { + place(loc_x,loc_y+.125,loc_z,11.5,8,rotation,side) hdmi_open("hdmi_mini"); + } + if(class == "video" && type == "hdmi_mini" && rotation == 0 && side == "bottom") { + place(loc_x-.375,loc_y,loc_z-1.5,11.5,8,rotation,side) hdmi_open("hdmi_mini"); + } + if(class == "video" && type == "hdmi_mini" && rotation == 90 && side == "bottom") { + place(loc_x,loc_y-.5,loc_z-1.5,11.5,8,rotation,side) hdmi_open("hdmi_mini"); + } + if(class == "video" && type == "hdmi_mini" && rotation == 180 && side == "bottom") { + place(loc_x,loc_y,loc_z-1.5,11.5,8,rotation,side) hdmi_open("hdmi_mini"); + } + if(class == "video" && type == "hdmi_mini" && rotation == 270 && side == "bottom") { + place(loc_x,loc_y,loc_z-1.5,11.5,8,rotation,side) hdmi_open("hdmi_mini"); } // dp mini opening - if(type == "dp_mini" && rotation == 0) { - place(loc_x,loc_y,loc_z,9,8,rotation,side) hdmi_open("dp_mini"); + if(class == "video" && type == "dp_mini" && rotation == 0 && side == "top") { + place(loc_x-.125,loc_y,loc_z,9,8,rotation,side) hdmi_open("dp_mini"); } - if(type == "dp_mini" && rotation == 90) { + if(class == "video" && type == "dp_mini" && rotation == 90 && side == "top") { place(loc_x,loc_y-.5,loc_z,9,8,rotation,side) hdmi_open("dp_mini"); } - if(type == "dp_mini" && rotation == 180) { - place(loc_x-.5,loc_y+6,loc_z,9,8,rotation,side) hdmi_open("dp_mini"); + if(class == "video" && type == "dp_mini" && rotation == 180 && side == "top") { + place(loc_x-.375,loc_y+6,loc_z,9,8,rotation,side) hdmi_open("dp_mini"); } - if(type == "dp_mini" && rotation == 270) { + if(class == "video" && type == "dp_mini" && rotation == 270 && side == "top") { place(loc_x+6,loc_y,loc_z,9,8,rotation,side) hdmi_open("dp_mini"); } + if(class == "video" && type == "dp_mini" && rotation == 0 && side == "bottom") { + place(loc_x-.675,loc_y,loc_z-1.5,9,8,rotation,side) hdmi_open("dp_mini"); + } + if(class == "video" && type == "dp_mini" && rotation == 90 && side == "bottom") { + place(loc_x+6,loc_y-.5,loc_z-1.5,9,8,rotation,side) hdmi_open("dp_mini"); + } + if(class == "video" && type == "dp_mini" && rotation == 180 && side == "bottom") { + place(loc_x-.375,loc_y+6,loc_z-1.5,9,8,rotation,side) hdmi_open("dp_mini"); + } + if(class == "video" && type == "dp_mini" && rotation == 270 && side == "bottom") { + place(loc_x,loc_y,loc_z-1.5,9,8,rotation,side) hdmi_open("dp_mini"); + } // power plug openings - if(type == "pwr5.5_7.5x11.5" && rotation == 0) { + if(type == "pwr5.5_7.5x11.5" && rotation == 0 && side == "top") { place(loc_x,loc_y,loc_z,7,7,rotation,side) - translate([3.5,2,6.5]) rotate([90,0,0]) cylinder(d=7, h=8); + translate([3.75,2,6.5]) rotate([90,0,0]) cylinder(d=7, h=8); } - if(type == "pwr5.5_7.5x11.5" && rotation == 90) { + if(type == "pwr5.5_7.5x11.5" && rotation == 90 && side == "top") { place(loc_x,loc_y,loc_z,7,7,rotation,side) - translate([3.5,2,6.5]) rotate([90,0,0]) cylinder(d=7, h=8); + translate([3.25,2,6.5]) rotate([90,0,0]) cylinder(d=7, h=8); } - if(type == "pwr5.5_7.5x11.5" && rotation == 180) { + if(type == "pwr5.5_7.5x11.5" && rotation == 180 && side == "top") { place(loc_x,loc_y,loc_z,7,7,rotation,side) - translate([3.5,-2.5,6.5]) rotate([90,0,0]) cylinder(d=7, h=8); + translate([3.25,-2.5,6.5]) rotate([90,0,0]) cylinder(d=7, h=8); } - if(type == "pwr5.5_7.5x11.5" && rotation == 270) { + if(type == "pwr5.5_7.5x11.5" && rotation == 270 && side == "top") { place(loc_x-2,loc_y,loc_z,7,7,rotation,side) - translate([3.5,-4.5,6.5]) rotate([90,0,0]) cylinder(d=7, h=8); + translate([3.75,-4.5,6.5]) rotate([90,0,0]) cylinder(d=7, h=8); } - if(type == "pwr2.5_5x7.5" && rotation == 0) { + if(type == "pwr2.5_5x7.5" && rotation == 0 && side == "top") { place(loc_x,loc_y,loc_z,3,3,rotation,side) translate([2.75,2,2]) rotate([90,0,0]) cylinder(d=3, h=8); } - if(type == "pwr2.5_5x7.5" && rotation == 90) { + if(type == "pwr2.5_5x7.5" && rotation == 90 && side == "top") { place(loc_x,loc_y,loc_z,3,3,rotation,side) translate([.25,2,2]) rotate([90,0,0]) cylinder(d=3, h=8); } - if(type == "pwr2.5_5x7.5" && rotation == 180) { + if(type == "pwr2.5_5x7.5" && rotation == 180 && side == "top") { place(loc_x,loc_y,loc_z,3,3,rotation,side) translate([.5,-2.5,2]) rotate([90,0,0]) cylinder(d=3, h=8); } - if(type == "pwr2.5_5x7.5" && rotation == 270) { + if(type == "pwr2.5_5x7.5" && rotation == 270 && side == "top") { place(loc_x,loc_y,loc_z,3,3,rotation,side) translate([2.75,-2.5,2]) rotate([90,0,0]) cylinder(d=3, h=8); } // pwr5.5_10x10 opening - if(type == "pwr5.5_10x10" && rotation == 0) { + if(type == "pwr5.5_10x10" && rotation == 0 && side == "top") { place(loc_x-.25,loc_y-6,loc_z,10.5,13.5,rotation,side) cube([10.5,8,10.5]); } // pwr5.5_10x10 opening - if(type == "pwr5.5_10x10" && rotation == 90) { + if(type == "pwr5.5_10x10" && rotation == 90 && side == "top") { place(loc_x-6,loc_y-.25,loc_z,10.5,13.5,rotation,side) cube([10.5,8,10.5]); } // pwr5.5_10x10 opening - if(type == "pwr5.5_10x10" && rotation == 180) { + if(type == "pwr5.5_10x10" && rotation == 180 && side == "top") { place(loc_x-.25,loc_y+6,loc_z,10.5,13.5,rotation,side) cube([10.5,8,10.5]); } // pwr5.5_10x10 opening - if(type == "pwr5.5_10x10" && rotation == 270) { + if(type == "pwr5.5_10x10" && rotation == 270 && side == "top") { place(loc_x+6,loc_y-.25,loc_z,10.5,13.5,rotation,side) cube([10.5,8,10.5]); } // pwr5.5_9.5x7 opening - if(type == "pwr5.5_9.5x7" && rotation == 0) { + if(type == "pwr5.5_9.5x7" && rotation == 0 && side == "top") { place(loc_x-.25,loc_y-6,loc_z,10,13.5,rotation,side) cube([10,8,7.5]); } // pwr5.5_9.5x7 opening - if(type == "pwr5.5_9.5x7" && rotation == 90) { + if(type == "pwr5.5_9.5x7" && rotation == 90 && side == "top") { place(loc_x-6,loc_y-.25,loc_z,10,13.5,rotation,side) cube([10,8,7.5]); } // pwr5.5_9.5x7 opening - if(type == "pwr5.5_9.5x7" && rotation == 180) { - place(loc_x-.25,loc_y+6,loc_z,10,13.5,rotation,side) + if(type == "pwr5.5_9.5x7" && rotation == 180 && side == "top") { + place(loc_x-.25,loc_y+2,loc_z,10,13.5,rotation,side) cube([10,8,7.5]); } // pwr5.5_9.5x7 opening - if(type == "pwr5.5_9.5x7" && rotation == 270) { - place(loc_x+6,loc_y-.25,loc_z,10,13.5,rotation,side) + if(type == "pwr5.5_9.5x7" && rotation == 270 && side == "top") { + place(loc_x+2,loc_y-.25,loc_z,10,13.5,rotation,side) cube([10,8,7.5]); } // emmc storage @@ -3238,256 +3275,3 @@ module vent(width,length,height,gap,rows,columns,orientation) { } } -/* indent module */ -module indent(loc_x,loc_y,loc_z,rotation,side,class,type,wallthick,gap,floorthick,pcb_z) { - - adjust = .01; - $fn=90; - - // hdmi indent - if(type == "hdmi_a" && side == "top" && rotation == 0) { - place(loc_x+2.375,loc_y-gap-wallthick/2+1,loc_z+3.75,12,10,rotation,side) - rotate([90,0,0]) slot(12,10,wallthick); - } - if(type == "hdmi_a" && side == "top" && rotation == 90) { - place(loc_x-wallthick/2,loc_y,loc_z+3.75,12,10,rotation,side) - rotate([90,0,0]) slot(12,10,wallthick); - } - if(type == "hdmi_a" && side == "top" && rotation == 180) { - place(loc_x,loc_y+gap+wallthick/2+1,loc_z+3.75,12,10,rotation,side) - rotate([90,0,0]) slot(12,10,wallthick); - } - if(type == "hdmi_a" && side == "top" && rotation == 270) { - place(loc_x+gap+wallthick,loc_y+2.375,loc_z+3.75,12,10,rotation,side) - rotate([90,0,0]) slot(12,10,wallthick); - } - if(type == "hdmi_a" && side == "bottom" && rotation == 0) { - place(loc_x,loc_y-1,loc_z-pcb_z-3.75,12,10,rotation,side) - rotate([90,0,0]) slot(12,10,wallthick); - } - if(type == "hdmi_a" && side == "bottom" && rotation == 90) { - place(loc_x+gap+wallthick,loc_y,loc_z-5.25,12,10,rotation,side) - rotate([90,0,0]) slot(12,10,wallthick); - } - if(type == "hdmi_a" && side == "bottom" && rotation == 180) { - place(loc_x+2.375,loc_y+gap+wallthick/2+1,loc_z-pcb_z-3.75,12,10,rotation,side) - rotate([90,0,0]) slot(12,10,wallthick); - } - if(type == "hdmi_a" && side == "bottom" && rotation == 270) { - place(loc_x-wallthick/2,loc_y+1.75,loc_z-5.25,12,10,rotation,side) - rotate([90,0,0]) slot(12,10,wallthick); - } - // hdmi micro indent - if(type == "hdmi_micro" && rotation == 0) { - place(loc_x,loc_y,loc_z,7.25,6.5,rotation,side) hdmi_open("hdmi_micro"); - } - if(type == "hdmi_micro" && rotation == 90) { - place(loc_x,loc_y,loc_z,7.25,6.5,rotation,side) hdmi_open("hdmi_micro"); - } - if(type == "hdmi_micro" && rotation == 180) { - place(loc_x,loc_y,loc_z,7.25,6.5,rotation,side) hdmi_open("hdmi_micro"); - } - if(type == "hdmi_micro" && rotation == 270) { - place(loc_x,loc_y,loc_z,7.25,6.5,rotation,side) hdmi_open("hdmi_micro"); - } - // hdmi mini indent - if(type == "hdmi_mini" && rotation == 0) { - place(loc_x,loc_y,loc_z,11.5,8,rotation,side) hdmi_open("hdmi_mini"); - } - if(type == "hdmi_mini" && rotation == 90) { - place(loc_x,loc_y,loc_z,11.5,8,rotation,side) hdmi_open("hdmi_mini"); - } - if(type == "hdmi_mini" && rotation == 180) { - place(loc_x,loc_y,loc_z,11.5,8,rotation,side) hdmi_open("hdmi_mini"); - } - if(type == "hdmi_mini" && rotation == 270) { - place(loc_x,loc_y,loc_z,11.5,8,rotation,side) hdmi_open("hdmi_mini"); - } - // dp mini indent - if(type == "dp_mini" && rotation == 0) { - place(loc_x,loc_y,loc_z,9,8,rotation,side) hdmi_open("dp_mini"); - } - if(type == "dp_mini" && rotation == 90) { - place(loc_x,loc_y-.5,loc_z,9,8,rotation,side) hdmi_open("dp_mini"); - } - if(type == "dp_mini" && rotation == 180) { - place(loc_x-.5,loc_y+6,loc_z,9,8,rotation,side) hdmi_open("dp_mini"); - } - if(type == "dp_mini" && rotation == 270) { - place(loc_x+6,loc_y,loc_z,9,8,rotation,side) hdmi_open("dp_mini"); - } - // power plug indent - if(type == "pwr5.5_7.5x11.5" && rotation == 0) { - place(loc_x+3.5,loc_y-gap-wallthick/2+1,loc_z+6.25,7,7,rotation,side) - rotate([90,0,0]) cylinder(d=10, h=wallthick+(2*adjust)); - } - if(type == "pwr5.5_7.5x11.5" && rotation == 90) { - place(loc_x,loc_y,loc_z,7,7,rotation,side) - translate([3.5,2,6.5]) rotate([90,0,0]) cylinder(d=7, h=8); - } - if(type == "pwr5.5_7.5x11.5" && rotation == 180) { - place(loc_x,loc_y,loc_z,7,7,rotation,side) - translate([3.5,-2.5,6.5]) rotate([90,0,0]) cylinder(d=7, h=8); - } - if(type == "pwr5.5_7.5x11.5" && rotation == 270) { - place(loc_x-2,loc_y,loc_z,7,7,rotation,side) - translate([3.5,-4.5,6.5]) rotate([90,0,0]) cylinder(d=7, h=8); - } - if(type == "pwr2.5_5x7.5" && rotation == 0) { - place(loc_x+2.75,loc_y-gap-wallthick/2,loc_z+2.1,3,3,rotation,side) - rotate([90,0,0]) cylinder(d=6, h=wallthick+(2*adjust)); - } - if(type == "pwr2.5_5x7.5" && rotation == 90) { - place(loc_x,loc_y,loc_z,3,3,rotation,side) - translate([.25,2,2]) rotate([90,0,0]) cylinder(d=3, h=8); - } - if(type == "pwr2.5_5x7.5" && rotation == 180) { - place(loc_x,loc_y,loc_z,3,3,rotation,side) - translate([.5,-2.5,2]) rotate([90,0,0]) cylinder(d=3, h=8); - } - if(type == "pwr2.5_5x7.5" && rotation == 270) { - place(loc_x,loc_y,loc_z,3,3,rotation,side) - translate([2.75,-2.5,2]) rotate([90,0,0]) cylinder(d=3, h=8); - } - // pwr5.5_10x10 indent - if(type == "pwr5.5_10x10" && rotation == 0) { - place(loc_x-.25,loc_y-6,loc_z,10.5,13.5,rotation,side) - cube([10.5,8,10.5]); - } - // pwr5.5_10x10 indent - if(type == "pwr5.5_10x10" && rotation == 90) { - place(loc_x-6,loc_y-.25,loc_z,10.5,13.5,rotation,side) - cube([10.5,8,10.5]); - } - // pwr5.5_10x10 indent - if(type == "pwr5.5_10x10" && rotation == 180) { - place(loc_x-.25,loc_y+6,loc_z,10.5,13.5,rotation,side) - cube([10.5,8,10.5]); - } - // pwr5.5_10x10 indent - if(type == "pwr5.5_10x10" && rotation == 270) { - place(loc_x+6,loc_y-.25,loc_z,10.5,13.5,rotation,side) - cube([10.5,8,10.5]); - } - // pwr5.5_9.5x7 indent - if(type == "pwr5.5_9.5x7" && rotation == 0) { - place(loc_x-.25,loc_y-6,loc_z,10,13.5,rotation,side) - cube([10,8,7.5]); - } - // pwr5.5_9.5x7 indent - if(type == "pwr5.5_9.5x7" && rotation == 90) { - place(loc_x-6,loc_y-.25,loc_z,10,13.5,rotation,side) - cube([10,8,7.5]); - } - // pwr5.5_9.5x7 indent - if(type == "pwr5.5_9.5x7" && rotation == 180) { - place(loc_x-.25,loc_y+6,loc_z,10,13.5,rotation,side) - cube([10,8,7.5]); - } - // pwr5.5_9.5x7 indent - if(type == "pwr5.5_9.5x7" && rotation == 270) { - place(loc_x+6,loc_y-.25,loc_z,10,13.5,rotation,side) - cube([10,8,7.5]); - } - // micro usb indent - if(class == "usb2" && type == "micro" && rotation == 0 && side == "top") { - place(loc_x-.5,loc_y-gap-wallthick/2+1,loc_z+1.9,6,8,rotation,side) - rotate([90,0,0]) slot(6,8,wallthick); - } - if(class == "usb2" && type == "micro" && rotation == 90 && side == "top") { - place(loc_x-wallthick/2,loc_y+1.5,loc_z+1.9,6,8,rotation,side) - rotate([90,0,0]) slot(6,8,wallthick); - - } - if(class == "usb2" && type == "micro" && rotation == 180 && side == "top") { - place(loc_x+1.5,loc_y-gap-wallthick/2,loc_z+1.9,6,8,rotation,side) - rotate([90,0,0]) slot(6,8,wallthick); - } - if(class == "usb2" && type == "micro" && rotation == 270 && side == "top") { - place(loc_x-gap-wallthick/2,loc_y-.5,loc_z+1.9,6,8,rotation,side) - rotate([90,0,0]) slot(6,8,wallthick); - } - if(class == "usb2" && type == "micro" && rotation == 0 && side == "bottom") { - place(loc_x+1.5,loc_y-gap-wallthick/2+1,loc_z-3.25,6,8,rotation,side) - rotate([90,0,0]) slot(6,8,wallthick); - } - if(class == "usb2" && type == "micro" && rotation == 90 && side == "bottom") { - place(loc_x-gap-wallthick/2,loc_y+1.5,loc_z-3.25,6,8,rotation,side) - rotate([90,0,0]) slot(6,8,wallthick); - - } - if(class == "usb2" && type == "micro" && rotation == 180 && side == "bottom") { - place(loc_x-.5,loc_y-gap-wallthick/2,loc_z-3.25,6,8,rotation,side) - rotate([90,0,0]) slot(6,8,wallthick); - } - if(class == "usb2" && type == "micro" && rotation == 270 && side == "bottom") { - place(loc_x-wallthick/2,loc_y-.5,loc_z-3.25,6,8,rotation,side) - rotate([90,0,0]) slot(6,8,wallthick); - } - // single horizontal usbc indent - if(class == "usbc" && type == "single_horizontal" && rotation == 0 && side == "top") { - place(loc_x+.5,loc_y-wallthick/2,loc_z+1.75,6,8,rotation,side) - rotate([90,0,0]) slot(6,8,wallthick); - } - if(class == "usbc" && type == "single_horizontal" && rotation == 90 && side == "top") { - place(loc_x-wallthick/2,loc_y+2.5,loc_z+1.75,6,8,rotation,side) - rotate([90,0,0]) slot(6,8,wallthick); - } - if(class == "usbc" && type == "single_horizontal" && rotation == 180 && side == "top") { - place(loc_x+2.5,loc_y-gap-wallthick/2,loc_z+2,6,8,rotation,side) - rotate([90,0,0]) slot(6,8,wallthick); - } - if(class == "usbc" && type == "single_horizontal" && rotation == 270 && side == "top") { - place(loc_x-gap-wallthick/2,loc_y+.5,loc_z+1.75,6,8,rotation,side) - rotate([90,0,0]) slot(6,8,wallthick); - } - if(class == "usbc" && type == "single_horizontal" && rotation == 0 && side == "bottom") { - place(loc_x+2.75,loc_y-wallthick/2,loc_z-3.25,6,8,rotation,side) - rotate([90,0,0]) slot(6,8,wallthick); - } - if(class == "usbc" && type == "single_horizontal" && rotation == 90 && side == "bottom") { - place(loc_x-wallthick,loc_y+2.5,loc_z-3.25,6,8,rotation,side) - rotate([90,0,0]) slot(6,8,wallthick); - } - if(class == "usbc" && type == "single_horizontal" && rotation == 180 && side == "bottom") { - place(loc_x+.5,loc_y-gap-wallthick/2,loc_z-3.25,6,8,rotation,side) - rotate([90,0,0]) slot(6,8,wallthick); - } - if(class == "usbc" && type == "single_horizontal" && rotation == 270 && side == "bottom") { - place(loc_x-wallthick/2,loc_y+.5,loc_z-3.25,6,8,rotation,side) - rotate([90,0,0]) slot(6,8,wallthick); - } - // audio jack indent - if(type == "jack_3.5" && rotation == 0 && side == "top") { - place(loc_x,loc_y,loc_z,8,8,rotation,side) - translate([3.15,-wallthick/2,2]) rotate([90,0,0]) cylinder(d=8, h=wallthick); - } - if(type == "jack_3.5" && rotation == 90 && side == "top") { - place(loc_x,loc_y,loc_z,8,8,rotation,side) - translate([4.6,-gap,2]) rotate([90,0,0]) cylinder(d=8, h=wallthick); - } - if(type == "jack_3.5" && rotation == 180 && side == "top") { - place(loc_x,loc_y,loc_z,8,8,rotation,side) - translate([4.6,-3.15-gap-wallthick/2,2]) rotate([90,0,0]) cylinder(d=8, h=wallthick); - } - if(type == "jack_3.5" && rotation == 270 && side == "top") { - place(loc_x,loc_y,loc_z,8,8,rotation,side) - translate([3.15,-2-gap-wallthick,2]) rotate([90,0,0]) cylinder(d=8, h=wallthick); - } - if(type == "jack_3.5" && rotation == 0 && side == "bottom") { - place(loc_x-1.5,loc_y,loc_z,8,8,rotation,side) - translate([3.15,-wallthick/2,3.5]) rotate([90,0,0]) cylinder(d=8, h=wallthick); - } - if(type == "jack_3.5" && rotation == 90 && side == "bottom") { - place(loc_x,loc_y,loc_z,8,8,rotation,side) - translate([4.6,-2-gap-wallthick,3.5]) rotate([90,0,0]) cylinder(d=8, h=wallthick); - } - if(type == "jack_3.5" && rotation == 180 && side == "bottom") { - place(loc_x,loc_y,loc_z,8,8,rotation,side) - translate([3,-2-gap-wallthick,3.5]) rotate([90,0,0]) cylinder(d=8, h=wallthick); - } - if(type == "jack_3.5" && rotation == 270 && side == "bottom") { - place(loc_x,loc_y,loc_z,8,8,rotation,side) - translate([3,-gap,3.5]) rotate([90,0,0]) cylinder(d=8, h=wallthick); - } -}