From 0c109aea632bf86bf21038a8ef37a60f6ddbd5c4 Mon Sep 17 00:00:00 2001 From: Shy Date: Fri, 29 Dec 2023 21:08:12 +0100 Subject: [PATCH] Parameterized display window. --- front.scad | 50 ++++++++++++++------- svg/front analog sticks struts.svg | 28 +++++++----- svg/front construction.svg | 71 +++++++++++++++++------------- svg/front struts.svg | 10 ++--- svg/front top.svg | 9 ++-- 5 files changed, 103 insertions(+), 65 deletions(-) diff --git a/front.scad b/front.scad index a24d4fa..1987b20 100644 --- a/front.scad +++ b/front.scad @@ -61,6 +61,9 @@ border_height = 4; // Höhe der Verstrebungen. struts = 2; +// Display (X, Y, Weite, Höhe). +display = [42.5, 24, 68.5, 52]; + // Durchmesser der Bohrungen. drill = 3.4; @@ -120,6 +123,14 @@ analog_sticks = true; // Durchbrüche in der Front. module top_cutouts() { + // Display. + // Berechne X/Y-Koordinaten vom linken oberen Rand der Platine. + translate([150 - display[2]/2 - display.x, 110 - display[3]/2 - display.y, (top + struts)/2]) + minkowski() { + cube([display[2] - 2, display[3] - 2, 0.01], true); + cylinder(top + struts, 2, 1, true, $fn=16); + } + // LEDs am unteren Rand. if (led_bottom) { linear_extrude(height=top) { @@ -220,6 +231,25 @@ module outer() { } } + // Verstrebung um das Display herum. + // Berechne X/Y-Koordinaten vom linken oberen Rand der Platine. + color (color_struts) + translate([150 - display[2]/2 - display.x, 110 - display[3]/2 - display.y, (top + struts)/2]) + minkowski() { + cube([display[2] - 2, display[3] - 2, 0.01], true); + cylinder(top + struts, 4, 3, true, $fn=16); + } + + // Verstärkungen für die Analog-Sticks. + if (analog_sticks) { + color(color_struts) + translate([0, 0, top]) { + linear_extrude(height = struts) { + import("./svg/front analog sticks struts.svg"); + } + } + } + } // Kleine Streben zwischen Decke und Rand. @@ -291,11 +321,11 @@ module casing_front() { color(color_struts) for (pos = [ // [x, y, rotation, länge] - [49, 107.5, 0, 3], - [57, 107.5, 0, 3], - [65, 107.5, 0, 3], - [73, 107.5, 0, 3], - [80, 107.5, 0, 3], + [37, 107.5, 0, 3], + [45, 107.5, 0, 3], + [63, 107.5, 0, 3], + [71, 107.5, 0, 3], + [79, 107.5, 0, 3], [87, 107.5, 0, 3], [147.5, 85, 270, 3], @@ -391,16 +421,6 @@ module casing_front() { import("./svg/front well.svg"); } } - - // Verstärkungen für die Analog-Sticks. - if (analog_sticks) { - color(color_struts) - translate([0, 0, top]) { - linear_extrude(height = struts) { - import("./svg/front analog sticks struts.svg"); - } - } - } } // Plazierung der Bohrungen. diff --git a/svg/front analog sticks struts.svg b/svg/front analog sticks struts.svg index c224bf3..2c3456f 100644 --- a/svg/front analog sticks struts.svg +++ b/svg/front analog sticks struts.svg @@ -5,7 +5,7 @@ viewBox="0 0 150 110" version="1.1" id="svg8" - inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)" sodipodi:docname="front analog sticks struts.svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" @@ -23,9 +23,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="2.2176894" - inkscape:cx="283.40308" - inkscape:cy="207.87402" + inkscape:zoom="0.87869644" + inkscape:cx="-88.767857" + inkscape:cy="185.50206" inkscape:document-units="mm" inkscape:current-layer="layer1" inkscape:document-rotation="0" @@ -34,14 +34,23 @@ inkscape:snap-bbox="false" inkscape:bbox-nodes="true" inkscape:snap-smooth-nodes="true" - inkscape:pagecheckerboard="0"> + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1" + inkscape:window-width="1438" + inkscape:window-height="880" + inkscape:window-x="0" + inkscape:window-y="16" + inkscape:window-maximized="1"> + empspacing="4" + originx="0" + originy="0" + visible="false" /> @@ -59,9 +68,8 @@ inkscape:groupmode="layer" id="layer1"> + id="circle1211-5" + style="display:inline;fill:#aad400;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round" + d="M 132.00021 18.999874 L 132.00021 21.071582 A 14 14 0 0 0 119.0718 33.999992 L 101.49975 33.999992 L 101.49975 35.99987 L 119.0718 35.99987 A 14 14 0 0 0 133.00015 49.00011 A 14 14 0 0 0 141.88126 45.795138 L 148.49998 52.413855 L 148.49998 49.586121 L 143.3313 44.417444 A 14 14 0 0 0 146.99981 34.999931 A 14 14 0 0 0 134.00009 21.040059 L 134.00009 18.999874 L 132.00021 18.999874 z M 49.293115 35.292936 L 29.164111 55.42194 A 14 14 0 0 0 19.999813 51.999927 A 14 14 0 0 0 6.071464 65.000167 L 3.9997559 65.000167 L 3.9997559 67.000045 L 6.071464 67.000045 A 14 14 0 0 0 19.999813 79.999768 A 14 14 0 0 0 33.999992 66.000106 A 14 14 0 0 0 30.578495 56.835807 L 50.706982 36.706803 L 49.293115 35.292936 z " /> diff --git a/svg/front construction.svg b/svg/front construction.svg index 08970a0..1ec6f48 100644 --- a/svg/front construction.svg +++ b/svg/front construction.svg @@ -45,9 +45,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="1.2752917" + inkscape:zoom="1.397" inkscape:cx="283.46457" - inkscape:cy="207.7956" + inkscape:cy="207.58769" inkscape:document-units="mm" inkscape:current-layer="layer4" inkscape:document-rotation="0" @@ -221,6 +221,10 @@ style="display:inline;opacity:0.596999;fill:#800080;stroke:none;stroke-width:2.117;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none" d="M 150.00015,9.9999063 V 74.000134 c 0,0.750009 -0.49994,1.499878 -0.99994,1.999877 l -1.08107,1.081072 c -0.10658,0.106566 -0.36056,0.212177 -0.62581,0.212389 -0.55264,2.51e-4 -1.0007,-0.447816 -1.00045,-1.000456 2.1e-4,-0.264993 0.10576,-0.519216 0.20205,-0.615466 l 1.09141,-1.09089 c 0.2643,-0.26434 0.41393,-0.72489 0.41393,-0.58601 V 9.9999063 Z M 112.75015,2 c 0,0 -1,0 -1,-1 0,-1 1,-1 1,-1 h 6.49994 c 0.99999,0 0.99993,0.99993896 0.99993,0.99993896 V 6.7499756 c 0,0 6e-5,0.9999403 -0.99993,0.999939 -1.00001,1.3e-6 -0.99994,-0.999939 -0.99994,-0.999939 V 2.2499918 c 0,0 -1.2e-4,-0.2501139 -0.25012,-0.2501139 L 112.75015,2 M 95.750146,0 H 30.75 C 29.750002,0 29.750062,0.99993896 29.750062,0.99993896 V 6.7499756 c 0,0 -6e-5,0.9999403 0.999938,0.999939 0.999926,1.3e-6 1.000455,-0.999939 1.000455,-0.999939 V 2.2499918 c 0,10e-8 -5.29e-4,-0.2501144 0.249598,-0.2501139 L 95.750146,2 c 0,0 0.999998,0 1.000001,-1 -3e-6,-1 -1.000001,-1 -1.000001,-1 z M 2.0003955,9.9999063 V 50.000048 c 0,0 0.1495769,0.321661 0.4139274,0.586012 0.187534,0.187476 0.2929281,0.441759 0.2930049,0.706932 -3.44e-5,0.552236 -0.4477015,0.999906 -0.9999372,0.99994 C 1.44204,52.292993 1.1876431,52.187657 0.82992382,51.821643 0.47220716,51.455629 0,50.728813 0,50.000048 V 9.9999063 Z M 1.7073906,86.706852 c 0.5522357,3.4e-5 0.9999028,0.447701 0.9999372,0.999937 -2.117e-4,0.265247 -0.1057963,0.519544 -0.3313298,0.745426 -0.2255335,0.225886 -0.3756025,0.548037 -0.3756025,0.548037 v 0.999937 c 0,4.466622 3.5329124,8.000058 7.9995103,8.000029 H 124.17226 l 1.495,-1.494483 c 0.10655,-0.106534 0.36063,-0.212312 0.62581,-0.212389 0.55223,3.5e-5 0.9999,0.447702 0.99993,0.99994 -7e-5,0.265173 -0.10571,0.519644 -0.20567,0.619598 l -2.08721,2.087216 H 9.9999058 C 4.4599066,100.00014 0,95.540191 0,90.000189 V 89.000252 C 0,88.268343 0.47610712,87.53768 0.83197699,87.175164 1.1878469,86.812648 1.4421432,86.707063 1.7073906,86.706852 Z" sodipodi:nodetypes="csscccscccccccsccscccccsccsccscccccccccsccsccscscccccsccsss" /> + + + - - + + d="m 383.62206,128.50393 v 7.55859 l 115.59951,-4.8e-4 62.03906,62.03711 v -10.6875 l -58.9082,-58.9082 z" + transform="scale(0.26458333)" + sodipodi:nodetypes="ccccccc" /> - diff --git a/svg/front struts.svg b/svg/front struts.svg index 3ca01c6..1708b8e 100644 --- a/svg/front struts.svg +++ b/svg/front struts.svg @@ -23,9 +23,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="1.0052898" - inkscape:cx="57.694806" - inkscape:cy="228.78975" + inkscape:zoom="1.0194538" + inkscape:cx="-32.370275" + inkscape:cy="244.24844" inkscape:document-units="mm" inkscape:current-layer="layer1" inkscape:document-rotation="0" @@ -69,8 +69,8 @@ inkscape:groupmode="layer" id="layer1"> + d="M 53.750208 0.25011393 A 1 1 0 0 0 53.042757 0.5431193 L 29.793014 23.792863 A 1 1 0 0 0 29.793014 25.207247 A 1 1 0 0 0 31.206881 25.207247 L 34.999931 21.414197 L 54.29281 40.707076 L 55.00026 40.000142 L 55.00026 47.000232 L 57.000138 47.000232 L 57.000138 0.99993896 L 55.00026 0.99993896 L 55.00026 38.586275 L 36.414315 19.999813 L 54.457141 1.9569865 A 1 1 0 0 0 54.457141 0.5431193 A 1 1 0 0 0 53.750208 0.25011393 z M 93.000008 0.99993896 L 93.000008 37.086108 L 84.54316 45.542957 L 85.957027 46.956824 L 93.000008 39.913843 L 93.000008 47.000232 L 94.999886 47.000232 L 94.999886 37.913965 L 98.999642 33.914209 L 121.54297 56.457019 A 1 1 0 0 0 122.95684 56.457019 A 1 1 0 0 0 122.95684 55.043152 L 100.41403 32.499825 L 112.91404 19.999813 L 149.00021 19.999813 L 149.00021 17.999935 L 112.08618 17.999935 L 94.999886 35.08623 L 94.999886 0.99993896 L 93.000008 0.99993896 z M 63.292778 50.293054 L 34.586003 78.999829 L 3.9997559 78.999829 L 3.9997559 81.000224 L 34.999931 81.000224 A 1.0001 1.0001 0 0 0 35.706864 80.707218 L 64.000228 52.413855 L 64.000228 99.000159 L 66.000106 99.000159 L 66.000106 50.999988 L 64.000228 50.999988 L 63.292778 50.293054 z M 84.000041 50.999988 L 84.000041 99.000159 L 85.999919 99.000159 L 85.999919 50.999988 L 84.000041 50.999988 z M 139.0003 89.000252 L 139.0003 95.25 C 139.0003 95.25 139.00024 96.249939 140.00024 96.249939 C 141.00024 96.249939 141.00018 95.25 141.00018 95.25 L 141.00018 91.00013 L 145.25005 91.00013 C 145.25005 91.00013 146.24999 91.00019 146.24999 90.000191 C 146.24999 89.000194 145.25005 89.000252 145.25005 89.000252 L 139.0003 89.000252 z M 8.9999674 91.00013 L 8.9999674 99.000159 L 11.000362 99.000159 L 10.999845 91.00013 L 8.9999674 91.00013 z " /> diff --git a/svg/front top.svg b/svg/front top.svg index cacb536..b35c322 100644 --- a/svg/front top.svg +++ b/svg/front top.svg @@ -23,9 +23,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="1.069807" - inkscape:cx="5.6084883" - inkscape:cy="180.40637" + inkscape:zoom="1.5249621" + inkscape:cx="283.28572" + inkscape:cy="207.87402" inkscape:document-units="mm" inkscape:current-layer="layer1" inkscape:document-rotation="0" @@ -74,6 +74,7 @@ + d="M 9.9999064,0 C 4.4599128,0 -2.116657e-5,4.459912 0,9.9999064 V 39.000203 c 0,0.750001 0.49993876,1.499872 0.99993896,1.999878 L 1.9998779,42.00002 c 0.4999992,0.500006 0.9999379,1.249881 0.999939,1.999878 v 40.000143 c 0,0.749999 -0.4998394,1.499878 -0.999939,1.999878 L 0.99993896,86.999858 C 0.49988811,87.499808 0,88.250252 0,89.000252 v 0.999939 c 0,5.539997 4.4599128,9.999939 9.9999064,9.999909 H 124.00018 c 0.75,0 1.49988,-0.499942 1.99988,-0.999941 L 127,98.00022 c 0.5,-0.499999 1.2504,-1.000456 2.00039,-1.000456 h 9.99991 c 4.432,-1.05e-4 8.00011,-3.567518 8.00003,-7.999512 V 78.999829 c -1e-5,-1 0.49995,-1.499858 0.99994,-1.999878 l 0.99994,-0.999939 c 0.5,-0.500001 0.99994,-1.249877 0.99994,-1.999878 V 9.9999064 C 150.00015,4.459912 145.54023,0 140.00024,0 Z M 97.249878,2.5001058 h 14.250292 c 0,0 0.99994,-5.9e-5 0.99994,0.999939 0,0.999998 -0.99994,0.9999389 -0.99994,0.9999389 H 97.249878 c 0,0 -0.999939,5.91e-5 -0.999939,-0.9999389 0,-0.999998 0.999939,-0.999939 0.999939,-0.999939 z M 19.750216,19.249988 c 3.313624,2.03e-4 5.999716,2.686526 5.999633,6.00015 -2.02e-4,3.313422 -2.686211,5.999431 -5.999633,5.999634 -3.313625,8.3e-5 -5.999949,-2.686009 -6.000151,-5.999634 -8.3e-5,-3.313826 2.686325,-6.000233 6.000151,-6.00015 z m 98.499934,2.249992 c 1.10447,7.2e-5 1.9998,0.895407 1.99987,1.999878 2.2e-4,1.104673 -0.8952,2.000322 -1.99987,2.000394 -1.10488,2.21e-4 -2.00062,-0.895514 -2.0004,-2.000394 7e-5,-1.104678 0.89572,-2.000099 2.0004,-1.999878 z M 9.7497925,29.249894 c 3.3138265,-8.3e-5 6.0002335,2.686325 6.0001505,6.000151 8.3e-5,3.313826 -2.686325,6.000233 -6.0001505,6.00015 -3.3136241,-2.02e-4 -5.9997166,-2.686526 -5.9996338,-6.00015 -8.34e-5,-3.313624 2.6860093,-5.999949 5.9996338,-6.000151 z m 20.0003295,0 c 3.313625,2.02e-4 5.999717,2.686526 5.999634,6.000151 8.3e-5,3.313624 -2.68601,5.999948 -5.999634,6.00015 -3.313826,8.3e-5 -6.000233,-2.686324 -6.00015,-6.00015 -8.3e-5,-3.313826 2.686324,-6.000234 6.00015,-6.000151 z m -9.999906,9.999907 c 3.313624,2.03e-4 5.999716,2.686526 5.999633,6.00015 8.3e-5,3.313624 -2.686009,5.999948 -5.999633,6.000151 -3.313826,8.3e-5 -6.000234,-2.686325 -6.000151,-6.000151 -8.3e-5,-3.313826 2.686325,-6.000233 6.000151,-6.00015 z M 128.74976,53.24998 h 8.00003 c 0.554,0 1.00046,0.445939 1.00046,0.999939 v 7.000089 h 6.99957 c 0.554,0 0.99994,0.445941 0.99994,0.999939 v 8.000029 c 0,0.553998 -0.44594,0.999939 -0.99994,0.999939 h -6.99957 v 7.000089 c 0,0.554 -0.44646,0.999939 -1.00046,0.999939 h -8.00003 c -0.554,0 -0.99993,-0.445939 -0.99993,-0.999939 v -7.000089 h -6.99958 c -0.554,0 -1.00045,-0.445941 -1.00045,-0.999939 v -8.000029 c 0,-0.553998 0.44645,-0.999939 1.00045,-0.999939 h 6.99958 v -7.000089 c 0,-0.554 0.44593,-0.999939 0.99993,-0.999939 z m -70.188993,30.360937 2.828251,2.828251 -4.949569,4.950086 -2.828768,-2.828768 z m 32.878613,0 4.949569,4.949569 -2.828252,2.828768 -4.949568,-4.950086 z m -18.439185,5.389335 h 3.999756 v 6.999573 h -3.999756 z" + sodipodi:nodetypes="scssccsccsscssssccccsssssccsccsccccccccccccccccccccccccccssscsssscsssscsssscssccccccccccccccc" />