From 3504530f77332dffcfb71308650582a8c3ba408c Mon Sep 17 00:00:00 2001
From: "Egli Adrian (IT-SCI-API-PFI)" <adrian.egli@sbb.ch>
Date: Tue, 25 Jun 2019 15:39:01 +0200
Subject: [PATCH] new element (rendering) added and test scene added

---
 env_data/railway/basic_elements_test.pkl | Bin 1297 -> 1342 bytes
 flatland/utils/graphics_pil.py           |   4 +-
 notebooks/Scene_Editor.ipynb             |  17 +--
 notebooks/basic_elements_test.pkl        | Bin 1297 -> 1342 bytes
 svg/Weiche_Symetrical_gerade.svg         | 186 +++++++++++++++++++++++
 5 files changed, 191 insertions(+), 16 deletions(-)
 create mode 100644 svg/Weiche_Symetrical_gerade.svg

diff --git a/env_data/railway/basic_elements_test.pkl b/env_data/railway/basic_elements_test.pkl
index e139a984c3f9251e55ee22a055b2bc46ad1f9b2f..4258a74434473bf4decda53b3db9324ed0d2d039 100644
GIT binary patch
delta 171
zcmbQpwU29qB9q`*1qKENWMZ-wlcqGw*&f5Qj0`MirzwJ|Bg$Z^CG#xf<OC)q(K8JU
z49J*);SPiH<onFx6BYO-A7oNthnhI~1(PN(%h^jxVD0mOW=@{NtTH)+g=ex0vl?7g
WF0&R;)isDEF5U=Ln@=&jGXek#ku&1}

delta 134
zcmdnTHIZwBBGY717NN=3ObWaVKyX$8L;}I&GA1P%29~odjAt(?fk;M(IFP)<pbS(u
zQBZvHS4M%!*O(M0%5qI!$HF$5i&<uJEeq%5H7tUY?=bUEl;N73%&Z2IozAR`E(6rC
J`7g60BLF%fBA@^O

diff --git a/flatland/utils/graphics_pil.py b/flatland/utils/graphics_pil.py
index ed48654c..f8e81313 100644
--- a/flatland/utils/graphics_pil.py
+++ b/flatland/utils/graphics_pil.py
@@ -392,7 +392,9 @@ class PILSVG(PILGL):
             "NN SS EN SW": "Weiche_vertikal_oben_links.svg",
             "NN SS SE WN": "Weiche_vertikal_oben_rechts.svg",
             "NN SS NW ES": "Weiche_vertikal_unten_links.svg",
-            "NN SS NE WS": "Weiche_vertikal_unten_rechts.svg"}
+            "NN SS NE WS": "Weiche_vertikal_unten_rechts.svg",
+            "NE NW ES WS SS NN WW EE": "Weiche_Symetrical_gerade.svg"
+        }
 
         dTargetFiles = {
             "EW": "Bahnhof_#d50000_Deadend_links.svg",
diff --git a/notebooks/Scene_Editor.ipynb b/notebooks/Scene_Editor.ipynb
index 79f17cb7..ef9d990c 100644
--- a/notebooks/Scene_Editor.ipynb
+++ b/notebooks/Scene_Editor.ipynb
@@ -11,20 +11,7 @@
    "cell_type": "code",
    "execution_count": 1,
    "metadata": {},
-   "outputs": [
-    {
-     "data": {
-      "text/html": [
-       "<style>.container { width:95% !important; }</style>"
-      ],
-      "text/plain": [
-       "<IPython.core.display.HTML object>"
-      ]
-     },
-     "metadata": {},
-     "output_type": "display_data"
-    }
-   ],
+   "outputs": [],
    "source": [
     "from IPython.core.display import display, HTML\n",
     "display(HTML(\"<style>.container { width:95% !important; }</style>\"))"
@@ -70,7 +57,7 @@
     {
      "data": {
       "application/vnd.jupyter.widget-view+json": {
-       "model_id": "857d03237c1c4328be8677ef5513189c",
+       "model_id": "673971f56fe14e99ad7beb834e18710a",
        "version_major": 2,
        "version_minor": 0
       },
diff --git a/notebooks/basic_elements_test.pkl b/notebooks/basic_elements_test.pkl
index e139a984c3f9251e55ee22a055b2bc46ad1f9b2f..4258a74434473bf4decda53b3db9324ed0d2d039 100644
GIT binary patch
delta 171
zcmbQpwU29qB9q`*1qKENWMZ-wlcqGw*&f5Qj0`MirzwJ|Bg$Z^CG#xf<OC)q(K8JU
z49J*);SPiH<onFx6BYO-A7oNthnhI~1(PN(%h^jxVD0mOW=@{NtTH)+g=ex0vl?7g
WF0&R;)isDEF5U=Ln@=&jGXek#ku&1}

delta 134
zcmdnTHIZwBBGY717NN=3ObWaVKyX$8L;}I&GA1P%29~odjAt(?fk;M(IFP)<pbS(u
zQBZvHS4M%!*O(M0%5qI!$HF$5i&<uJEeq%5H7tUY?=bUEl;N73%&Z2IozAR`E(6rC
J`7g60BLF%fBA@^O

diff --git a/svg/Weiche_Symetrical_gerade.svg b/svg/Weiche_Symetrical_gerade.svg
new file mode 100644
index 00000000..868c0f89
--- /dev/null
+++ b/svg/Weiche_Symetrical_gerade.svg
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.1"
+   id="Ebene_1"
+   x="0px"
+   y="0px"
+   viewBox="0 0 240 240"
+   style="enable-background:new 0 0 240 240;"
+   xml:space="preserve"
+   sodipodi:docname="Weiche_Symetrical_gerade.svg"
+   inkscape:version="0.92.4 (5da689c313, 2019-01-14)"><metadata
+   id="metadata41"><rdf:RDF><cc:Work
+       rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+         rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
+   id="defs39" /><sodipodi:namedview
+   pagecolor="#ffffff"
+   bordercolor="#666666"
+   borderopacity="1"
+   objecttolerance="10"
+   gridtolerance="10"
+   guidetolerance="10"
+   inkscape:pageopacity="0"
+   inkscape:pageshadow="2"
+   inkscape:window-width="1920"
+   inkscape:window-height="1137"
+   id="namedview37"
+   showgrid="false"
+   inkscape:zoom="0.98333333"
+   inkscape:cx="135.25424"
+   inkscape:cy="120"
+   inkscape:window-x="-8"
+   inkscape:window-y="-8"
+   inkscape:window-maximized="1"
+   inkscape:current-layer="Ebene_1" />
+<style
+   type="text/css"
+   id="style2">
+	.st0{fill:#978679;}
+	.st1{fill:#3D3D3D;}
+	.st2{fill:none;}
+</style>
+<g
+   transform="translate(-1,0.5)"
+   id="g20"
+   style="fill:#978679;fill-opacity:1"><rect
+     x="70.5"
+     y="10"
+     class="st1"
+     width="100"
+     height="20"
+     id="rect8"
+     style="fill:#978679;fill-opacity:1" /><rect
+     x="70.5"
+     y="210"
+     class="st1"
+     width="100"
+     height="20"
+     id="rect10"
+     style="fill:#978679;fill-opacity:1" /><rect
+     x="70.5"
+     y="170"
+     class="st1"
+     width="100"
+     height="20"
+     id="rect12-4"
+     style="fill:#978679;fill-opacity:1" /><rect
+     x="70.5"
+     y="130"
+     class="st1"
+     width="100"
+     height="20"
+     id="rect14-7"
+     style="fill:#978679;fill-opacity:1" /><rect
+     x="70.5"
+     y="90"
+     class="st1"
+     width="100"
+     height="20"
+     id="rect16"
+     style="fill:#978679;fill-opacity:1" /><rect
+     x="70.5"
+     y="50"
+     class="st1"
+     width="100"
+     height="20"
+     id="rect18"
+     style="fill:#978679;fill-opacity:1" /></g><g
+   id="g10">
+	<rect
+   x="69.5"
+   y="210.5"
+   class="st0"
+   width="100"
+   height="20"
+   id="rect4" />
+	<rect
+   x="210"
+   y="70"
+   class="st0"
+   width="20"
+   height="100"
+   id="rect6" />
+	<polygon
+   class="st0"
+   points="81.34,181.24 87.45,162.2 177.54,191.12 108.02,131.57 121.03,116.38 190.57,175.94 152.04,92.74    170.19,84.33 212.21,175.08 195.99,182.59 183.97,196.62 181.97,194.91 176.55,211.8  "
+   id="polygon8" />
+</g>
+<g
+   id="g18">
+	<rect
+   x="70.5"
+   y="210.5"
+   class="st0"
+   width="100"
+   height="20"
+   id="rect12" />
+	<rect
+   x="10"
+   y="70"
+   class="st0"
+   width="20"
+   height="100"
+   id="rect14" />
+	<polygon
+   class="st0"
+   points="158.66,181.24 152.55,162.2 62.46,191.12 131.98,131.57 118.97,116.38 49.43,175.94 87.96,92.74    69.81,84.33 27.79,175.08 44.01,182.59 56.03,196.62 58.03,194.91 63.45,211.8  "
+   id="polygon16" />
+</g>
+<g
+   id="g24">
+	<path
+   class="st1"
+   d="M151,239.5c0-48.8,39.7-88.5,88.5-88.5c0.17,0,0.33,0.01,0.5,0.01v10.01c-0.17,0-0.33-0.01-0.5-0.01   c-43.29,0-78.5,35.21-78.5,78.5c0,0.17,0.01,0.33,0.01,0.5h-10.01C151.01,239.83,151,239.67,151,239.5z"
+   id="path20" />
+	<path
+   class="st1"
+   d="M240,79v10c-83.26,0-151,67.74-151,151H79C79,151.22,151.22,79,240,79z"
+   id="path22" />
+</g>
+<g
+   id="g30">
+	<path
+   class="st1"
+   d="M89,239.5C89,190.7,49.3,151,0.5,151c-0.17,0-0.33,0.01-0.5,0.01v10.01c0.17,0,0.33-0.01,0.5-0.01   c43.29,0,78.5,35.21,78.5,78.5c0,0.17-0.01,0.33-0.01,0.5h10.01C88.99,239.83,89,239.67,89,239.5z"
+   id="path26" />
+	<path
+   class="st1"
+   d="M0,79v10c83.26,0,151,67.74,151,151h10C161,151.22,88.78,79,0,79z"
+   id="path28" />
+</g>
+<g
+   id="g34">
+	<rect
+   x="0"
+   class="st2"
+   width="240"
+   height="240"
+   id="rect32" />
+</g>
+<g
+   transform="translate(-0.49000549,0.01)"
+   id="g26"
+   style="fill:#3d3d3d;fill-opacity:1"><rect
+     y="0"
+     x="79.510002"
+     class="st2"
+     width="9.9799995"
+     height="240"
+     id="rect22"
+     style="fill:#3d3d3d;fill-opacity:1" /><rect
+     y="0"
+     x="151.50999"
+     class="st2"
+     width="9.9799995"
+     height="240"
+     id="rect24"
+     style="fill:#3d3d3d;fill-opacity:1" /></g></svg>
\ No newline at end of file
-- 
GitLab