GENERATE_SUPPORT=true; GENERATE_SPACERS=true; front_tophalf(); front_bothalf(); module front_tophalf() { color("red") rotate([0,180,0]) difference() { front_panel(); splitter(); } } module front_bothalf() { color("green") rotate([0,180,0]) intersection() { front_panel(); splitter(); } } module splitter() { CORNERX=0.044097; WIDTH=102.586675; OFFSET=5; INSET=25; translate([CORNERX-OFFSET,-OFFSET,-20]) linear_extrude(height=40) difference() { square([WIDTH+2*OFFSET,82]); translate([OFFSET+INSET,75]) square([WIDTH-2*INSET,20]); } } module mink_cutout() { difference() { minkowski() { child(0); child(1); } child(0); } } module front_panel() { // Face thickness is 5mm HEIGHT=5; // Spacer SPACER_RAD=2.5; // M3 socket cap (5.6mm diam) M3_MINK_RAD=1.4; M3_HEAD=3; // Total Boundary is width=102.586675 height=134.086561 difference() { // Layer 1 :: Front // width=102.586675 height=134.086561 linear_extrude(height=HEIGHT) polygon(points=[[ 5.043964,129.042597], [ 5.043964,134.042464], [ 97.542711,134.042464], [ 97.542711,129.042597], [102.542578,129.042597], [102.542578,119.042863], [ 97.542711,119.042863], [ 97.542711, 10.044176], [102.542578, 10.044176], [102.542578, 0.044097], [ 0.044097, 0.044097], [ 0.044097, 10.044176], [ 5.043964, 10.044176], [ 5.043964,119.042863], [ 0.044097,119.042863], [ 0.044097,129.042597], ], paths=[0:16]); // Cutouts linear_extrude(height=HEIGHT) group() { // Layer 1 :: // width=3.287999 height=3.287999 polygon(points=[[ 11.393620, 4.044198], [ 10.925087, 5.175567], [ 9.793717, 5.644100], [ 8.662348, 5.175567], [ 8.193815, 4.044198], [ 8.662348, 2.912828], [ 9.793717, 2.444295], [ 10.925087, 2.912828], ], paths=[0:8]); // Layer 1 :: // width=3.287999 height=3.287999 polygon(points=[[ 94.392860, 4.044198], [ 93.924327, 5.175567], [ 92.792958, 5.644100], [ 91.661589, 5.175567], [ 91.193056, 4.044198], [ 91.661589, 2.912828], [ 92.792958, 2.444295], [ 93.924327, 2.912828], ], paths=[0:8]); // Layer 1 :: // width=3.287999 height=3.288344 polygon(points=[[ 11.393620, 69.043503], [ 10.925087, 70.174873], [ 9.793717, 70.643405], [ 8.662348, 70.174873], [ 8.193815, 69.043503], [ 8.662348, 67.911962], [ 9.793717, 67.443256], [ 10.925087, 67.911962], ], paths=[0:8]); // Layer 1 :: // width=3.287999 height=3.288344 polygon(points=[[ 94.392860, 69.043503], [ 93.924327, 70.174873], [ 92.792958, 70.643405], [ 91.661589, 70.174873], [ 91.193056, 69.043503], [ 91.661589, 67.911962], [ 92.792958, 67.443256], [ 93.924327, 67.911962], ], paths=[0:8]); // Layer 1 :: cont // width=9.088162 height=9.088162 polygon(points=[[ 64.793289, 22.544016], [ 69.293273, 22.544016], [ 73.793256, 22.544016], [ 73.793256, 18.044032], [ 73.793256, 13.544048], [ 69.293273, 13.544048], [ 64.793289, 13.544048], [ 64.793289, 18.044032], ], paths=[0:8]); // Layer 1 :: lcd // width=75.587462 height=41.587815 polygon(points=[[ 13.543704, 83.293107], [ 89.042971, 83.293107], [ 89.042971,124.792727], [ 13.543704,124.792727], ], paths=[0:4]); // Layer 1 :: dbug // width=5.088406 height=5.088062 polygon(points=[[ 53.793443, 18.044032], [ 53.458925, 19.294257], [ 52.543563, 20.209275], [ 51.293338, 20.543793], [ 50.043113, 20.209275], [ 49.127751, 19.294257], [ 48.793232, 18.044032], [ 49.127751, 16.793807], [ 50.043113, 15.878445], [ 51.293338, 15.543926], [ 52.543563, 15.878445], [ 53.458925, 16.793807], ], paths=[0:12]); // Layer 1 :: bar // width=5.088406 height=5.088062 polygon(points=[[ 17.793918, 18.044032], [ 17.459399, 19.294257], [ 16.544038, 20.209275], [ 15.293812, 20.543793], [ 14.043587, 20.209275], [ 13.128225, 19.294257], [ 12.793707, 18.044032], [ 13.128225, 16.793807], [ 14.043587, 15.878445], [ 15.293812, 15.543926], [ 16.544038, 15.878445], [ 17.459399, 16.793807], ], paths=[0:12]); // Layer 1 :: foo // width=5.088406 height=5.088406 polygon(points=[[ 17.793918, 54.043557], [ 17.459399, 55.293783], [ 16.544038, 56.209144], [ 15.293812, 56.543663], [ 14.043587, 56.209144], [ 13.128225, 55.293783], [ 12.793707, 54.043557], [ 13.128225, 52.793332], [ 14.043587, 51.877970], [ 15.293812, 51.543452], [ 16.544038, 51.877970], [ 17.459399, 52.793332], ], paths=[0:12]); // Layer 1 :: pow // width=5.088406 height=5.088406 polygon(points=[[ 53.793443, 54.043557], [ 53.458925, 55.293783], [ 52.543563, 56.209144], [ 51.293338, 56.543663], [ 50.043113, 56.209144], [ 49.127751, 55.293783], [ 48.793232, 54.043557], [ 49.127751, 52.793332], [ 50.043113, 51.877970], [ 51.293338, 51.543452], [ 52.543563, 51.877970], [ 53.458925, 52.793332], ], paths=[0:12]); // Layer 1 :: z- // width=13.087918 height=13.087918 polygon(points=[[ 81.793113, 11.544170], [ 87.293207, 11.544170], [ 92.792958, 11.544170], [ 93.499891, 11.837004], [ 93.792725, 12.543937], [ 93.792725, 18.043688], [ 93.792725, 23.543783], [ 93.499891, 24.251061], [ 92.792958, 24.543894], [ 87.293207, 24.543894], [ 81.793113, 24.543894], [ 81.085834, 24.251061], [ 80.793001, 23.543783], [ 80.793001, 18.043688], [ 80.793001, 12.543937], [ 81.085834, 11.837004], ], paths=[0:16]); // Layer 1 :: z+ // width=13.087918 height=13.087918 polygon(points=[[ 80.793001, 48.543462], [ 81.085834, 47.836529], [ 81.793113, 47.543696], [ 87.293207, 47.543696], [ 92.792958, 47.543696], [ 93.499891, 47.836529], [ 93.792725, 48.543462], [ 93.792725, 54.043557], [ 93.792725, 59.543652], [ 93.499891, 60.250586], [ 92.792958, 60.543419], [ 87.293207, 60.543419], [ 81.793113, 60.543419], [ 81.085834, 60.250586], [ 80.793001, 59.543652], [ 80.793001, 54.043557], ], paths=[0:16]); // Layer 1 :: x- // width=13.088262 height=13.087918 polygon(points=[[ 27.793652, 11.544170], [ 33.293575, 11.544170], [ 38.793498, 11.544170], [ 39.500604, 11.837004], [ 39.793609, 12.543937], [ 39.793609, 18.043688], [ 39.793609, 23.543783], [ 39.500604, 24.251061], [ 38.793498, 24.543894], [ 33.293575, 24.543894], [ 27.793652, 24.543894], [ 27.086546, 24.251061], [ 26.793541, 23.543783], [ 26.793541, 18.043688], [ 26.793541, 12.543937], [ 27.086546, 11.837004], ], paths=[0:16]); // Layer 1 :: y+ // width=13.088262 height=13.087918 polygon(points=[[ 26.793541, 48.543462], [ 27.086546, 47.836529], [ 27.793652, 47.543696], [ 33.293575, 47.543696], [ 38.793498, 47.543696], [ 39.500604, 47.836529], [ 39.793609, 48.543462], [ 39.793609, 54.043557], [ 39.793609, 59.543652], [ 39.500604, 60.250586], [ 38.793498, 60.543419], [ 33.293575, 60.543419], [ 27.793652, 60.543419], [ 27.086546, 60.250586], [ 26.793541, 59.543652], [ 26.793541, 54.043557], ], paths=[0:16]); // Layer 1 :: ok // width=13.087918 height=13.088262 polygon(points=[[ 80.793001, 30.543872], [ 81.085834, 29.836594], [ 81.793113, 29.543761], [ 87.293207, 29.543761], [ 92.792958, 29.543761], [ 93.499891, 29.836594], [ 93.792725, 30.543872], [ 93.792725, 36.043623], [ 93.792725, 41.543717], [ 93.499891, 42.250996], [ 92.792958, 42.543829], [ 87.293207, 42.543829], [ 81.793113, 42.543829], [ 81.085834, 42.250996], [ 80.793001, 41.543717], [ 80.793001, 36.043623], ], paths=[0:16]); // Layer 1 :: cancel // width=13.088262 height=13.088262 polygon(points=[[ 74.793023, 29.543761], [ 75.500301, 29.836594], [ 75.793134, 30.543872], [ 75.793134, 36.043623], [ 75.793134, 41.543717], [ 75.500301, 42.250996], [ 74.793023, 42.543829], [ 69.293273, 42.543829], [ 63.793178, 42.543829], [ 63.085900, 42.250996], [ 62.793066, 41.543717], [ 62.793066, 36.043623], [ 62.793066, 30.543872], [ 63.085900, 29.836594], [ 63.793178, 29.543761], [ 69.293273, 29.543761], ], paths=[0:16]); // Layer 1 :: x- // width=13.087918 height=13.088262 polygon(points=[[ 44.793476, 30.543872], [ 45.086309, 29.836594], [ 45.793587, 29.543761], [ 51.293510, 29.543761], [ 56.793433, 29.543761], [ 57.500366, 29.836594], [ 57.793199, 30.543872], [ 57.793199, 36.043623], [ 57.793199, 41.543717], [ 57.500366, 42.250996], [ 56.793433, 42.543829], [ 51.293510, 42.543829], [ 45.793587, 42.543829], [ 45.086309, 42.250996], [ 44.793476, 41.543717], [ 44.793476, 36.043623], ], paths=[0:16]); // Layer 1 :: zero // width=13.088262 height=13.088262 polygon(points=[[ 26.793541, 30.543872], [ 27.086546, 29.836594], [ 27.793652, 29.543761], [ 33.293575, 29.543761], [ 38.793498, 29.543761], [ 39.500604, 29.836594], [ 39.793609, 30.543872], [ 39.793609, 36.043623], [ 39.793609, 41.543717], [ 39.500604, 42.250996], [ 38.793498, 42.543829], [ 33.293575, 42.543829], [ 27.793652, 42.543829], [ 27.086546, 42.250996], [ 26.793541, 41.543717], [ 26.793541, 36.043623], ], paths=[0:16]); // Layer 1 :: x+ // width=13.087918 height=13.088262 polygon(points=[[ 21.793674, 30.543872], [ 21.793674, 36.043623], [ 21.793674, 41.543717], [ 21.500841, 42.250996], [ 20.793563, 42.543829], [ 15.293640, 42.543829], [ 9.793717, 42.543829], [ 9.086784, 42.250996], [ 8.793951, 41.543717], [ 8.793951, 36.043623], [ 8.793951, 30.543872], [ 9.086784, 29.836594], [ 9.793717, 29.543761], [ 15.293640, 29.543761], [ 20.793563, 29.543761], [ 21.500841, 29.836594], ], paths=[0:16]); } // cutouts for the M3 socket cap head translate([0,0,HEIGHT-M3_HEAD]) linear_extrude(height=M3_HEAD) group() { minkowski() { // Layer 1 :: // width=3.287999 height=3.287999 polygon(points=[[ 11.393620, 4.044198], [ 10.925087, 5.175567], [ 9.793717, 5.644100], [ 8.662348, 5.175567], [ 8.193815, 4.044198], [ 8.662348, 2.912828], [ 9.793717, 2.444295], [ 10.925087, 2.912828], ], paths=[0:8]); circle(M3_MINK_RAD, $fn=8); } minkowski() { // Layer 1 :: // width=3.287999 height=3.287999 polygon(points=[[ 94.392860, 4.044198], [ 93.924327, 5.175567], [ 92.792958, 5.644100], [ 91.661589, 5.175567], [ 91.193056, 4.044198], [ 91.661589, 2.912828], [ 92.792958, 2.444295], [ 93.924327, 2.912828], ], paths=[0:8]); circle(M3_MINK_RAD, $fn=8); } minkowski() { // Layer 1 :: // width=3.287999 height=3.288344 polygon(points=[[ 11.393620, 69.043503], [ 10.925087, 70.174873], [ 9.793717, 70.643405], [ 8.662348, 70.174873], [ 8.193815, 69.043503], [ 8.662348, 67.911962], [ 9.793717, 67.443256], [ 10.925087, 67.911962], ], paths=[0:8]); circle(M3_MINK_RAD, $fn=8); } minkowski() { // Layer 1 :: // width=3.287999 height=3.288344 polygon(points=[[ 94.392860, 69.043503], [ 93.924327, 70.174873], [ 92.792958, 70.643405], [ 91.661589, 70.174873], [ 91.193056, 69.043503], [ 91.661589, 67.911962], [ 92.792958, 67.443256], [ 93.924327, 67.911962], ], paths=[0:8]); circle(M3_MINK_RAD, $fn=8); } } } // Spacers between PCB and face is 1/8" if (GENERATE_SPACERS) { translate([0,0,-3.175]) linear_extrude(height=3.175) group() { mink_cutout() { // Layer 1 :: // width=3.287999 height=3.287999 polygon(points=[[ 11.393620, 4.044198], [ 10.925087, 5.175567], [ 9.793717, 5.644100], [ 8.662348, 5.175567], [ 8.193815, 4.044198], [ 8.662348, 2.912828], [ 9.793717, 2.444295], [ 10.925087, 2.912828], ], paths=[0:8]); rotate(45) circle(SPACER_RAD, $fn=4); } mink_cutout() { // Layer 1 :: // width=3.287999 height=3.287999 polygon(points=[[ 94.392860, 4.044198], [ 93.924327, 5.175567], [ 92.792958, 5.644100], [ 91.661589, 5.175567], [ 91.193056, 4.044198], [ 91.661589, 2.912828], [ 92.792958, 2.444295], [ 93.924327, 2.912828], ], paths=[0:8]); rotate(45) circle(SPACER_RAD, $fn=4); } mink_cutout() { // Layer 1 :: // width=3.287999 height=3.288344 polygon(points=[[ 11.393620, 69.043503], [ 10.925087, 70.174873], [ 9.793717, 70.643405], [ 8.662348, 70.174873], [ 8.193815, 69.043503], [ 8.662348, 67.911962], [ 9.793717, 67.443256], [ 10.925087, 67.911962], ], paths=[0:8]); rotate(45) circle(SPACER_RAD, $fn=4); } mink_cutout() { // Layer 1 :: // width=3.287999 height=3.288344 polygon(points=[[ 94.392860, 69.043503], [ 93.924327, 70.174873], [ 92.792958, 70.643405], [ 91.661589, 70.174873], [ 91.193056, 69.043503], [ 91.661589, 67.911962], [ 92.792958, 67.443256], [ 93.924327, 67.911962], ], paths=[0:8]); rotate(45) circle(SPACER_RAD, $fn=4); } } } // support for socket cap head cutouts if (GENERATE_SUPPORT) { translate([0,0,HEIGHT-M3_HEAD+0.3]) linear_extrude(height=M3_HEAD-0.3) group() { mink_cutout() { // Layer 1 :: // width=3.287999 height=3.287999 polygon(points=[[ 11.393620, 4.044198], [ 10.925087, 5.175567], [ 9.793717, 5.644100], [ 8.662348, 5.175567], [ 8.193815, 4.044198], [ 8.662348, 2.912828], [ 9.793717, 2.444295], [ 10.925087, 2.912828], ], paths=[0:8]); circle(M3_MINK_RAD-0.6, $fn=8); } mink_cutout() { // Layer 1 :: // width=3.287999 height=3.287999 polygon(points=[[ 94.392860, 4.044198], [ 93.924327, 5.175567], [ 92.792958, 5.644100], [ 91.661589, 5.175567], [ 91.193056, 4.044198], [ 91.661589, 2.912828], [ 92.792958, 2.444295], [ 93.924327, 2.912828], ], paths=[0:8]); circle(M3_MINK_RAD-0.6, $fn=8); } mink_cutout() { // Layer 1 :: // width=3.287999 height=3.288344 polygon(points=[[ 11.393620, 69.043503], [ 10.925087, 70.174873], [ 9.793717, 70.643405], [ 8.662348, 70.174873], [ 8.193815, 69.043503], [ 8.662348, 67.911962], [ 9.793717, 67.443256], [ 10.925087, 67.911962], ], paths=[0:8]); circle(M3_MINK_RAD-0.6, $fn=8); } mink_cutout() { // Layer 1 :: // width=3.287999 height=3.288344 polygon(points=[[ 94.392860, 69.043503], [ 93.924327, 70.174873], [ 92.792958, 70.643405], [ 91.661589, 70.174873], [ 91.193056, 69.043503], [ 91.661589, 67.911962], [ 92.792958, 67.443256], [ 93.924327, 67.911962], ], paths=[0:8]); circle(M3_MINK_RAD-0.6, $fn=8); } } } }