rewrite of indents, added usb2-micro,usbc-single_horizontal,audio-jack_3.5 and video-hdmi_a indents in all orientations, top and bottom, created new mask openings for bottom side components as needed.
This commit is contained in:
@@ -12934,7 +12934,7 @@
|
|||||||
"top_front_right": "0",
|
"top_front_right": "0",
|
||||||
"top_rear_left": "0",
|
"top_rear_left": "0",
|
||||||
"top_rear_right": "0",
|
"top_rear_right": "0",
|
||||||
"top_standoff": "[6.75, 18, 2.5, 10, 4, 4, 0, 1, 0, 4.5, 5.1]",
|
"top_standoff": "[5.75, 18, 2.5, 10, 4, 4, 0, 1, 0, 4.5, 5.1]",
|
||||||
"view": "model",
|
"view": "model",
|
||||||
"vu_rotation": "[15, 0, 0]",
|
"vu_rotation": "[15, 0, 0]",
|
||||||
"wallthick": "2"
|
"wallthick": "2"
|
||||||
@@ -12991,7 +12991,7 @@
|
|||||||
"top_front_right": "-11",
|
"top_front_right": "-11",
|
||||||
"top_rear_left": "-11",
|
"top_rear_left": "-11",
|
||||||
"top_rear_right": "0",
|
"top_rear_right": "0",
|
||||||
"top_standoff": "[6.75, 18, 2.5, 10, 4, 4, 0, 1, 0, 4.5, 5.1]",
|
"top_standoff": "[5.75, 18, 2.5, 10, 4, 4, 0, 1, 0, 4.5, 5.1]",
|
||||||
"view": "model",
|
"view": "model",
|
||||||
"vu_rotation": "[15, 0, 0]",
|
"vu_rotation": "[15, 0, 0]",
|
||||||
"wallthick": "2"
|
"wallthick": "2"
|
||||||
@@ -13048,7 +13048,7 @@
|
|||||||
"top_front_right": "0",
|
"top_front_right": "0",
|
||||||
"top_rear_left": "0",
|
"top_rear_left": "0",
|
||||||
"top_rear_right": "0",
|
"top_rear_right": "0",
|
||||||
"top_standoff": "[6.75, 18, 2.5, 10, 4, 4, 0, 1, 0, 4.5, 5.1]",
|
"top_standoff": "[5.75, 18, 2.5, 10, 4, 4, 0, 1, 0, 4.5, 5.1]",
|
||||||
"view": "model",
|
"view": "model",
|
||||||
"vu_rotation": "[15, 0, 0]",
|
"vu_rotation": "[15, 0, 0]",
|
||||||
"wallthick": "2"
|
"wallthick": "2"
|
||||||
@@ -13105,7 +13105,7 @@
|
|||||||
"top_front_right": "0",
|
"top_front_right": "0",
|
||||||
"top_rear_left": "0",
|
"top_rear_left": "0",
|
||||||
"top_rear_right": "0",
|
"top_rear_right": "0",
|
||||||
"top_standoff": "[6.75, 18, 2.5, 10, 4, 4, 0, 1, 0, 4.5, 5.1]",
|
"top_standoff": "[5.75, 18, 2.5, 10, 4, 4, 0, 1, 0, 4.5, 5.1]",
|
||||||
"view": "model",
|
"view": "model",
|
||||||
"vu_rotation": "[15, 0, 0]",
|
"vu_rotation": "[15, 0, 0]",
|
||||||
"wallthick": "2"
|
"wallthick": "2"
|
||||||
@@ -13162,7 +13162,7 @@
|
|||||||
"top_front_right": "-11",
|
"top_front_right": "-11",
|
||||||
"top_rear_left": "-11",
|
"top_rear_left": "-11",
|
||||||
"top_rear_right": "0",
|
"top_rear_right": "0",
|
||||||
"top_standoff": "[6.75, 18, 2.5, 10, 4, 4, 0, 1, 0, 4.5, 5.1]",
|
"top_standoff": "[5.75, 18, 2.5, 10, 4, 4, 0, 1, 0, 4.5, 5.1]",
|
||||||
"view": "model",
|
"view": "model",
|
||||||
"vu_rotation": "[15, 0, 0]",
|
"vu_rotation": "[15, 0, 0]",
|
||||||
"wallthick": "2"
|
"wallthick": "2"
|
||||||
@@ -13219,7 +13219,7 @@
|
|||||||
"top_front_right": "0",
|
"top_front_right": "0",
|
||||||
"top_rear_left": "0",
|
"top_rear_left": "0",
|
||||||
"top_rear_right": "0",
|
"top_rear_right": "0",
|
||||||
"top_standoff": "[6.75, 18, 2.5, 10, 4, 4, 0, 1, 0, 4.5, 5.1]",
|
"top_standoff": "[5.75, 18, 2.5, 10, 4, 4, 0, 1, 0, 4.5, 5.1]",
|
||||||
"view": "model",
|
"view": "model",
|
||||||
"vu_rotation": "[15, 0, 0]",
|
"vu_rotation": "[15, 0, 0]",
|
||||||
"wallthick": "2"
|
"wallthick": "2"
|
||||||
@@ -13276,7 +13276,7 @@
|
|||||||
"top_front_right": "0",
|
"top_front_right": "0",
|
||||||
"top_rear_left": "0",
|
"top_rear_left": "0",
|
||||||
"top_rear_right": "0",
|
"top_rear_right": "0",
|
||||||
"top_standoff": "[6.75, 18, 2.5, 10, 4, 4, 0, 1, 0, 4.5, 5.1]",
|
"top_standoff": "[5.75, 18, 2.5, 10, 4, 4, 0, 1, 0, 4.5, 5.1]",
|
||||||
"view": "model",
|
"view": "model",
|
||||||
"vu_rotation": "[15, 0, 0]",
|
"vu_rotation": "[15, 0, 0]",
|
||||||
"wallthick": "2"
|
"wallthick": "2"
|
||||||
@@ -13333,7 +13333,7 @@
|
|||||||
"top_front_right": "0",
|
"top_front_right": "0",
|
||||||
"top_rear_left": "0",
|
"top_rear_left": "0",
|
||||||
"top_rear_right": "0",
|
"top_rear_right": "0",
|
||||||
"top_standoff": "[6.75, 20, 2.5, 10, 4, 4, 0, 1, 0, 4.5, 5.1]",
|
"top_standoff": "[5.75, 20, 2.5, 10, 4, 4, 0, 1, 0, 4.5, 5.1]",
|
||||||
"view": "model",
|
"view": "model",
|
||||||
"vu_rotation": "[15, 0, 0]",
|
"vu_rotation": "[15, 0, 0]",
|
||||||
"wallthick": "3"
|
"wallthick": "3"
|
||||||
@@ -13390,7 +13390,7 @@
|
|||||||
"top_front_right": "0",
|
"top_front_right": "0",
|
||||||
"top_rear_left": "0",
|
"top_rear_left": "0",
|
||||||
"top_rear_right": "0",
|
"top_rear_right": "0",
|
||||||
"top_standoff": "[6.75, 20, 2.5, 10, 4, 4, 0, 1, 0, 4.5, 5.1]",
|
"top_standoff": "[5.75, 20, 2.5, 10, 4, 4, 0, 1, 0, 4.5, 5.1]",
|
||||||
"view": "model",
|
"view": "model",
|
||||||
"vu_rotation": "[15, 0, 0]",
|
"vu_rotation": "[15, 0, 0]",
|
||||||
"wallthick": "3"
|
"wallthick": "3"
|
||||||
@@ -13447,7 +13447,7 @@
|
|||||||
"top_front_right": "0",
|
"top_front_right": "0",
|
||||||
"top_rear_left": "0",
|
"top_rear_left": "0",
|
||||||
"top_rear_right": "0",
|
"top_rear_right": "0",
|
||||||
"top_standoff": "[6.75, 20, 2.5, 10, 4, 4, 0, 1, 0, 4.5, 5.1]",
|
"top_standoff": "[5.75, 20, 2.5, 10, 4, 4, 0, 1, 0, 4.5, 5.1]",
|
||||||
"view": "model",
|
"view": "model",
|
||||||
"vu_rotation": "[15, 0, 0]",
|
"vu_rotation": "[15, 0, 0]",
|
||||||
"wallthick": "2"
|
"wallthick": "2"
|
||||||
@@ -13504,7 +13504,7 @@
|
|||||||
"top_front_right": "0",
|
"top_front_right": "0",
|
||||||
"top_rear_left": "0",
|
"top_rear_left": "0",
|
||||||
"top_rear_right": "0",
|
"top_rear_right": "0",
|
||||||
"top_standoff": "[6.75, 20, 2.5, 10, 4, 4, 0, 1, 0, 4.5, 5.1]",
|
"top_standoff": "[5.75, 20, 2.5, 10, 4, 4, 0, 1, 0, 4.5, 5.1]",
|
||||||
"view": "model",
|
"view": "model",
|
||||||
"vu_rotation": "[15, 0, 0]",
|
"vu_rotation": "[15, 0, 0]",
|
||||||
"wallthick": "2"
|
"wallthick": "2"
|
||||||
|
|||||||
@@ -2072,20 +2072,7 @@ module open_io() {
|
|||||||
|
|
||||||
// indents
|
// indents
|
||||||
if(indents == true) {
|
if(indents == true) {
|
||||||
if(type == "micro") {
|
indent(loc_x,loc_y,bottom_height+pcb_loc_z-adjust,rotation,side,class,type,wallthick,gap,floorthick,pcb_z);
|
||||||
translate([loc_x-.6,loc_y-gap-wallthick/2+1,bottom_height+pcb_loc_z+1.9]) rotate([90,0,0]) slot(6,8,wallthick);
|
|
||||||
}
|
|
||||||
if(type == "hdmi_a" && side == "top") {
|
|
||||||
translate([loc_x+2.375,loc_y-gap-wallthick/2+1,bottom_height+pcb_loc_z+3.75]) rotate([90,0,0]) slot(12,10,wallthick);
|
|
||||||
}
|
|
||||||
if(type == "pwr5.5_7.5x11.5") {
|
|
||||||
translate([loc_x+3.5,loc_y-gap-wallthick/2+1,bottom_height+pcb_loc_z+6.25])
|
|
||||||
rotate([90,0,0]) cylinder(d=10, h=wallthick+(2*adjust));
|
|
||||||
}
|
|
||||||
if(type == "pwr2.5_5x7.5") {
|
|
||||||
translate([loc_x+2.75,loc_y-gap-wallthick/2,bottom_height+pcb_loc_z+2.1])
|
|
||||||
rotate([90,0,0]) cylinder(d=6, h=wallthick+(2*adjust));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// bottom cooling openings
|
// bottom cooling openings
|
||||||
|
|||||||
@@ -2538,11 +2538,8 @@ module mask(loc_x,loc_y,loc_z,rotation,side,class,type,wallthick,gap,floorthick,
|
|||||||
$fn=90;
|
$fn=90;
|
||||||
|
|
||||||
// hdmi opening
|
// hdmi opening
|
||||||
if(type == "hdmi_a" && side == "bottom") {
|
|
||||||
place(loc_x,loc_y-1,loc_z-pcb_z,15,11.5,rotation,side) hdmi_open("hdmi_a");
|
|
||||||
}
|
|
||||||
if(type == "hdmi_a" && side == "top" && rotation == 0) {
|
if(type == "hdmi_a" && side == "top" && rotation == 0) {
|
||||||
place(loc_x-.675,loc_y,loc_z+.25,15,11.5,rotation,side) hdmi_open("hdmi_a");
|
place(loc_x-.5,loc_y,loc_z,15,11.5,rotation,side) hdmi_open("hdmi_a");
|
||||||
}
|
}
|
||||||
if(type == "hdmi_a" && side == "top" && rotation == 90) {
|
if(type == "hdmi_a" && side == "top" && rotation == 90) {
|
||||||
place(loc_x-1,loc_y,loc_z,15,11.5,rotation,side) hdmi_open("hdmi_a");
|
place(loc_x-1,loc_y,loc_z,15,11.5,rotation,side) hdmi_open("hdmi_a");
|
||||||
@@ -2553,7 +2550,19 @@ module mask(loc_x,loc_y,loc_z,rotation,side,class,type,wallthick,gap,floorthick,
|
|||||||
if(type == "hdmi_a" && side == "top" && rotation == 270) {
|
if(type == "hdmi_a" && side == "top" && rotation == 270) {
|
||||||
place(loc_x+1,loc_y-.5,loc_z,15,11.5,rotation,side) hdmi_open("hdmi_a");
|
place(loc_x+1,loc_y-.5,loc_z,15,11.5,rotation,side) hdmi_open("hdmi_a");
|
||||||
}
|
}
|
||||||
// hdmi micro opening
|
if(type == "hdmi_a" && side == "bottom" && rotation == 0) {
|
||||||
|
place(loc_x,loc_y-1,loc_z-pcb_z,15,11.5,rotation,side) hdmi_open("hdmi_a");
|
||||||
|
}
|
||||||
|
if(type == "hdmi_a" && side == "bottom" && rotation == 90) {
|
||||||
|
place(loc_x,loc_y,loc_z-pcb_z,15,11.5,rotation,side) hdmi_open("hdmi_a");
|
||||||
|
}
|
||||||
|
if(type == "hdmi_a" && side == "bottom" && rotation == 180) {
|
||||||
|
place(loc_x-.5,loc_y-1,loc_z-pcb_z,15,11.5,rotation,side) hdmi_open("hdmi_a");
|
||||||
|
}
|
||||||
|
if(type == "hdmi_a" && side == "bottom" && rotation == 270) {
|
||||||
|
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(type == "hdmi_micro" && rotation == 0) {
|
||||||
place(loc_x,loc_y,loc_z,7.25,6.5,rotation,side) hdmi_open("hdmi_micro");
|
place(loc_x,loc_y,loc_z,7.25,6.5,rotation,side) hdmi_open("hdmi_micro");
|
||||||
}
|
}
|
||||||
@@ -2813,6 +2822,15 @@ module mask(loc_x,loc_y,loc_z,rotation,side,class,type,wallthick,gap,floorthick,
|
|||||||
if(class == "usb2" && type == "micro" && rotation == 0 && side == "bottom") {
|
if(class == "usb2" && type == "micro" && rotation == 0 && side == "bottom") {
|
||||||
place(loc_x-1,loc_y-3,loc_z-1.25,8,3,rotation,side) microusb_open();
|
place(loc_x-1,loc_y-3,loc_z-1.25,8,3,rotation,side) microusb_open();
|
||||||
}
|
}
|
||||||
|
if(class == "usb2" && type == "micro" && rotation == 90 && side == "bottom") {
|
||||||
|
place(loc_x+4.5,loc_y-1,loc_z-1.25,8,3,rotation,side) microusb_open();
|
||||||
|
}
|
||||||
|
if(class == "usb2" && type == "micro" && rotation == 180 && side == "bottom") {
|
||||||
|
place(loc_x,loc_y+4.5,loc_z-1.25,8,3,rotation,side) microusb_open();
|
||||||
|
}
|
||||||
|
if(class == "usb2" && type == "micro" && rotation == 270 && side == "bottom") {
|
||||||
|
place(loc_x-3,loc_y,loc_z-1.25,8,3,rotation,side) microusb_open();
|
||||||
|
}
|
||||||
// double stack usb opening
|
// double stack usb opening
|
||||||
if((type == "double_stacked_a" || type == "double_stacked_usb3-usbc") && rotation == 0) {
|
if((type == "double_stacked_a" || type == "double_stacked_usb3-usbc") && rotation == 0) {
|
||||||
place(loc_x-1,loc_y-6,loc_z,15.5,16,rotation,side)
|
place(loc_x-1,loc_y-6,loc_z,15.5,16,rotation,side)
|
||||||
@@ -2865,20 +2883,36 @@ module mask(loc_x,loc_y,loc_z,rotation,side,class,type,wallthick,gap,floorthick,
|
|||||||
cube([15,8,7.5]);
|
cube([15,8,7.5]);
|
||||||
}
|
}
|
||||||
// single horizontal usbc opening
|
// single horizontal usbc opening
|
||||||
if(class == "usbc" && type == "single_horizontal" && rotation == 0) {
|
if(class == "usbc" && type == "single_horizontal" && rotation == 0 && side == "top") {
|
||||||
place(loc_x+1.5,loc_y+2,loc_z+1.75,6,8,rotation,side)
|
place(loc_x+1.5,loc_y+2,loc_z+1.75,6,8,rotation,side)
|
||||||
rotate([90,0,0]) slot(3.75,6,8);
|
rotate([90,0,0]) slot(3.75,6,8);
|
||||||
}
|
}
|
||||||
if(class == "usbc" && type == "single_horizontal" && rotation == 90) {
|
if(class == "usbc" && type == "single_horizontal" && rotation == 90 && side == "top") {
|
||||||
place(loc_x+2,loc_y+1.5,loc_z+1.75,6,8,rotation,side)
|
place(loc_x+2,loc_y+1.5,loc_z+1.75,6,8,rotation,side)
|
||||||
rotate([90,0,0]) slot(3.75,6,8);
|
rotate([90,0,0]) slot(3.75,6,8);
|
||||||
}
|
}
|
||||||
if(class == "usbc" && type == "single_horizontal" && rotation == 180) {
|
if(class == "usbc" && type == "single_horizontal" && rotation == 180 && side == "top") {
|
||||||
place(loc_x+1.5,loc_y-3,loc_z+2,6,8,rotation,side)
|
place(loc_x+1.5,loc_y-3-adjust,loc_z+2,6,8,rotation,side)
|
||||||
rotate([90,0,0]) slot(3.75,6,8);
|
rotate([90,0,0]) slot(3.75,6,8);
|
||||||
}
|
}
|
||||||
if(class == "usbc" && type == "single_horizontal" && rotation == 270) {
|
if(class == "usbc" && type == "single_horizontal" && rotation == 270 && side == "top") {
|
||||||
place(loc_x-3,loc_y+1.5,loc_z+1.75,6,8,rotation,side)
|
place(loc_x-3-adjust,loc_y+1.5,loc_z+1.75,6,8,rotation,side)
|
||||||
|
rotate([90,0,0]) slot(3.75,6,8);
|
||||||
|
}
|
||||||
|
if(class == "usbc" && type == "single_horizontal" && rotation == 0 && side == "bottom") {
|
||||||
|
place(loc_x+1.5,loc_y+2,loc_z-3.25,6,8,rotation,side)
|
||||||
|
rotate([90,0,0]) slot(3.75,6,8);
|
||||||
|
}
|
||||||
|
if(class == "usbc" && type == "single_horizontal" && rotation == 90 && side == "bottom") {
|
||||||
|
place(loc_x-3-adjust,loc_y+1.5,loc_z-3.25,6,8,rotation,side)
|
||||||
|
rotate([90,0,0]) slot(3.75,6,8);
|
||||||
|
}
|
||||||
|
if(class == "usbc" && type == "single_horizontal" && rotation == 180 && side == "bottom") {
|
||||||
|
place(loc_x+1.5,loc_y-3-adjust,loc_z-3.25,6,8,rotation,side)
|
||||||
|
rotate([90,0,0]) slot(3.75,6,8);
|
||||||
|
}
|
||||||
|
if(class == "usbc" && type == "single_horizontal" && rotation == 270 && side == "bottom") {
|
||||||
|
place(loc_x+2,loc_y+1.5,loc_z-3.25,6,8,rotation,side)
|
||||||
rotate([90,0,0]) slot(3.75,6,8);
|
rotate([90,0,0]) slot(3.75,6,8);
|
||||||
}
|
}
|
||||||
// ir opening
|
// ir opening
|
||||||
@@ -3001,33 +3035,61 @@ module mask(loc_x,loc_y,loc_z,rotation,side,class,type,wallthick,gap,floorthick,
|
|||||||
translate([1,8,3]) rotate([90,0,0]) slot(7.5,38.5,10);
|
translate([1,8,3]) rotate([90,0,0]) slot(7.5,38.5,10);
|
||||||
}
|
}
|
||||||
// audio jack opening
|
// audio jack opening
|
||||||
if(type == "jack_3.5" && rotation == 0) {
|
if(type == "jack_3.5" && rotation == 0 && side == "top") {
|
||||||
place(loc_x,loc_y,loc_z,7.5,7.5,rotation,side)
|
place(loc_x,loc_y,loc_z,7.5,7.5,rotation,side)
|
||||||
union() {
|
union() {
|
||||||
translate([3.25,2,2]) rotate([90,0,0]) cylinder(d=5, h=8);
|
translate([3.15,2,2]) rotate([90,0,0]) cylinder(d=5, h=8);
|
||||||
translate([-.5,-.5,0]) cube([7.5,2.5,4.5]);
|
translate([-.5,-.5,0]) cube([7.5,2.5,4.5]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(type == "jack_3.5" && rotation == 90) {
|
if(type == "jack_3.5" && rotation == 90 && side == "top") {
|
||||||
place(loc_x,loc_y,loc_z,7.5,7.5,rotation,side)
|
place(loc_x,loc_y,loc_z,7.5,7.5,rotation,side)
|
||||||
union() {
|
union() {
|
||||||
translate([4.1,2,2]) rotate([90,0,0]) cylinder(d=5, h=8);
|
translate([4.1,2,2]) rotate([90,0,0]) cylinder(d=5, h=8);
|
||||||
translate([.5,-.5,0]) cube([7.5,2.5,4.5]);
|
translate([.5,-.5,0]) cube([7.5,2.5,4.5]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(type == "jack_3.5" && rotation == 180) {
|
if(type == "jack_3.5" && rotation == 180 && side == "top") {
|
||||||
place(loc_x,loc_y,loc_z,7.5,7.5,rotation,side)
|
place(loc_x,loc_y,loc_z,7.5,7.5,rotation,side)
|
||||||
union() {
|
union() {
|
||||||
translate([4.1,-2.5,2]) rotate([90,0,0]) cylinder(d=5, h=8);
|
translate([4.1,-2.5,2]) rotate([90,0,0]) cylinder(d=5, h=8);
|
||||||
translate([.5,-5,0]) cube([7.5,2.5,4.5]);
|
translate([.5,-5,0]) cube([7.5,2.5,4.5]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(type == "jack_3.5" && rotation == 270) {
|
if(type == "jack_3.5" && rotation == 270 && side == "top") {
|
||||||
place(loc_x,loc_y,loc_z,7.5,7.5,rotation,side)
|
place(loc_x,loc_y,loc_z,7.5,7.5,rotation,side)
|
||||||
union() {
|
union() {
|
||||||
translate([3,-2.5,2]) rotate([90,0,0]) cylinder(d=5, h=8);
|
translate([3.15,-2.5,2]) rotate([90,0,0]) cylinder(d=5, h=8);
|
||||||
translate([-.5,-5,0]) cube([7.5,2.5,4.5]);
|
translate([-.5,-5,0]) cube([7.5,2.5,4.5]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if(type == "jack_3.5" && rotation == 0 && side == "bottom") {
|
||||||
|
place(loc_x-1,loc_y,loc_z-1.5,7.5,7.5,rotation,side)
|
||||||
|
union() {
|
||||||
|
translate([3.15,2,2]) rotate([90,0,0]) cylinder(d=5, h=8);
|
||||||
|
translate([-.5,-.5,0]) cube([7.5,2.5,4.5]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(type == "jack_3.5" && rotation == 90 && side == "bottom") {
|
||||||
|
place(loc_x+4.1,loc_y,loc_z-1.5,7.5,7.5,rotation,side)
|
||||||
|
union() {
|
||||||
|
translate([4.1,2,2]) rotate([90,0,0]) cylinder(d=5, h=8);
|
||||||
|
translate([.5,-.5,0]) cube([7.5,2.5,4.5]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(type == "jack_3.5" && rotation == 180 && side == "bottom") {
|
||||||
|
place(loc_x-1,loc_y,loc_z-1.5,7.5,7.5,rotation,side)
|
||||||
|
union() {
|
||||||
|
translate([4.1,-2.5,2]) rotate([90,0,0]) cylinder(d=5, h=8);
|
||||||
|
translate([.5,-5,0]) cube([7.5,2.5,4.5]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(type == "jack_3.5" && rotation == 270 && side == "bottom") {
|
||||||
|
place(loc_x+4.1,loc_y,loc_z-1.5,7.5,7.5,rotation,side)
|
||||||
|
union() {
|
||||||
|
translate([3,-2.5,2]) rotate([90,0,0]) cylinder(d=5, h=8);
|
||||||
|
translate([-.5,-5,0]) cube([7.5,2.5,4.5]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// button opening
|
// button opening
|
||||||
if(type == "momentary_6x6x4") {
|
if(type == "momentary_6x6x4") {
|
||||||
@@ -3175,3 +3237,257 @@ 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user