From 8bf424b99b3669947364eadfc91e7badc8aba19f Mon Sep 17 00:00:00 2001 From: Edward Kisiel Date: Fri, 15 Mar 2024 15:26:23 -0400 Subject: [PATCH] changed oem_hk to shared component lib, added new standoff end type none --- lib/fastener.scad | 31 ---------- lib/oem_hk.scad | 154 ++++++++++++++++++++++++---------------------- lib/standoff.scad | 37 ++++++----- mod/indent.scad | 86 +++++++++++++------------- 4 files changed, 142 insertions(+), 166 deletions(-) diff --git a/lib/fastener.scad b/lib/fastener.scad index 0eb1a0a..6799251 100644 --- a/lib/fastener.scad +++ b/lib/fastener.scad @@ -16,7 +16,6 @@ Code released under GPLv3: http://www.gnu.org/licenses/gpl.html m_insert(type="M3", icolor = "#ebdc8b") - screw(screw_type) */ @@ -46,33 +45,3 @@ module m_insert(type="M3", icolor = "#ebdc8b") { //#f4e6c3, #ebdc8b cube([.5, .5, 1.5]); } } - - -/* - NAME: screw - DESCRIPTION: creates screws - TODO: needs improvement - - USAGE: screw(screw_type) - - screw_type = [d,l,style] - d = thread diameter - l = thread length - style = screw head style, 0 = Mushroom head, 5mm diameter -*/ - -module screw(screw_type) { - - d = screw_type[0]; - l = screw_type[1]; - style = screw_type[2]; - - if(style == 0) { - difference() { - translate([ 0, 0, -0.3]) sphere(2.7); - translate([-10,-10,-10]) cube([20,20,10]); - translate([-10,-10, 2]) cube([20,20,10]); - } - } - rotate([180,0,0]) cylinder(d=d, h=l); -} diff --git a/lib/oem_hk.scad b/lib/oem_hk.scad index a3f5edf..53d9a8f 100644 --- a/lib/oem_hk.scad +++ b/lib/oem_hk.scad @@ -377,6 +377,7 @@ module hk_vu7c(gpio_ext, tabs, mask) { if(enablemask == true && mstyle == "default") { translate([2.5,7,pcb_size[2]+3.12+lcd_size[2]-adj]) cube([view_size[0]+1, view_size[1]+1, mlength]); + video("hdmi_a", 70, 28.58, 0, "bottom", 0, [0,0,0], [0], pcb_size[2], true, [true,10,2,"default"]); // translate([55.8,103.5,-adj-msetback]) cylinder(d=hole, h=mlength); // translate([108.8,103.5,-adj-msetback]) cylinder(d=hole, h=mlength); } @@ -385,17 +386,17 @@ module hk_vu7c(gpio_ext, tabs, mask) { union() { color("lightgray") translate([0,0,pcb_size[2]+3.12]) cube(lcd_size); if(tabs == true) { - color("#181818") translate([-(pcb_size[0]-lcd_size[0])/2,lcd_size[1]-pcb_size[1]-1,0]) + color("#383838") translate([-(pcb_size[0]-lcd_size[0])/2,lcd_size[1]-pcb_size[1]-1,0]) cube(pcb_size); } else { - color("black") translate([0,lcd_size[1]-pcb_size[1]-1,0]) + color("#383838") translate([0,lcd_size[1]-pcb_size[1]-1,0]) cube([pcb_size[0]-20,pcb_size[1],pcb_size[2]]); } color("black") translate([3,7.5,pcb_size[2]+3.12+lcd_size[2]-adj]) cube(view_size); // tabs - color("black") translate([51.8,99,0]) slab_r([8,8,1.6],[.1,4,4,.1]); - color("black") translate([104.8,99,0]) slab_r([8,8,1.6],[.1,4,4,.1]); + color("#383838") translate([51.8,99,0]) slab_r([8,8,1.6],[.1,4,4,.1]); + color("#383838") translate([104.8,99,0]) slab_r([8,8,1.6],[.1,4,4,.1]); } // slots color("dimgray") translate([-(pcb_size[0]-lcd_size[0])/4,lcd_size[1]-1-7,-adj]) @@ -458,63 +459,70 @@ module hk_vu8m(brackets, mask) { m1_screw_spacing = 72; - body_size = [ 198, 133, 1.93]; - glass_size = [ 195.73, 131.14, 1.60]; - lcd_size = [ 184.63, 114.94, body_size[2] + 0.40]; - view_size = [ 173.23, 108.64, .1]; + body_size = [198, 133, 1.93]; + glass_size = [195.73, 131.14, 1.60]; + lcd_size = [184.63, 114.94, body_size[2] + 0.40]; + view_size = [173.23, 108.64, .1]; rb = 5.25; // body edge radius lcd_clearance = [0.15, 0.1, 0]; + lcd_space = lcd_size + 2*lcd_clearance; pcb_size = [14,24,1.6]; hole = 4.31; - spacer_size = [5.5, 6, 2.5, 5.5, 1, 0, 1, 1, 0, 0, 0]; + spacer_size = [6, 6+body_size[2], 3, 6, 1, "none", "round", "none", true, false, 4, 5]; + adj = .01; $fn = 90; if(enablemask == true && mstyle == "default") { translate([-.5+(glass_size[0]-view_size[0])/2, -.5+(glass_size[1]-view_size[1])/2, body_size[2] + glass_size[2]- 0.01]) cube([view_size[0]+1, view_size[1]+1, mlength]); + translate([44.5, 4.5, msetback-mlength]) cylinder(d=7, h=mlength); + translate([183.5, 4.5, msetback-mlength]) cylinder(d=7, h=mlength); + translate([44.5, body_size[1]-4.5, msetback-mlength]) cylinder(d=7, h=mlength); + translate([183.5, body_size[1]-4.5, msetback-mlength]) cylinder(d=7, h=mlength); } if(enablemask == false) { // "body" - color([0.1,0.1,0.1]) difference(){ - slab(body_size, rb); - lcd_space = lcd_size + 2*lcd_clearance; - translate([3.76 , 9 , -1]) cube(lcd_space); - translate([3.76 , 9 , -1]) cylinder(r=1.3, h=5); - translate([3.76 + lcd_space[0], 9 , -1]) cylinder(r=1.3, h=5); - translate([3.76 , 9 + lcd_space[1], -1]) cylinder(r=1.3, h=5); - translate([3.76 + lcd_space[0], 9 + lcd_space[1], -1]) cylinder(r=1.3, h=5); - // 8x holes in body - translate([ 44.5, 4.5, -1]) cylinder(d=hole, h=5); - translate([ 51.5, 4.5, -1]) cylinder(d=hole, h=5); - translate([ 183.5, 4.5, -1]) cylinder(d=hole, h=5); - translate([ 190.5, 4.5, -1]) cylinder(d=hole, h=5); - translate([ 44.5, body_size[1]-4.5, -1]) cylinder(d=hole, h=5); - translate([ 51.5, body_size[1]-4.5, -1]) cylinder(d=hole, h=5); - translate([ 183.5, body_size[1]-4.5, -1]) cylinder(d=hole, h=5); - translate([ 190.5, body_size[1]-4.5, -1]) cylinder(d=hole, h=5); + union() { + color("#181818") slab(body_size, rb); + color("#fee5a6") translate([51.5, 4.5, -adj]) cylinder(d=hole+2, h=body_size[2]+2*adj); + color("#fee5a6") translate([190.5, 4.5, -adj]) cylinder(d=hole+2, h=body_size[2]+2*adj); + color("#fee5a6") translate([51.5, body_size[1]-4.5, -adj]) cylinder(d=hole+2, h=body_size[2]+2*adj); + color("#fee5a6") translate([190.5, body_size[1]-4.5, -adj]) cylinder(d=hole+2, h=body_size[2]+2*adj); + } + color("#181818") translate([3.76, 9, -1]) cube(lcd_space); + color("#181818") translate([3.76, 9, -1]) cylinder(r=1.3, h=5); + color("#181818") translate([3.76 + lcd_space[0], 9, -1]) cylinder(r=1.3, h=5); + color("#181818") translate([3.76, 9 + lcd_space[1], -1]) cylinder(r=1.3, h=5); + color("#181818") translate([3.76 + lcd_space[0], 9 + lcd_space[1], -1]) cylinder(r=1.3, h=5); + + // 4x holes in body + color("#fee5a6") translate([51.5, 4.5, -1]) cylinder(d=hole, h=5); + color("#fee5a6") translate([190.5, 4.5, -1]) cylinder(d=hole, h=5); + color("#fee5a6") translate([51.5, body_size[1]-4.5, -1]) cylinder(d=hole, h=5); + color("#fee5a6") translate([190.5, body_size[1]-4.5, -1]) cylinder(d=hole, h=5); + + // standoff openings + color("silver") translate([44.5, 4.5, -1]) cylinder(d=hole, h=5); + color("silver") translate([183.5, 4.5, -1]) cylinder(d=hole, h=5); + color("silver") translate([44.5, body_size[1]-4.5, -1]) cylinder(d=hole, h=5); + color("silver") translate([183.5, body_size[1]-4.5, -1]) cylinder(d=hole, h=5); } // 4x standoffs - color([0.6,0.6,0.6]) { - translate([ 44.5, 4.5, 0]) standoff(spacer_size); - translate([ 183.5, 4.5, 0]) standoff(spacer_size); - translate([ 44.5, body_size[1]-4.5, 0]) standoff(spacer_size); - translate([ 183.5, body_size[1]-4.5, 0]) standoff(spacer_size); - } + color("silver") translate([44.5, 4.5, glass_size[2]]) standoff(spacer_size, [false,10,2,"default"]); + color("silver") translate([183.5, 4.5, glass_size[2]]) standoff(spacer_size, [false,10,2,"default"]); + color("silver") translate([44.5, body_size[1]-4.5, glass_size[2]]) standoff(spacer_size, [false,10,2,"default"]); + color("silver") translate([183.5, body_size[1]-4.5, glass_size[2]]) standoff(spacer_size, [false,10,2,"default"]); // LCD panel - color([0.6, 0.6, 0.65]) - translate([3.76, 9, body_size[2]-lcd_size[2]]+lcd_clearance) - cube(lcd_size); + color([0.6, 0.6, 0.65]) translate([3.76, 9, body_size[2]-lcd_size[2]]+lcd_clearance) cube(lcd_size); - // Front glass - // It's actually thinner and glued, but for the sake of simplicity... - color([0.2, 0.2, 0.2], 0.9) - translate([0.86, 1.38, body_size[2] + 0.01]) - slab(glass_size, rb); + // front glass + // it's actually thinner and glued, but for the sake of simplicity... + color([0.2, 0.2, 0.2], 0.9) translate([0.86, 1.38, body_size[2] + 0.01]) slab(glass_size, rb); // view area color("dimgrey", 0.9) @@ -522,31 +530,17 @@ module hk_vu8m(brackets, mask) { slab(view_size, .1); // PCB stub - color([0.1,0.1,0.1]) - translate([20.5, 24.5, -3]) - cube(pcb_size); - color("dimgrey") - translate([22.5, 26.5, -2]) - cube([8,16,3]); - color([0.1,0.1,0.1]) - translate([12, 21, -2]) - cube([7,7,1.6]); - color([0.1,0.1,0.1]) - translate([10, 34, -2]) - cube([4,10,1.6]); + color("black") translate([20.5, 24.5, -3]) cube(pcb_size); + color("dimgrey") translate([22.5, 26.5, -2]) cube([8,16,3]); + color("black") translate([12, 21, -2]) cube([7,7,1.6]); + color("black") translate([10, 34, -2]) cube([4,10,1.6]); - //Brackets + fpc("fh19", 30.5, 35, 3, "bottom", 90, [15,0,0], ["smt","side","white","black"], pcb_size[2]+body_size[2], false, [true,10,2,"default"]); + + // brackets if(brackets) { translate([44.5 - 7.5, body_size[1]/2 + m1_screw_spacing/2 - 7.5, - spacer_size[1] - 2]) u_bracket(); translate([44.5 - 7.5, body_size[1]/2 - m1_screw_spacing/2 + 7.5, - spacer_size[1] - 2 + 1.93]) rotate([180,0,0]) u_bracket(); - - //Screws - color([0.1,0.1,0.1]) { - translate([ 44.5, 4.5, -8]) rotate([180,0,0]) screw([3,7,0]); - translate([ 183.5, 4.5, -8]) rotate([180,0,0]) screw([3,7,0]); - translate([ 44.5, body_size[1]-4.5, -8]) rotate([180,0,0]) screw([3,7,0]); - translate([ 183.5, body_size[1]-4.5, -8]) rotate([180,0,0]) screw([3,7,0]); - } } } } @@ -645,18 +639,29 @@ module hk_vu8s(mask) { lcd_clearance = [0.15, 0.1, 0]; pcb_size = [14,24,1.6]; hole = 4.31; - spacer_size = [5.5, 1.75+body_size[2], 2.5, 5.5, 1, 0, 1, 1, 0, 0, 0]; +// spacer_size = [5.5, 1.75+body_size[2], 2.5, 5.5, 1, 0, 1, 1, 0, 0, 0]; + spacer_size = [5.5, 1.75+body_size[2], 2.5, 5.5, 1, "none", "round", "none", true, false, 4, 5]; $fn = 90; adj = .01; if(enablemask == true && mstyle == "default") { - translate([13.5, 12, body_size[2] + glass_size[2]- 0.01]) + translate([13.5, 12, body_size[2] + glass_size[2]- msetback]) cube([view_size[0]+1, view_size[1]+1, mlength]); + // corner holes + translate([4, -5, body_size[2]/2-(mlength/2)]) cylinder(d=hole, h=mlength); + translate([4, 143-5, body_size[2]/2-(mlength/2)]) cylinder(d=hole, h=mlength); + translate([202-4, -5, body_size[2]/2-(mlength/2)]) cylinder(d=hole, h=mlength); + translate([202-4, 143-5, body_size[2]/2-(mlength/2)]) cylinder(d=hole, h=mlength); + // back studs + translate([4, 3.75, msetback-mlength]) cylinder(d=7, h=mlength); + translate([3.75, 128.25, msetback-mlength]) cylinder(d=7, h=mlength); + translate([111.5, 4, msetback-mlength]) cylinder(d=7, h=mlength); + translate([111.25, 128.75, msetback-mlength]) cylinder(d=7, h=mlength); } if(enablemask == false) { // "body" - color([0.1,0.1,0.1]) + color("black") difference(){ union() { slab(body_size, rb); @@ -677,15 +682,14 @@ module hk_vu8s(mask) { translate([3.5, body_size[1]-3.5, -1]) cylinder(d=hole, h=5); translate([111, 3.5, -1]) cylinder(d=hole, h=5); translate([111.5, body_size[1]-3.5, -1]) cylinder(d=hole, h=5); - } - // standoffs - color([0.6,0.6,0.6]) { - translate([4, 3.75, body_size[2]+adj]) standoff(spacer_size); - translate([3.75, 128.25, body_size[2]+adj]) standoff(spacer_size); - translate([111.5, 4, body_size[2]+adj]) standoff(spacer_size); - translate([111.25, 128.75, body_size[2]+adj]) standoff(spacer_size); - } + // standoffs + color([0.6,0.6,0.6]) { + translate([4, 3.75, body_size[2]+adj]) standoff(spacer_size, [false,10,2,"default"]); + translate([3.75, 128.25, body_size[2]+adj]) standoff(spacer_size, [false,10,2,"default"]); + translate([111.5, 4, body_size[2]+adj]) standoff(spacer_size, [false,10,2,"default"]); + translate([111.25, 128.75, body_size[2]+adj]) standoff(spacer_size, [false,10,2,"default"]); + } // LCD panel color([0.6, 0.6, 0.65]) translate([10, 9, body_size[2]-lcd_size[2]]+lcd_clearance) @@ -703,10 +707,10 @@ module hk_vu8s(mask) { slab(view_size, .1); // PCB stub - color([0.1,0.1,0.1]) + color("black") translate([body_size[0]-25, body_size[1]-30, -2]) cube([7,7,.1]); - color([0.1,0.1,0.1]) + color("black") translate([body_size[0]-50, body_size[1]-35, -2]) cube([4,5,.1]); } @@ -836,7 +840,7 @@ module m1_hdmount() { translate ([ 3.1, 28.3 , 0]) rotate([ 0,0,0]) standoff(standoff_style); translate ([ 86.5, 28.3 , 0]) rotate([ 0,0,0]) standoff(standoff_style); } - color([0.1,0.1,0.1]) { + color("black") { translate ([ 3.1, 28.3 , 2]) rotate([ 0,0,0]) screw([3, 7, 0]); translate ([ 86.5, 28.3 , 2]) rotate([ 0,0,0]) screw([3, 7, 0]); diff --git a/lib/standoff.scad b/lib/standoff.scad index 50e271d..3afa708 100644 --- a/lib/standoff.scad +++ b/lib/standoff.scad @@ -21,7 +21,7 @@ USAGE: standoff(stand_off, mask) - stand_off[radius, height, supportsize, supportheight, sink, pillarstyle, + stand_off[radius, height, holesize, supportsize, supportheight, sink, pillarstyle, pillarsupport, reverse, insert_e, i_dia, i_depth], mask) radius = pillar radius @@ -78,58 +78,61 @@ module standoff(stand_off, mask){ difference (){ union () { if(pillarstyle == "hex" && reverse == false) { - rotate([0,0,30]) cylinder(d=radius*2/sqrt(3),h=height,$fn=6); + rotate([0,0,30]) cylinder(d=radius*2/sqrt(3), h=height, $fn=6); } if(pillarstyle == "hex" && reverse == true) { - translate([0,0,-height]) rotate([0,0,30]) cylinder(d=radius*2/sqrt(3),h=height,$fn=6); + translate([0,0,-height]) rotate([0,0,30]) cylinder(d=radius*2/sqrt(3), h=height, $fn=6); } if(pillarstyle == "round" && reverse == false) { - cylinder(d=radius,h=height); + cylinder(d=radius, h=height); } if(pillarstyle == "round" && reverse == true) { - translate([0,0,-height]) cylinder(d=radius,h=height); + translate([0,0,-height]) cylinder(d=radius, h=height); } if(reverse == true) { - translate([0,0,-supportheight]) cylinder(d=supportsize,h=supportheight); + translate([0,0,-supportheight]) cylinder(d=supportsize, h=supportheight); } else { cylinder(d=(supportsize),h=supportheight); } if(pillarsupport == "rear" && reverse == true) { - translate([-1,-supportsize/2,-height]) cube([2,supportsize/2,height]); + translate([-1,-supportsize/2,-height]) cube([2, supportsize/2, height]); } if(pillarsupport == "rear" && reverse == false) { - translate([-1,-supportsize/2,0]) cube([2,supportsize/2,height]); + translate([-1,-supportsize/2,0]) cube([2, supportsize/2, height]); } if(pillarsupport == "front" && reverse == true) { - translate([-1,0,-height]) cube([2,supportsize/2,height]); + translate([-1,0,-height]) cube([2, supportsize/2, height]); } if(pillarsupport == "front" && reverse == false) { - translate([-1,0,0]) cube([2,supportsize/2,height]); + translate([-1,0,0]) cube([2, supportsize/2, height]); } if(pillarsupport == "left" && reverse == true) { - translate([-supportsize/2,-1,-height]) cube([supportsize/2,2,height]); + translate([-supportsize/2,-1,-height]) cube([supportsize/2, 2, height]); } if(pillarsupport == "left" && reverse == false) { - translate([-supportsize/2,-1,0]) cube([supportsize/2,2,height]); + translate([-supportsize/2,-1,0]) cube([supportsize/2, 2, height]); } if(pillarsupport == "right" && reverse == true) { - translate([0,-1,-height]) cube([supportsize/2,2,height]); + translate([0,-1,-height]) cube([supportsize/2, 2, height]); } if(pillarsupport == "right" && reverse == false) { - translate([0,-1,0]) cube([supportsize/2,2,height]); + translate([0,-1,0]) cube([supportsize/2, 2, height]); } } // hole + if(sink == "none" && reverse == false) { + translate([0,0,-adj]) cylinder(d=holesize, h=height+(adj*2)); + } if(sink != "blind" && reverse == false) { - translate([0,0,-adj]) cylinder(d=holesize, h=height+(adj*2)); + translate([0,0,-adj]) cylinder(d=holesize, h=height+(adj*2)); } if(sink != "blind" && reverse == true) { - translate([0,0,-adj-height]) cylinder(d=holesize, h=height+(adj*2)); + translate([0,0,-adj-height]) cylinder(d=holesize, h=height+(adj*2)); } // countersink hole if(sink == "countersunk" && reverse == false) { - translate([0,0,-adj]) cylinder(d1=6.5, d2=holesize, h=3.25); + #translate([0,0, -adj]) cylinder(d1=6.5, d2=holesize, h=3.25); } if(sink == "countersunk" && reverse == true) { translate([0,0,+adj-2.5]) cylinder(d1=holesize, d2=6.5, h=3.25); diff --git a/mod/indent.scad b/mod/indent.scad index ed17048..f6978c6 100644 --- a/mod/indent.scad +++ b/mod/indent.scad @@ -31,105 +31,105 @@ module indent(loc_x, loc_y, loc_z, rotation, side, class, type, wallthick, gap, // 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,19,wallthick); + place(loc_x+2.375,-(wallthick+gap)+wallthick/2,loc_z+3.75,12,10,rotation,side) + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_slot(6,8,wallthick); } // power plug indent if(class == "power" && type == "pwr5.5_7.5x11.5" && rotation == 0 && side == "top") { @@ -166,71 +166,71 @@ module indent(loc_x, loc_y, loc_z, rotation, side, class, type, wallthick, gap, } // micro usb indent if(class == "usb2" && type == "micro" && rotation == 0 && side == "top") { - place(loc_x-2.5,-(wallthick+gap)+wallthick/2,loc_z+1.9,6,8,rotation,side) - rotate([90,0,0]) slot(6,12.5,wallthick); + place(loc_x-.5,-(wallthick+gap)+wallthick/2,loc_z+1.9,6,8,rotation,side) + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_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); + rotate([90,0,0]) long_slot(6,8,wallthick); } // audio jack indent if(class == "audio" && type == "jack_3.5" && rotation == 0 && side == "top") { @@ -265,4 +265,4 @@ module indent(loc_x, loc_y, loc_z, rotation, side, class, type, wallthick, gap, place(-gap-wallthick/2,loc_y+3.15,loc_z-3.5,8,8,rotation,side) rotate([90,0,0]) cylinder(d=10, h=wallthick); } -} +} \ No newline at end of file