<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Forum Bauen und Umwelt - Update Juni 2024</title>
<link>https://bauforum.wirklichewelt.de/</link>
<description>Das Bauforum</description>
<language>de</language>
<item>
<title>Update Juni 2024 (Antwort)</title>
<content:encoded><![CDATA[<p>Wieder einmal ist ein Update für den Geländemodellierer fällig, weil die praktischen GNU-zip-komprimierten XYZ-Dateien mit den Geländehöhen vom Land NRW nicht mehr angeboten werden. Stattdessen werden nun GeoTIFF-Dateien verwendet, die rund 20 % kleiner sind.</p>
<p><a href="images/uploaded/20240612205955666a0c4b67fa8.zip" target="_blank" rel=\"noopener\">Download der Python-Datei</a></p>
<p>Das Programm verwendet die Module Pillow (PIL) und Numpy, welche gegebenenfalls mit PIP oder der Paketverwaltung des Betriebssystems nachinstalliert werden müssen. Zusätzlich wird das Modul OSGeo/gdal benötigt, wenn auch Orthophotos verarbeitet werden sollen. Dieses ist unter Windows recht aufwändig zu installieren, weshalb ich Linux zum Betrieb des Programms empfehle. </p>
<p>Wer nur einen Windows-PC zur Verfügung hat, sollte sich einmal das Linux Subsytem für Windows (Microsoft nennt es <a href="https://learn.microsoft.com/de-de/windows/wsl/install" target="_blank" rel=\"noopener\">Windows Subsystem für Linux – WSL</a>) ansehen.</p>
]]></content:encoded>
<link>https://bauforum.wirklichewelt.de/index.php?id=11767</link>
<guid>https://bauforum.wirklichewelt.de/index.php?id=11767</guid>
<pubDate>Wed, 12 Jun 2024 21:07:39 +0000</pubDate>
<category>Software</category><dc:creator>Martin Vogel</dc:creator>
</item>
<item>
<title>Neues Downloadverzeichnis (Antwort)</title>
<content:encoded><![CDATA[<p>Die Höhendaten des digitalen Geländemodells im 1-Meter-Raster für NRW sind nun über die URL <a href="https://www.opengeodata.nrw.de/produkte/geobasis/hm/dgm1_xyz/" target="_blank" rel=\"noopener\">https://www.opengeodata.nrw.de/produkte/geobasis/hm/dgm1_xyz/</a> erreichbar. Das Programm muss entsprechend angepasst werden, da keine Weiterleitung von der alten URL (…/produkte/geobasis/dgm/dgm1/) eingerichtet wurde.</p>
<p>(Update des Updates: <a href="index.php?id=11753" class="internal">Es gab schon wieder eine Änderung</a>)</p>
]]></content:encoded>
<link>https://bauforum.wirklichewelt.de/index.php?id=11747</link>
<guid>https://bauforum.wirklichewelt.de/index.php?id=11747</guid>
<pubDate>Wed, 22 Jan 2020 11:56:29 +0000</pubDate>
<category>Software</category><dc:creator>Martin Vogel</dc:creator>
</item>
<item>
<title>Farbige DXF-Höhenmodelle (Antwort)</title>
<content:encoded><![CDATA[<p>Das in Python 3 geschriebene Geländemodellierungsprogramm für NRW hat noch ein kleines Extra bekommen: Die 3D-Flächen in der vom Programm aus den digitalen Geländedaten erzeugten DXF-Datei werden nun entsprechend ihrer relativen Höhe im Modell eingefärbt. Leider ist die mögliche Farbauswahl durch die praxisfernen „Indexfarben“ des DWG-Standards ziemlich beschränkt, das Ergebnis ist aber vielleicht dennoch ganz brauchbar.</p>
<p>Download: <a href="images/uploaded/201906231117055d0f5fb112c94.zip" target="_blank">ZIP-Datei</a></p>
<p><img src="https://bauforum.wirklichewelt.de/images/uploaded/201906231109415d0f5df5af943.jpg" alt="[image]"  loading="lazy" /><br />
Bild: Halde Gotthelf in Dortmund-Hombruch<br />
<em>Datenquelle: <a href="https://www.opengeodata.nrw.de/produkte/geobasis/dgm/dgm1/" target="_blank">https://www.opengeodata.nrw.de/produkte/geobasis/dgm/dgm1/</a> ; Land NRW (2019) ; Datenlizenz Deutschland - Namensnennung - Version 2.0 (http://www.govdata.de/dl-de/by-2-0)</em></p>
<p><strong>Kurzanleitung:</strong><br />
ZIP-Datei entpacken und das Programm „Geländemodell.py“ starten. Gegebenenfalls muss vorher <a href="https://www.python.org/downloads/" target="_blank">Python 3 heruntergeladen</a> und installiert werden.<br />
Das Programm möchte zuerst wissen, wie die erzeugten Dateien heißen sollen (zum Beispiel &quot;Halde Gotthelf&quot;), anschließend ist anzugeben, wo die schon heruntergeladenen oder noch herunterzuladenden DGM- und XYZ-Daten des NRW-Geodatenservers liegen (wenn Sie nicht wissen, was das bedeutet, drücken Sie einfach die Eingabetaste) und schließlich müssen nur noch die Eckpunkte des zu modellierenden Bereichs als Geokoordinaten eingegeben werden. Für das Modell im Bild waren das beispielsweise die beiden Koordinaten 51.468775,7.447726 und 51.472981,7.454811.</p>
<p>Die Geokoordinaten eines Geländepunktes erfahren Sie beispielsweise, indem sie diesen in Google Maps mit der Maus rechtsklicken und im dann erscheinenden Kontextmenü den Eintrag „was ist hier“ auswählen.</p>
<p>Bei einem Meter horizontaler Auflösung wird die DXF-Datei des hier abgebildeten Modells knapp 60 MB groß. Durch Verringerung der Auflösung auf 10 Meter reduziert sich die Dateigröße auf ein Hundertstel, dafür wird das aus Dreiecksflächen zusammengesetzte Modell gröber.</p>
<p>Ausser einem DXF-Modell werden auch STL-Dateien für den 3D-Druck erzeugt, sodass Sie das Geländemodell gleich körperlich herstellen können. <br />
<img src="https://bauforum.wirklichewelt.de/images/uploaded/201906231346545d0f82ce8a1ff.jpg" alt="[image]"  loading="lazy" /><br />
Etwas Geduld ist bei der heutigen 3D-Druckertechnik allerdings vonnöten. Mit 15 Stunden Druckzeit für ein 20 Zentimeter breites Modell müssen Sie schon rechnen.</p>
]]></content:encoded>
<link>https://bauforum.wirklichewelt.de/index.php?id=11729</link>
<guid>https://bauforum.wirklichewelt.de/index.php?id=11729</guid>
<pubDate>Sat, 22 Jun 2019 14:35:42 +0000</pubDate>
<category>Software</category><dc:creator>Martin Vogel</dc:creator>
</item>
<item>
<title>NRW-Geländedaten als TXT-Datei für BricsCAD 19 (Antwort)</title>
<content:encoded><![CDATA[<p>Das bekannte Pythonprogramm zur Geländemodellierung hat nach langer Zeit noch einmal eine Aktualisierung erfahren und erzeugt nun auch TXT-Dateien für den Geländemodellierungsbefehl SITE von BricsCAD 19. Zusammen mit dem ebenfalls neu hinzugekommenen Befehl GRADING lassen sich so auf einfachste Weise Böschungen für Aufschüttung und Aushub modellieren.</p>
<p><img src="https://bauforum.wirklichewelt.de/images/uploaded/201905220835095ce509bd56954.png" alt="[image]"  loading="lazy" /></p>
<p>Download: <a href="images/uploaded/201905220836525ce50a2449e14.zip" target="_blank">ZIP-Datei</a></p>
<p>Eine Version für hochaufgelöste Geländedaten eines beliebigen Grundstücks in NRW mit im Schnitt 4 Punkten pro Quadratmeter wäre für dieses Ausgabeformat ebenfalls möglich. Wer Interesse daran hat, möge sich hier melden.</p>
<p>Hier der Quelltext der aktuellen Version:</p>
<pre class="python" style="font-family:monospace;"><ol><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#!/usr/bin/env python3</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">import</span> <span style="color: #dc143c;">os</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">import</span> <span style="color: #dc143c;">sys</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">import</span> <span style="color: #dc143c;">webbrowser</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">import</span> <span style="color: #dc143c;">struct</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">from</span> tkinter <span style="color: #ff7700;">import</span> Tk</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">from</span> tkinter.<span style="color: black;">filedialog</span> <span style="color: #ff7700;">import</span> askdirectory</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">from</span> <span style="color: #dc143c;">math</span> <span style="color: #ff7700;">import</span> sqrt<span style="color: #000;">,</span> sin<span style="color: #000;">,</span> cos<span style="color: #000;">,</span> tan<span style="color: #000;">,</span> radians<span style="color: #000;">,</span> degrees<span style="color: #000;">,</span> floor</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808;">print</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;&quot;&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #080;">Dieses Python3-Skript erstellt Höhenmodelle für CAD und 3D-Druck.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #080;">Mit zwei Dezimalgradkoordinaten geben Sie die Eckpunkte einer rechteckigen</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #080;">Geländeoberfläche an, für die dieses Programm diverse 3D-Dateien erzeugt:</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #080;"> - ein Höhenmodell im STL-Format für 3D-Drucker,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #080;"> - eine DXF-Datei mit 3D-Flächen, die in Regionen umgewandelt und zu einem</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #080;">   Volumenmodell geheftet werden können,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #080;"> - eine auf die Auswahl reduzierte XYZ-Datei und</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #080;"> - diverse AutoCAD- bzw. BricsCAD-Befehlsskripte (SCR).</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #080;">&quot;&quot;&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Die CAD-Skripte enthalten Befehle zur Erzeugung von Prismenfeldern aus</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># 3D-Körpern, sodass Volumenbefehle angewendet werden können, sowie Befehle</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># zur Erzeugung von verschiedenen Oberflächenmodellen.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Das aus Drei- und Vierecken zusammengesetzte Oberflächenmodell ist im</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Ergebnis mit dem Inhalt der DXF-Datei identisch und lässt sich durch</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Anwendung der beiden Befehle &quot;Region&quot; und &quot;Heften&quot; ebenfalls in ein</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Volumenmodell umwandeln.</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Das Programm wurde für die öffentlichen Höhendaten für digitale</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Geländemodelle in NRW geschrieben, lässt sich aber mit geringen Anpassungen</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># auch für andere DGM-Daten nutzen.</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Datenquelle:</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># http://www.bezreg-koeln.nrw.de/</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#        brk_internet/geobasis/hoehenmodelle/gelaendemodelle/</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># bzw. https://www.opengeodata.nrw.de/produkte/</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Autor: Dipl.-Ing. Martin Vogel, Hochschule Bochum, 2017–2019</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Lizenz: Namensnennung - Weitergabe unter gleichen Bedingungen 3.0 Deutschland</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># (CC BY-SA 3.0 DE) https://creativecommons.org/licenses/by-sa/3.0/de/</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Version 13 vom 10. Mai 2019</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#   XYZ-Daten als TXT-Datei für Bricscad-BIM-Geländeoberflächen</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Version 12 vom 3. Juni 2018</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#   Anzeige und PDF-Export eines Höhendiagramms mittels Matplotlib.</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Version 11 vom 18. Juni 2017</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#   Zu fehlenden Kacheln wird nun angegeben, in welchen Ortsdateien diese</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#   zu finden sind. Dazu mussten alle 396 Dateien einmal heruntergeladen und</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#   diese 269 Gigabyte ZIP-Dateien katalogisiert werden. -&gt; Gelaendekatalog.csv</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Version 10 vom 15. Juni 2017</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#   UTM-Koordinatenumrechnung jetzt ohne externes Modul und nach vereinfachtem</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#   Algorithmus.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Version 9 vom 13. Juni 2017</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#   DXF-Export der Dreiecks- und Vierecksflächen aus Version 8.</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Version 8 vom 11. Juni 2017</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#   Oberflächenmodell für CAD-Skript aus einzelnen Dreiecksflächen, wie in der</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#   STL-Datei, Seitenflächen und Boden jedoch aus Vierecken.</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Version 7 vom 9. Juni 2017</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#   Jetzt mit 3D-Netz, viel schneller als Volumenkörper im CAD-Programm.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#   Leider kann BricsCAD aus dieser Oberfläche keinen Volumenkörper heften.</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Version 6 vom 21. März 2017</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#   Jetzt mit Log-Datei zur Garantie der Wiederholbarkeit.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Version 5 vom 19. März 2017</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#   Jetzt mit variabler Höhe der Unterseite. Es gibt in NRW tatsächlich Flächen,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#   die weit unterhalb des Meeresspiegels liegen. (Tagebau Etzweiler: -298,90m!)</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Version 4 vom 18. März 2017</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#   Jetzt mit binärem STL-Export. Die Dateien sind nur noch halb so groß</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#   und werden viel schneller gelesen als ASCII-STL-Dateien.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Version 3 vom 17. März 2017</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#   Einige mögliche Fehleingaben werden jetzt freundlich abgefangen.</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#   Erweiterung um CAD-Skript für Dreiecksprismen, um den Minecraft-Effekt</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#   loszuwerden.</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Version 2 vom 16. März 2017</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#   Jetzt mit Eingabe der Höhenauflösung.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#   Außerdem werden nicht mehr alle gefundenen Punkte im Dictionary</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#   abgelegt, sondern nur noch die später auch benötigten.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Ideen für Erweiterungen:</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#  - Grafische Oberfläche (mit Kontrolle der Kachelabdeckung) einbauen.</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#  - Automatischer Download fehlender Kacheln.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#  - In der DXF-Datei noch Werte für Zoom, Blickwinkel, Geokoordinaten</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#    usw. eintragen.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#  - Klären, warum FreeCAD nur eine einzige 3D-Fläche der DXF-Datei darstellt.</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Aufräumen:</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#  - Alte C-Formatstrings durch f-Strings ersetzen.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">def</span> sysexit<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #808;">input</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Programm wird beendet. [Enter]&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #dc143c;">sys</span>.<span style="color: black;">exit</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">def</span> log<span style="color: black;">&#40;</span>s<span style="color: #000;">,</span> sichtbar<span style="color: #000;">=</span><span style="color: #808;">True</span><span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #080;">&quot;Bildschirmmeldung mit Protokollierung&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">with</span> <span style="color: #808;">open</span><span style="color: black;">&#40;</span>name+<span style="color: #080;">&quot;.log&quot;</span><span style="color: #000;">,</span><span style="color: #080;">&quot;a&quot;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;">as</span> logfile:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        logfile.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;{s}<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">if</span> sichtbar:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #808;">print</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>{s}&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">def</span> utm<span style="color: black;">&#40;</span>Bg<span style="color: #000;">,</span>Lg<span style="color: black;">&#41;</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #080;">&quot;Umrechnung von Breitengrad und Längengrad in UTM-Koordinaten&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># http://www.ottmarlabonde.de/L1/UTMBeispielRechnung.htm</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Literatur: A. Schödlbauer,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;">#     Rechenformeln und Rechenbeispiele zur Landesvermessung,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;">#     Teil 2, Herbert WichmannVerlag Karlsruhe</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    L <span style="color: #000;">=</span> radians<span style="color: black;">&#40;</span>Lg<span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    B <span style="color: #000;">=</span> radians<span style="color: black;">&#40;</span>Bg<span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    tB <span style="color: #000;">=</span> tan<span style="color: black;">&#40;</span>B<span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    cB <span style="color: #000;">=</span> cos<span style="color: black;">&#40;</span>B<span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Halbachsen des WGS84-Ellipsoids:</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># a = 6378137.0</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># b = 6356752.314</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Radiusreduzierung</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    mH <span style="color: #000;">=</span> <span style="color: #008;">0.9996</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># c = a**2/b</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    c <span style="color: #000;">=</span> <span style="color: #008;">6399593.626005325</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># eq = (a**2-b**2)/b**2</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    eq <span style="color: #000;">=</span> <span style="color: #008;">0.006739496819936062</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># E0 = c*(1-3/4*eq+45/64*eq**2-175/256*eq**3+11025/16384*eq**4)</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    E0 <span style="color: #000;">=</span> <span style="color: #008;">6367449.145759811</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># E2 = c*(-3/8*eq+15/32*eq**2-525/1024*eq**3+2205/4096*eq**4)</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    E2 <span style="color: #000;">=</span> -<span style="color: #008;">16038.508797800609</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># E4 = c*(15/256*eq**2-105/1024*eq**3+2205/16384*eq**4)</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    E4 <span style="color: #000;">=</span> <span style="color: #008;">16.83262765753934</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># E6 = c*(-35/3072*eq**3+315/12288*eq**4)</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    E6 <span style="color: #000;">=</span> -<span style="color: #008;">0.021980907677118407</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    LL <span style="color: #000;">=</span> E0*B + E2*sin<span style="color: black;">&#40;</span><span style="color: #008;">2</span>*B<span style="color: black;">&#41;</span> + E4*sin<span style="color: black;">&#40;</span><span style="color: #008;">4</span>*B<span style="color: black;">&#41;</span> + E6*sin<span style="color: black;">&#40;</span><span style="color: #008;">6</span>*B<span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    x0 <span style="color: #000;">=</span> mH*LL</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    LhL <span style="color: #000;">=</span> <span style="color: #008;">3</span> + <span style="color: #008;">6</span>*floor<span style="color: black;">&#40;</span>degrees<span style="color: black;">&#40;</span>L<span style="color: black;">&#41;</span>/<span style="color: #008;">6</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    Zone <span style="color: #000;">=</span> <span style="color: #008;">30</span> + <span style="color: black;">&#40;</span><span style="color: #008;">3</span>+LhL<span style="color: black;">&#41;</span>/<span style="color: #008;">6</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    DL <span style="color: #000;">=</span> L - radians<span style="color: black;">&#40;</span>LhL<span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    etaq <span style="color: #000;">=</span> eq*cB**<span style="color: #008;">2</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    Nq <span style="color: #000;">=</span> c/sqrt<span style="color: black;">&#40;</span><span style="color: #008;">1</span>+etaq<span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    x2 <span style="color: #000;">=</span> mH/<span style="color: #008;">2</span>*Nq*tB*cB**<span style="color: #008;">2</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    x4 <span style="color: #000;">=</span> mH/<span style="color: #008;">24</span>*Nq*tB*cB**<span style="color: #008;">4</span>*<span style="color: black;">&#40;</span><span style="color: #008;">5</span>-tB**<span style="color: #008;">2</span>+<span style="color: #008;">9</span>*etaq<span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    x6 <span style="color: #000;">=</span> mH/<span style="color: #008;">720</span>*Nq*tB*cB**<span style="color: #008;">6</span>*<span style="color: black;">&#40;</span><span style="color: #008;">61</span>-<span style="color: #008;">58</span>*tB**<span style="color: #008;">2</span>+tB**<span style="color: #008;">4</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    N <span style="color: #000;">=</span> x0 + x2*DL**<span style="color: #008;">2</span> + x4*DL**<span style="color: #008;">4</span> + x6*DL**<span style="color: #008;">6</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    y1 <span style="color: #000;">=</span> mH*Nq*cB</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    y3 <span style="color: #000;">=</span> mH/<span style="color: #008;">6</span>*Nq*cB**<span style="color: #008;">3</span>*<span style="color: black;">&#40;</span><span style="color: #008;">1</span>-tB**<span style="color: #008;">2</span>+etaq<span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    y5 <span style="color: #000;">=</span> mH/<span style="color: #008;">120</span>*Nq*cB**<span style="color: #008;">5</span>*<span style="color: black;">&#40;</span><span style="color: #008;">5</span>-<span style="color: #008;">18</span>*tB**<span style="color: #008;">2</span>+tB**<span style="color: #008;">4</span>+etaq*<span style="color: black;">&#40;</span><span style="color: #008;">14</span>-<span style="color: #008;">58</span>*tB**<span style="color: #008;">2</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    E <span style="color: #000;">=</span> y1*DL + y3*DL**<span style="color: #008;">3</span> + y5*DL**<span style="color: #008;">5</span> + <span style="color: #008;">500000</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">return</span> N<span style="color: #000;">,</span> E<span style="color: #000;">,</span> Zone</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Schritt 1: Wie soll das Kind heißen?</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808;">print</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Geben Sie einen Basisnamen für die erzeugten Dateien an!<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      <span style="color: #080;">&quot;Existierende Dateien mit diesem Namen und den Endungen .dxf, .scr,<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      <span style="color: #080;">&quot;.xyz, .pdf und .stl werden ohne Warnung überschrieben.<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">name <span style="color: #000;">=</span> <span style="color: #808;">input</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;Dateiname ohne Endung: &quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span><span style="color: #080;">&quot;Basisname: &quot;</span>+name<span style="color: #000;">,</span> sichtbar<span style="color: #000;">=</span><span style="color: #808;">False</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Schritt 2: Wo sind die Geodaten?</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808;">print</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;Bitte wählen Sie den Ordner mit den ausgepackten XYZ-Dateien aus:&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Für den Dialog müssen wir Tk laden.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Fenster <span style="color: #000;">=</span> Tk<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Wir brauchen das Hauptfenster hier nicht.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Fenster.<span style="color: black;">withdraw</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Dialogfenster</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">ordner <span style="color: #000;">=</span> askdirectory<span style="color: black;">&#40;</span>title<span style="color: #000;">=</span><span style="color: #080;">&quot;Bitte den gewünschten Ordner doppelklicken&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">if</span> <span style="color: #ff7700;">not</span> ordner:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #808;">print</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Kein Ordner ausgewählt.&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    sysexit<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Gewählter Ordner: {ordner}&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Schritt 3: Welches Gebiet wollen wir modellieren?</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808;">print</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Geben Sie zwei gegenüberliegende Eckpunkte des zu modellierenden<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      <span style="color: #080;">&quot;Rechtecks an! Das Eingabeformat ist (Breite, Länge) in Dezimalgrad,<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      <span style="color: #080;">&quot;also beispielsweise 51.335757,7.479087 – Sie können die Koordinaten<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      <span style="color: #080;">&quot;direkt aus Google Maps oder Ihrem GPS-Gerät übernehmen.<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">try</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    lat1<span style="color: #000;">,</span> lon1 <span style="color: #000;">=</span> <span style="color: #808;">eval</span><span style="color: black;">&#40;</span><span style="color: #808;">input</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;Erstes Eckpunktkoordinatenpaar: &quot;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    lat2<span style="color: #000;">,</span> lon2 <span style="color: #000;">=</span> <span style="color: #808;">eval</span><span style="color: black;">&#40;</span><span style="color: #808;">input</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;Gegenüberliegendes Koordinatenpaar: &quot;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">except</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #808;">print</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;Es wurden keine zwei mit einem Komma getrennte Zahlen erkannt.&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    sysexit<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Die Eingabe oben war beliebig, wir brauchen aber gleich die Südwestecke</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># unten links und die Nordostecke oben rechts:</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">ul_lat <span style="color: #000;">=</span> <span style="color: #808;">min</span><span style="color: black;">&#40;</span>lat1<span style="color: #000;">,</span> lat2<span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">ul_lon <span style="color: #000;">=</span> <span style="color: #808;">min</span><span style="color: black;">&#40;</span>lon1<span style="color: #000;">,</span> lon2<span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">or_lat <span style="color: #000;">=</span> <span style="color: #808;">max</span><span style="color: black;">&#40;</span>lat1<span style="color: #000;">,</span> lat2<span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">or_lon <span style="color: #000;">=</span> <span style="color: #808;">max</span><span style="color: black;">&#40;</span>lon1<span style="color: #000;">,</span> lon2<span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Geokoordinaten: {ul_lat},{ul_lon} {or_lat},{or_lon}&quot;</span><span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    sichtbar<span style="color: #000;">=</span><span style="color: #808;">False</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Umrechnung der Dezimalgradkoordinaten ins UTM-System; aus Längen- und</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Breitengrad werden ein Nordwert, ein Ostwert und eine Zonennummer.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">n<span style="color: #000;">,</span> e<span style="color: #000;">,</span> zn <span style="color: #000;">=</span> utm<span style="color: black;">&#40;</span>ul_lat<span style="color: #000;">,</span> ul_lon<span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Die Zonennummer ist in den Dateien, die unter opengeodata.nrw.de</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># heruntergeladen werden können, dem Ostwert vorangestellt.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">ul_e <span style="color: #000;">=</span> <span style="color: #808;">int</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;%i%i&quot;</span>%<span style="color: black;">&#40;</span>zn<span style="color: #000;">,</span>e<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Der Nordwert wird übernommen.</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">ul_n <span style="color: #000;">=</span> <span style="color: #808;">int</span><span style="color: black;">&#40;</span>n<span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Das gleiche noch einmal für die Nordostecke unseres Rechtecks.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">n<span style="color: #000;">,</span> e<span style="color: #000;">,</span> zn <span style="color: #000;">=</span> utm<span style="color: black;">&#40;</span>or_lat<span style="color: #000;">,</span> or_lon<span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">or_e <span style="color: #000;">=</span> <span style="color: #808;">int</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;%i%i&quot;</span>%<span style="color: black;">&#40;</span>zn<span style="color: #000;">,</span>e<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">or_n <span style="color: #000;">=</span> <span style="color: #808;">int</span><span style="color: black;">&#40;</span>n<span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span><span style="color: #080;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Lage und Größe des ausgewählten Rechtecks:&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span><span style="color: #080;">&quot;UTM-Koordinaten: %i,%i %i,%i in Zone %i&quot;</span> % <span style="color: black;">&#40;</span>ul_e<span style="color: #000;">,</span>ul_n<span style="color: #000;">,</span>or_e<span style="color: #000;">,</span>or_n<span style="color: #000;">,</span>zn<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span><span style="color: #080;">&quot;Ausdehnung Ost-West: %i m&quot;</span> % <span style="color: black;">&#40;</span>or_e-ul_e<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span><span style="color: #080;">&quot;Ausdehnung Nord-Süd: %i m&quot;</span> % <span style="color: black;">&#40;</span>or_n-ul_n<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span><span style="color: #080;">&quot;Fläche: %i m²&quot;</span> % <span style="color: black;">&#40;</span><span style="color: black;">&#40;</span>or_e-ul_e<span style="color: black;">&#41;</span>*<span style="color: black;">&#40;</span>or_n-ul_n<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Liste der zu öffnenden XYZ-Dateien zusammenbauen:</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Bei den NRW-Höhendaten kann man am Dateinamen erkennen, ob gesuchte</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Punkte in ihnen enthalten sein könnten.</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Der Dateiname gibt die untere linke Ecke einer 2000x2000-m²-Kachel an.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Beispiel für einen Dateinamen: dgm1_32368_5700_2_nw.xyz</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Hier sind die Ostwerte 32368000 bis 32369999 und die Nordwerte</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># 5700000 bis n5701999 enthalten.</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808;">print</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Untersuche Vollständigkeit der Höhendaten…&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">xyz_Liste <span style="color: #000;">=</span> <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">e_min <span style="color: #000;">=</span> <span style="color: #008;">2</span> * <span style="color: black;">&#40;</span>ul_e // <span style="color: #008;">2000</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">e_max <span style="color: #000;">=</span> <span style="color: #008;">2</span> * <span style="color: black;">&#40;</span>or_e // <span style="color: #008;">2000</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">n_min <span style="color: #000;">=</span> <span style="color: #008;">2</span> * <span style="color: black;">&#40;</span>ul_n // <span style="color: #008;">2000</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">n_max <span style="color: #000;">=</span> <span style="color: #008;">2</span> * <span style="color: black;">&#40;</span>or_n // <span style="color: #008;">2000</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">for</span> e <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>e_min<span style="color: #000;">,</span>e_max+<span style="color: #008;">1</span><span style="color: #000;">,</span><span style="color: #008;">2</span><span style="color: black;">&#41;</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> n <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>n_min<span style="color: #000;">,</span>n_max+<span style="color: #008;">1</span><span style="color: #000;">,</span><span style="color: #008;">2</span><span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        xyz_Liste.<span style="color: black;">append</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;dgm1_%i_%i_2_nw.xyz&quot;</span> % <span style="color: black;">&#40;</span>e<span style="color: #000;">,</span>n<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Sind alle Dateien vorhanden?</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">fehlende_zip<span style="color: #000;">=</span><span style="color: black;">&#91;</span><span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">for</span> xyz_Name <span style="color: #ff7700;">in</span> xyz_Liste:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">if</span> <span style="color: #ff7700;">not</span> <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">isfile</span><span style="color: black;">&#40;</span>ordner+<span style="color: #080;">&quot;/&quot;</span>+xyz_Name<span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #808;">print</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;Die XYZ-Datei %s fehlt!&quot;</span> % xyz_Name<span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #800; font-style: italic;"># print(&quot;Sie finden Sie in folgenden ZIP-Archiven:&quot;)</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #ff7700;">with</span> <span style="color: #808;">open</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;Gelaendekatalog.csv&quot;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;">as</span> <span style="color: #dc143c;">csv</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            <span style="color: #ff7700;">for</span> Zeile <span style="color: #ff7700;">in</span> <span style="color: #dc143c;">csv</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                <span style="color: #ff7700;">if</span> xyz_Name <span style="color: #ff7700;">in</span> Zeile<span style="color: black;">&#91;</span><span style="color: #008;">1</span>:<span style="color: black;">&#93;</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                    zip_name <span style="color: #000;">=</span> Zeile.<span style="color: black;">split</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#91;</span><span style="color: #008;">0</span><span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                    <span style="color: #800; font-style: italic;"># print(zip_name)</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                    <span style="color: #ff7700;">if</span> zip_name <span style="color: #ff7700;">not</span> <span style="color: #ff7700;">in</span> fehlende_zip:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                        fehlende_zip.<span style="color: black;">append</span><span style="color: black;">&#40;</span>zip_name<span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">if</span> fehlende_zip:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #808;">print</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Bitte laden Sie zuerst die fehlenden ZIP-Archive herunter und<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">          <span style="color: #080;">&quot;entpacken Sie die darin enthaltenen XYZ-Dateien in den Ordner<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">          <span style="color: #080;">&quot;%s.<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % ordner<span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #808;">print</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;In diesen Archiven können Sie die fehlenden Kacheln finden:<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #808;">print</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span>fehlende_zip<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #808;">print</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Die Downloadseite<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">          <span style="color: #080;">&quot;https://www.opengeodata.nrw.de/produkte/geobasis/dgm/dgm1/<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">          <span style="color: #080;">&quot;wird nun im Webbrowser aufgerufen …&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #dc143c;">webbrowser</span>.<span style="color: #808;">open</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;https://www.opengeodata.nrw.de/&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                    <span style="color: #080;">&quot;produkte/geobasis/dgm/dgm1/&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    sysexit<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808;">print</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;… alle benötigten Dateien sind vorhanden.&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Alle Dateien sind vorhanden, jetzt kümmern wir uns um die Modelldetails:</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808;">print</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Die horizontale Auflösung der Daten beträgt einen Meter, was bei<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      <span style="color: #080;">&quot;größeren Flächen zu extremen Dateigrößen und Verarbeitungszeiten der<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      <span style="color: #080;">&quot;erzeugten Modelle führen kann. Tipp: beginnen Sie mit ungefähr 1000<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      <span style="color: #080;">&quot;Punkten auf der gesamten Fläche und erhöhen Sie die Auflösung in<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      <span style="color: #080;">&quot;weiteren Durchläufen schrittweise.<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Vorschlag für die horizontale Auflösung ermitteln</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">kl0 <span style="color: #000;">=</span> <span style="color: #808;">max</span><span style="color: black;">&#40;</span><span style="color: #008;">1</span><span style="color: #000;">,</span><span style="color: #808;">int</span><span style="color: black;">&#40;</span><span style="color: black;">&#40;</span><span style="color: black;">&#40;</span>or_e-ul_e<span style="color: black;">&#41;</span>*<span style="color: black;">&#40;</span>or_n-ul_n<span style="color: black;">&#41;</span>/<span style="color: #008;">1000</span><span style="color: black;">&#41;</span>**<span style="color: #008;">0.5</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">p0 <span style="color: #000;">=</span> <span style="color: black;">&#40;</span><span style="color: black;">&#40;</span>or_e-ul_e<span style="color: black;">&#41;</span>//kl0<span style="color: black;">&#41;</span> * <span style="color: black;">&#40;</span><span style="color: black;">&#40;</span>or_n-ul_n<span style="color: black;">&#41;</span>//kl0<span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808;">print</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;Bei %i m Auflösung würden Sie beispielsweise %i Punkte erhalten.<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    kl0<span style="color: #000;">,</span> p0<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">try</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    kl <span style="color: #000;">=</span> <span style="color: #808;">int</span><span style="color: black;">&#40;</span><span style="color: #808;">input</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;Geben Sie einen ganzzahligen Wert ein [m]: &quot;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">except</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    kl <span style="color: #000;">=</span> <span style="color: #008;">1</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808;">print</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Die vertikale Auflösung der Daten beträgt einen Zentimeter. Das ist<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      <span style="color: #080;">&quot;normalerweise in Ordnung. Für einen Höhenschichteneffekt wie bei<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      <span style="color: #080;">&quot;architektonischen Geländemodellen kann dieser Wert auch auf 100 oder<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      <span style="color: #080;">&quot;mehr geändert werden, je nach gewünschter Effektstärke.<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      <span style="color: #080;">&quot;Nebeneffekt: Das CAD-Volumenmodell benötigt bei größeren Werten<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      <span style="color: #080;">&quot;deutlich weniger Speicherplatz.<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">try</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    kh <span style="color: #000;">=</span> <span style="color: #808;">int</span><span style="color: black;">&#40;</span><span style="color: #808;">input</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;Geben Sie einen ganzzahligen Wert ein [cm]: &quot;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">except</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    kh <span style="color: #000;">=</span> <span style="color: #008;">1</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">xmax <span style="color: #000;">=</span> or_e - <span style="color: black;">&#40;</span>or_e-ul_e<span style="color: black;">&#41;</span> % kl</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">ymax <span style="color: #000;">=</span> or_n - <span style="color: black;">&#40;</span>or_n-ul_n<span style="color: black;">&#41;</span> % kl</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span><span style="color: #080;">&quot;Horizontale Auflösung [m]: %i&quot;</span> % kl<span style="color: #000;">,</span> sichtbar<span style="color: #000;">=</span><span style="color: #808;">False</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span><span style="color: #080;">&quot;Vertikale Auflösung [cm]: %i&quot;</span> % kh<span style="color: #000;">,</span> sichtbar<span style="color: #000;">=</span><span style="color: #808;">False</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span><span style="color: #080;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Abstand der neuen Punkte: %i m&quot;</span> % kl<span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span><span style="color: #080;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Ausdehnung Ost-West: %i m&quot;</span> % <span style="color: black;">&#40;</span>xmax-ul_e<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span><span style="color: #080;">&quot;Ausdehnung Nord-Süd: %i m&quot;</span> % <span style="color: black;">&#40;</span>ymax-ul_n<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">fqm <span style="color: #000;">=</span> <span style="color: black;">&#40;</span>xmax-ul_e<span style="color: black;">&#41;</span>*<span style="color: black;">&#40;</span>ymax-ul_n<span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span><span style="color: #080;">&quot;Fläche: %i m² bzw. %.3f km²&quot;</span> % <span style="color: black;">&#40;</span>fqm<span style="color: #000;">,</span>fqm/<span style="color: #008;">1e6</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Alle gefundenen Höhenwerte werden zunächst in ein Dictionary</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># geschrieben, aus dem sie für die einzelnen Dateien wieder</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># ausgelesen werden.</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">D <span style="color: #000;">=</span> <span style="color: black;">&#123;</span><span style="color: black;">&#125;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Die Höhe der Unterseite ist nicht null, sondern orientiert sich</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># am tatsächlichen Gelände.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">minh <span style="color: #000;">=</span> <span style="color: #808;">float</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;inf&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">maxh <span style="color: #000;">=</span> -<span style="color: #808;">float</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;inf&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Schleife über alle zu verwendenden Eingabedateien</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">for</span> dateiname <span style="color: #ff7700;">in</span> xyz_Liste:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">with</span> <span style="color: #808;">open</span><span style="color: black;">&#40;</span>ordner+<span style="color: #080;">&quot;/&quot;</span>+dateiname<span style="color: black;">&#41;</span> <span style="color: #ff7700;">as</span> dgm:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        log<span style="color: black;">&#40;</span><span style="color: #080;">&quot;Verwende XYZ-Datei %s&quot;</span> % dateiname<span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #ff7700;">for</span> zeile <span style="color: #ff7700;">in</span> dgm:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            <span style="color: #800; font-style: italic;"># Beispiel für eine Zeile aus Bochum:</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            <span style="color: #800; font-style: italic;"># 32372000.00 5706000.00   61.32</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            <span style="color: #ff7700;">try</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                x<span style="color: #000;">,</span>y<span style="color: #000;">,</span>h <span style="color: #000;">=</span> zeile.<span style="color: black;">split</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                x <span style="color: #000;">=</span> <span style="color: #808;">int</span><span style="color: black;">&#40;</span><span style="color: #808;">float</span><span style="color: black;">&#40;</span>x<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                y <span style="color: #000;">=</span> <span style="color: #808;">int</span><span style="color: black;">&#40;</span><span style="color: #808;">float</span><span style="color: black;">&#40;</span>y<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                h <span style="color: #000;">=</span> <span style="color: #808;">float</span><span style="color: black;">&#40;</span>h<span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            <span style="color: #ff7700;">except</span> <span style="color: #808;">ValueError</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                <span style="color: #808;">print</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;Abbruch, falsches Format:&quot;</span><span style="color: #000;">,</span>zeile<span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                <span style="color: #ff7700;">break</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            <span style="color: #800; font-style: italic;"># Koordinaten der Zeile im gesuchten Rechteck?</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            <span style="color: #ff7700;">if</span> ul_e <span style="color: #000;">&lt;=</span> x <span style="color: #000;">&lt;=</span> or_e <span style="color: #ff7700;">and</span> ul_n <span style="color: #000;">&lt;=</span> y <span style="color: #000;">&lt;=</span> or_n:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                <span style="color: #800; font-style: italic;"># Liegt der Punkt im ausgedünnten Horizontalraster?</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                <span style="color: #ff7700;">if</span> <span style="color: #ff7700;">not</span> <span style="color: black;">&#40;</span>x - ul_e<span style="color: black;">&#41;</span> % kl <span style="color: #ff7700;">and</span> <span style="color: #ff7700;">not</span> <span style="color: black;">&#40;</span>y - ul_n<span style="color: black;">&#41;</span> % kl:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                    <span style="color: #800; font-style: italic;"># Punkt wird bei gewählter Auflösung verwendet</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                    <span style="color: #ff7700;">if</span> kh <span style="color: #000;">!=</span> <span style="color: #008;">1</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                        <span style="color: #800; font-style: italic;"># Höhenwerte werden gerundet</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                        h <span style="color: #000;">=</span> <span style="color: #808;">round</span><span style="color: black;">&#40;</span><span style="color: #808;">round</span><span style="color: black;">&#40;</span>h*<span style="color: #008;">100</span>/kh<span style="color: black;">&#41;</span>*kh/<span style="color: #008;">100</span><span style="color: #000;">,</span> <span style="color: #008;">2</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                    D<span style="color: black;">&#91;</span>x<span style="color: #000;">,</span>y<span style="color: black;">&#93;</span> <span style="color: #000;">=</span> h</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                    minh <span style="color: #000;">=</span> <span style="color: #808;">min</span><span style="color: black;">&#40;</span>h<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                    maxh <span style="color: #000;">=</span> <span style="color: #808;">max</span><span style="color: black;">&#40;</span>h<span style="color: #000;">,</span> maxh<span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Größte gefundene Höhe: {maxh:.2f} Meter&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Kleinste gefundene Höhe: {minh:.2f} Meter&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">minhs <span style="color: #000;">=</span> minh <span style="color: #800; font-style: italic;"># &quot;echten&quot; minh-Wert merken</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Unterkante des Modells absenken:</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">minh <span style="color: #000;">=</span> <span style="color: #008;">10</span> * floor<span style="color: black;">&#40;</span>minh/<span style="color: #008;">10</span><span style="color: black;">&#41;</span> - <span style="color: #008;">10</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Setze Unterkante auf {minh:.2f} Meter.&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Neue Modellhöhe: {maxh-minh:.2f} Meter&quot;</span><span style="color: black;">&#41;</span> </div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Diagramm anzeigen</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808;">print</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Höhendiagramm wird erzeugt.&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">try</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">import</span> matplotlib.<span style="color: black;">pyplot</span> <span style="color: #ff7700;">as</span> plt</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Keine Interaktion, Diagramm nur anzeigen …</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    plt.<span style="color: black;">rcParams</span><span style="color: black;">&#91;</span><span style="color: #080;">'toolbar'</span><span style="color: black;">&#93;</span> <span style="color: #000;">=</span> <span style="color: #080;">'None'</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Einheitlicher Maßstab für x und y</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    plt.<span style="color: black;">axis</span><span style="color: black;">&#40;</span><span style="color: #080;">'equal'</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Für das Diagramm wird die untere linke Ecke auf (0,0)</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># gesetzt. Wer kann schon was mit UTM-Koordinaten anfangen?</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Liste der x-Werte</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    xi <span style="color: #000;">=</span> <span style="color: #808;">list</span><span style="color: black;">&#40;</span><span style="color: #808;">range</span><span style="color: black;">&#40;</span><span style="color: #008;">0</span><span style="color: #000;">,</span>or_e-ul_e+<span style="color: #008;">1</span><span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Liste der y-Werte</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    yi <span style="color: #000;">=</span> <span style="color: #808;">list</span><span style="color: black;">&#40;</span><span style="color: #808;">range</span><span style="color: black;">&#40;</span><span style="color: #008;">0</span><span style="color: #000;">,</span>or_n-ul_n+<span style="color: #008;">1</span><span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Matrix der Höhenwerte für alle x-y-Paare</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    zi <span style="color: #000;">=</span> <span style="color: black;">&#91;</span><span style="color: black;">&#91;</span>D<span style="color: black;">&#91;</span><span style="color: black;">&#40;</span>x+ul_e<span style="color: #000;">,</span>y+ul_n<span style="color: black;">&#41;</span><span style="color: black;">&#93;</span> <span style="color: #ff7700;">for</span> x <span style="color: #ff7700;">in</span> xi<span style="color: black;">&#93;</span> <span style="color: #ff7700;">for</span> y <span style="color: #ff7700;">in</span> yi<span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Anzahl der Höhenlinien: etwa 10 (7 bis 14)</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    nh <span style="color: #000;">=</span> <span style="color: black;">&#40;</span>maxh-minhs<span style="color: black;">&#41;</span> * <span style="color: #008;">100</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">while</span> nh <span style="color: #000;">&gt;</span> <span style="color: #008;">70</span>: nh <span style="color: #000;">=</span> <span style="color: #808;">int</span><span style="color: black;">&#40;</span>nh/<span style="color: #008;">10</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">if</span> nh <span style="color: #000;">&gt;</span> <span style="color: #008;">35</span>: nh <span style="color: #000;">=</span> <span style="color: #808;">int</span><span style="color: black;">&#40;</span>nh/<span style="color: #008;">5</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">if</span> nh <span style="color: #000;">&gt;</span> <span style="color: #008;">14</span>: nh <span style="color: #000;">=</span> <span style="color: #808;">int</span><span style="color: black;">&#40;</span>nh/<span style="color: #008;">2</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># print(&quot;Zeichne&quot;,nh,&quot;Höhenlinien.&quot;)</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Höhenlinien</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    plt.<span style="color: black;">contour</span><span style="color: black;">&#40;</span>xi<span style="color: #000;">,</span> yi<span style="color: #000;">,</span> zi<span style="color: #000;">,</span> nh<span style="color: #000;">,</span> linewidths<span style="color: #000;">=</span><span style="color: #008;">1</span><span style="color: #000;">,</span> colors<span style="color: #000;">=</span><span style="color: #080;">&quot;k&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># farbige Oberfläche</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    plt.<span style="color: black;">pcolormesh</span><span style="color: black;">&#40;</span>xi<span style="color: #000;">,</span> yi<span style="color: #000;">,</span> zi<span style="color: #000;">,</span> cmap <span style="color: #000;">=</span> plt.<span style="color: black;">get_cmap</span><span style="color: black;">&#40;</span><span style="color: #080;">'terrain'</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Legende</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    plt.<span style="color: black;">colorbar</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Überschrift</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    plt.<span style="color: black;">title</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Ausschnittgröße {xmax-ul_e}×{ymax-ul_n} m<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">              f<span style="color: #080;">&quot;(0,0) bei {ul_lat}° Nord, {ul_lon}° Ost&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    plt.<span style="color: black;">gcf</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">canvas</span>.<span style="color: black;">set_window_title</span><span style="color: black;">&#40;</span>f<span style="color: #080;">'Höhendiagramm {name}'</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># anzeigen und zurück zum Programm …</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    plt.<span style="color: black;">show</span><span style="color: black;">&#40;</span>block<span style="color: #000;">=</span><span style="color: #808;">False</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Bild als PDF speichern</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    ausname <span style="color: #000;">=</span> name+<span style="color: #080;">&quot;.pdf&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    log<span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Schreibe PDF-Ausgabedatei: {ausname}&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    plt.<span style="color: black;">savefig</span><span style="color: black;">&#40;</span>ausname<span style="color: #000;">,</span> bbox_inches<span style="color: #000;">=</span><span style="color: #080;">'tight'</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">except</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #808;">print</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Fehler: Diagramm kann nicht angezeigt werden.&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">          <span style="color: #080;">&quot; Ist matplotlib nicht installiert?<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    plt<span style="color: #000;">=</span><span style="color: #808;">None</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Alle Punkte als simple XYZ-Datei sichern</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">ausname <span style="color: #000;">=</span> name+<span style="color: #080;">&quot;.xyz&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Schreibe XYZ-Ausgabedatei: {ausname}&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">with</span> <span style="color: #808;">open</span><span style="color: black;">&#40;</span>ausname<span style="color: #000;">,</span><span style="color: #080;">&quot;w&quot;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;">as</span> aus:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> x <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_e<span style="color: #000;">,</span>or_e+<span style="color: #008;">1</span><span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #ff7700;">for</span> y <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_n<span style="color: #000;">,</span>or_n+<span style="color: #008;">1</span><span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;{x} {y} {D[(x,y)]:.2f}<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># XYZ-Daten für BricsCAD mit Komma trennen und zum Koordinatenursprung</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># verschieben.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">ausname <span style="color: #000;">=</span> name+<span style="color: #080;">&quot;.txt&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Schreibe BricsCAD-BIM-Geländedatei: {ausname}&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">with</span> <span style="color: #808;">open</span><span style="color: black;">&#40;</span>ausname<span style="color: #000;">,</span><span style="color: #080;">&quot;w&quot;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;">as</span> aus:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> x <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_e<span style="color: #000;">,</span>or_e+<span style="color: #008;">1</span><span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #ff7700;">for</span> y <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_n<span style="color: #000;">,</span>or_n+<span style="color: #008;">1</span><span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;{x-ul_e},{y-ul_n},{D[(x,y)]:.2f}<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># DXF-Export</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">ausname <span style="color: #000;">=</span> name+<span style="color: #080;">&quot;.dxf&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Schreibe DXF-Datei mit 3D-Flächen: {ausname}&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Weil 3D-Solids in einem obskuren „Geheimformat“ gespeichert werden, wird</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># hier nur die umhüllende Fläche erzeugt. Diese muss im CAD-Programm mittels</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># der Befehle REGION und HEFTEN in einen SOLID umgewandelt werden, um einen</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># richtigen Geländekörper zu erhalten.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">with</span> <span style="color: #808;">open</span><span style="color: black;">&#40;</span>ausname<span style="color: #000;">,</span><span style="color: #080;">&quot;w&quot;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;">as</span> aus:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;0<span style="color: #000099; font-weight: bold;">\n</span>SECTION<span style="color: #000099; font-weight: bold;">\n</span>2<span style="color: #000099; font-weight: bold;">\n</span>HEADER<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">              <span style="color: #080;">&quot;9<span style="color: #000099; font-weight: bold;">\n</span>$ACADVER<span style="color: #000099; font-weight: bold;">\n</span>1<span style="color: #000099; font-weight: bold;">\n</span>AC1006<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">              <span style="color: #080;">&quot;9<span style="color: #000099; font-weight: bold;">\n</span>$INSBASE<span style="color: #000099; font-weight: bold;">\n</span>10<span style="color: #000099; font-weight: bold;">\n</span>0.0<span style="color: #000099; font-weight: bold;">\n</span>20<span style="color: #000099; font-weight: bold;">\n</span>0.0<span style="color: #000099; font-weight: bold;">\n</span>30<span style="color: #000099; font-weight: bold;">\n</span>0.0<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">              <span style="color: #080;">&quot;9<span style="color: #000099; font-weight: bold;">\n</span>$INSUNITS<span style="color: #000099; font-weight: bold;">\n</span>70<span style="color: #000099; font-weight: bold;">\n</span>6<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">              <span style="color: #080;">&quot;9<span style="color: #000099; font-weight: bold;">\n</span>$EXTMIN<span style="color: #000099; font-weight: bold;">\n</span>10<span style="color: #000099; font-weight: bold;">\n</span>0.0<span style="color: #000099; font-weight: bold;">\n</span>20<span style="color: #000099; font-weight: bold;">\n</span>0.0<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">              <span style="color: #080;">&quot;9<span style="color: #000099; font-weight: bold;">\n</span>$EXTMAX<span style="color: #000099; font-weight: bold;">\n</span>10<span style="color: #000099; font-weight: bold;">\n</span>%f<span style="color: #000099; font-weight: bold;">\n</span>20<span style="color: #000099; font-weight: bold;">\n</span>%f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xmax-ul_e<span style="color: #000;">,</span> ymax-ul_n<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">              <span style="color: #080;">&quot;9<span style="color: #000099; font-weight: bold;">\n</span>$LIMMIN<span style="color: #000099; font-weight: bold;">\n</span>10<span style="color: #000099; font-weight: bold;">\n</span>0.0<span style="color: #000099; font-weight: bold;">\n</span>20<span style="color: #000099; font-weight: bold;">\n</span>0.0<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">              <span style="color: #080;">&quot;9<span style="color: #000099; font-weight: bold;">\n</span>$LIMMAX<span style="color: #000099; font-weight: bold;">\n</span>10<span style="color: #000099; font-weight: bold;">\n</span>%f<span style="color: #000099; font-weight: bold;">\n</span>20<span style="color: #000099; font-weight: bold;">\n</span>%f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xmax-ul_e<span style="color: #000;">,</span> ymax-ul_n<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">              <span style="color: #080;">&quot;0<span style="color: #000099; font-weight: bold;">\n</span>ENDSEC<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">              <span style="color: #080;">&quot;0<span style="color: #000099; font-weight: bold;">\n</span>SECTION<span style="color: #000099; font-weight: bold;">\n</span>2<span style="color: #000099; font-weight: bold;">\n</span>ENTITIES<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Geländeoberfläche</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> x <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_e<span style="color: #000;">,</span>xmax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      xu <span style="color: #000;">=</span> x - ul_e</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      <span style="color: #ff7700;">for</span> y <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_n<span style="color: #000;">,</span>ymax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        yu <span style="color: #000;">=</span> y - ul_n</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h1 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x<span style="color: #000;">,</span>y<span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h2 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x+kl<span style="color: #000;">,</span>y<span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h3 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x<span style="color: #000;">,</span>y+kl<span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h4 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x+kl<span style="color: #000;">,</span>y+kl<span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;0<span style="color: #000099; font-weight: bold;">\n</span>3DFACE<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;10<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>20<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>30<span style="color: #000099; font-weight: bold;">\n</span>%s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h1<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;11<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>21<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>31<span style="color: #000099; font-weight: bold;">\n</span>%s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> h4<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;12<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>22<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>32<span style="color: #000099; font-weight: bold;">\n</span>%s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h2<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;13<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>23<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>33<span style="color: #000099; font-weight: bold;">\n</span>%s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h2<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;0<span style="color: #000099; font-weight: bold;">\n</span>3DFACE<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;10<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>20<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>30<span style="color: #000099; font-weight: bold;">\n</span>%s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h1<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;11<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>21<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>31<span style="color: #000099; font-weight: bold;">\n</span>%s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> h3<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;12<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>22<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>32<span style="color: #000099; font-weight: bold;">\n</span>%s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> h4<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;13<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>23<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>33<span style="color: #000099; font-weight: bold;">\n</span>%s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> h4<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Unterseite</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;0<span style="color: #000099; font-weight: bold;">\n</span>3DFACE<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">              <span style="color: #080;">&quot;10<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>20<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>30<span style="color: #000099; font-weight: bold;">\n</span>%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span><span style="color: #008;">0</span><span style="color: #000;">,</span><span style="color: #008;">0</span><span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">              <span style="color: #080;">&quot;11<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>21<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>31<span style="color: #000099; font-weight: bold;">\n</span>%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xmax-ul_e<span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">              <span style="color: #080;">&quot;12<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>22<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>32<span style="color: #000099; font-weight: bold;">\n</span>%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xmax-ul_e<span style="color: #000;">,</span> ymax-ul_n<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">              <span style="color: #080;">&quot;13<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>23<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>33<span style="color: #000099; font-weight: bold;">\n</span>%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span><span style="color: #008;">0</span><span style="color: #000;">,</span> ymax-ul_n<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Linke Wand</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> y <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_n<span style="color: #000;">,</span>ymax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        yu <span style="color: #000;">=</span> y-ul_n</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h1 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>ul_e<span style="color: #000;">,</span>y<span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h2 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>ul_e<span style="color: #000;">,</span>y+kl<span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;0<span style="color: #000099; font-weight: bold;">\n</span>3DFACE<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;10<span style="color: #000099; font-weight: bold;">\n</span>0<span style="color: #000099; font-weight: bold;">\n</span>20<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>30<span style="color: #000099; font-weight: bold;">\n</span>%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>yu<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;11<span style="color: #000099; font-weight: bold;">\n</span>0<span style="color: #000099; font-weight: bold;">\n</span>21<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>31<span style="color: #000099; font-weight: bold;">\n</span>%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>yu+kl<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;12<span style="color: #000099; font-weight: bold;">\n</span>0<span style="color: #000099; font-weight: bold;">\n</span>22<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>32<span style="color: #000099; font-weight: bold;">\n</span>%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>yu+kl<span style="color: #000;">,</span> h2<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;13<span style="color: #000099; font-weight: bold;">\n</span>0<span style="color: #000099; font-weight: bold;">\n</span>23<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>33<span style="color: #000099; font-weight: bold;">\n</span>%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>yu<span style="color: #000;">,</span> h1<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Rechte Wand</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> y <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_n<span style="color: #000;">,</span>ymax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        xu <span style="color: #000;">=</span> xmax-ul_e</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        yu <span style="color: #000;">=</span> y-ul_n</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h1 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>xmax<span style="color: #000;">,</span>y<span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h2 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>xmax<span style="color: #000;">,</span>y+kl<span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;0<span style="color: #000099; font-weight: bold;">\n</span>3DFACE<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;10<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>20<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>30<span style="color: #000099; font-weight: bold;">\n</span>%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;11<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>21<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>31<span style="color: #000099; font-weight: bold;">\n</span>%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h1<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;12<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>22<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>32<span style="color: #000099; font-weight: bold;">\n</span>%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> h2<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;13<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>23<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>33<span style="color: #000099; font-weight: bold;">\n</span>%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Vordere Wand</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> x <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_e<span style="color: #000;">,</span>xmax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h1 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x<span style="color: #000;">,</span>ul_n<span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h2 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x+kl<span style="color: #000;">,</span>ul_n<span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        xu <span style="color: #000;">=</span> x - ul_e</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;0<span style="color: #000099; font-weight: bold;">\n</span>3DFACE<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;10<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>20<span style="color: #000099; font-weight: bold;">\n</span>0<span style="color: #000099; font-weight: bold;">\n</span>30<span style="color: #000099; font-weight: bold;">\n</span>%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;11<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>21<span style="color: #000099; font-weight: bold;">\n</span>0<span style="color: #000099; font-weight: bold;">\n</span>31<span style="color: #000099; font-weight: bold;">\n</span>%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> h1<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;12<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>22<span style="color: #000099; font-weight: bold;">\n</span>0<span style="color: #000099; font-weight: bold;">\n</span>32<span style="color: #000099; font-weight: bold;">\n</span>%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> h2<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;13<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>23<span style="color: #000099; font-weight: bold;">\n</span>0<span style="color: #000099; font-weight: bold;">\n</span>33<span style="color: #000099; font-weight: bold;">\n</span>%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Hintere Wand</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> x <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_e<span style="color: #000;">,</span>xmax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        xu <span style="color: #000;">=</span> x - ul_e</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        yu <span style="color: #000;">=</span> ymax - ul_n</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h1 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x<span style="color: #000;">,</span>ymax<span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h2 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x+kl<span style="color: #000;">,</span>ymax<span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;0<span style="color: #000099; font-weight: bold;">\n</span>3DFACE<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;10<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>20<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>30<span style="color: #000099; font-weight: bold;">\n</span>%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;11<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>21<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>31<span style="color: #000099; font-weight: bold;">\n</span>%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;12<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>22<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>32<span style="color: #000099; font-weight: bold;">\n</span>%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h2<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;13<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>23<span style="color: #000099; font-weight: bold;">\n</span>%i<span style="color: #000099; font-weight: bold;">\n</span>33<span style="color: #000099; font-weight: bold;">\n</span>%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h1<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;0<span style="color: #000099; font-weight: bold;">\n</span>ENDSEC<span style="color: #000099; font-weight: bold;">\n</span>0<span style="color: #000099; font-weight: bold;">\n</span>EOF<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Diverse Skripte für AutoCAD/BricsCAD</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">def</span> scr_intro<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #080;">&quot;Nimmt Grundeinstellungen des Zeichnungseditors vor&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Rückgängigmachen ausschalten</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Koordinateneingabe hat Vorrang vor Objektfang,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Einheit Meter,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Ansicht schräg von Südwesten,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Visueller Stil Drahtmodell (Geschwindigkeit!),</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Zoom auf interessanten Quader</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">return</span> <span style="color: black;">&#40;</span><span style="color: #080;">&quot;Zurück S K<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            <span style="color: #080;">&quot;OSnapCoord 1<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            <span style="color: #080;">&quot;_InsUnits 6<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            <span style="color: #080;">&quot;APunkt -1,-2,2<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            <span style="color: #080;">&quot;-Vis A Drahtmodell<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            <span style="color: #080;">&quot;Zoom F 0,0,%f %i,%i,%f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>minh<span style="color: #000;">,</span> or_e-ul_e<span style="color: #000;">,</span> or_n-ul_n<span style="color: #000;">,</span> maxh<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Einstellungen nach Skriptende:</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">def</span> scr_exit<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Rückgängigmachen einschalten</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Zoom auf Grenzen</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">return</span> <span style="color: black;">&#40;</span><span style="color: #080;">&quot;Zurück A<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            <span style="color: #080;">&quot;Zoom G<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">ausname <span style="color: #000;">=</span> name+<span style="color: #080;">&quot;.quadratprismen.scr&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Schreibe CAD-Skriptdatei mit Quadratprismenfeld: {ausname}&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Eigentlich wäre es universeller, anstelle der deutschsprachigen</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Bezeichner englischsprachige Bezeichner mit vorangestelltem Unterstrich</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># zu verwenden. Dummerweise kommt BricsCAD damit nicht immer zurecht.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">with</span> <span style="color: #808;">open</span><span style="color: black;">&#40;</span>ausname<span style="color: #000;">,</span><span style="color: #080;">&quot;w&quot;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;">as</span> aus:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span>scr_intro<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> x <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_e<span style="color: #000;">,</span>or_e+<span style="color: #008;">1</span><span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #ff7700;">for</span> y <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_n<span style="color: #000;">,</span>or_n+<span style="color: #008;">1</span><span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;Quader %i,%i,%.2f %i,%i,%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                x-ul_e<span style="color: #000;">,</span> y-ul_n<span style="color: #000;">,</span> minh<span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                x-ul_e+kl<span style="color: #000;">,</span> y-ul_n+kl<span style="color: #000;">,</span> D<span style="color: black;">&#91;</span><span style="color: black;">&#40;</span>x<span style="color: #000;">,</span>y<span style="color: black;">&#41;</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span>scr_exit<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">ausname <span style="color: #000;">=</span> name+<span style="color: #080;">&quot;.dreiecksprismen.scr&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Schreibe CAD-Skriptdatei mit Dreiecksprismenfeld: {ausname}&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">with</span> <span style="color: #808;">open</span><span style="color: black;">&#40;</span>ausname<span style="color: #000;">,</span><span style="color: #080;">&quot;w&quot;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;">as</span> aus:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span>scr_intro<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> x <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_e<span style="color: #000;">,</span>xmax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #ff7700;">for</span> y <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_n<span style="color: #000;">,</span>ymax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            h1 <span style="color: #000;">=</span> <span style="color: #808;">float</span><span style="color: black;">&#40;</span>D<span style="color: black;">&#91;</span>x<span style="color: #000;">,</span>y<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            x1<span style="color: #000;">,</span> y1 <span style="color: #000;">=</span> x-ul_e<span style="color: #000;">,</span> y-ul_n</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            h2 <span style="color: #000;">=</span> <span style="color: #808;">float</span><span style="color: black;">&#40;</span>D<span style="color: black;">&#91;</span>x+kl<span style="color: #000;">,</span>y<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            x2<span style="color: #000;">,</span> y2 <span style="color: #000;">=</span> x1+kl<span style="color: #000;">,</span> y1</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            h3 <span style="color: #000;">=</span> <span style="color: #808;">float</span><span style="color: black;">&#40;</span>D<span style="color: black;">&#91;</span>x+kl<span style="color: #000;">,</span>y+kl<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            x3<span style="color: #000;">,</span> y3 <span style="color: #000;">=</span> x2<span style="color: #000;">,</span> y1+kl</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            h4 <span style="color: #000;">=</span> <span style="color: #808;">float</span><span style="color: black;">&#40;</span>D<span style="color: black;">&#91;</span>x<span style="color: #000;">,</span>y+kl<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            x4<span style="color: #000;">,</span> y4 <span style="color: #000;">=</span> x1<span style="color: #000;">,</span> y3</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            hmax <span style="color: #000;">=</span> <span style="color: #808;">max</span><span style="color: black;">&#40;</span>h1<span style="color: #000;">,</span> h2<span style="color: #000;">,</span> h3<span style="color: #000;">,</span> h4<span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            <span style="color: #800; font-style: italic;"># Dreieck auf Nullebene zeichnen …</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;3DPoly %i,%i,%.2f %i,%i,%.2f %i,%i,%.2f S<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                x1<span style="color: #000;">,</span>y1<span style="color: #000;">,</span>minh<span style="color: #000;">,</span> x2<span style="color: #000;">,</span>y2<span style="color: #000;">,</span>minh<span style="color: #000;">,</span> x3<span style="color: #000;">,</span>y3<span style="color: #000;">,</span>minh<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            <span style="color: #800; font-style: italic;"># … bis zum höchsten Punkt hochziehen …</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;_extrude L  %f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>hmax-minh<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            <span style="color: #800; font-style: italic;"># … und oben schräg abschneiden.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;Kappen L   %i,%i,%f %i,%i,%f %i,%i,%f %i,%i,%f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> %</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                      <span style="color: black;">&#40;</span>x1<span style="color: #000;">,</span>y1<span style="color: #000;">,</span>h1<span style="color: #000;">,</span> x2<span style="color: #000;">,</span>y2<span style="color: #000;">,</span>h2<span style="color: #000;">,</span> x3<span style="color: #000;">,</span>y3<span style="color: #000;">,</span>h3<span style="color: #000;">,</span> x1<span style="color: #000;">,</span>y1<span style="color: #000;">,</span>minh<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            <span style="color: #800; font-style: italic;"># Und nochmal für das zweite Dreieck:</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;3DPoly %i,%i,%.2f %i,%i,%.2f %i,%i,%.2f S<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                x1<span style="color: #000;">,</span>y1<span style="color: #000;">,</span>minh<span style="color: #000;">,</span> x4<span style="color: #000;">,</span>y4<span style="color: #000;">,</span>minh<span style="color: #000;">,</span> x3<span style="color: #000;">,</span>y3<span style="color: #000;">,</span>minh<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;_extrude L  %f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % hmax<span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;Kappen L   %i,%i,%f %i,%i,%f %i,%i,%f %i,%i,%f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> %</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                      <span style="color: black;">&#40;</span>x1<span style="color: #000;">,</span>y1<span style="color: #000;">,</span>h1<span style="color: #000;">,</span> x4<span style="color: #000;">,</span>y4<span style="color: #000;">,</span>h4<span style="color: #000;">,</span> x3<span style="color: #000;">,</span>y3<span style="color: #000;">,</span>h3<span style="color: #000;">,</span> x1<span style="color: #000;">,</span>y1<span style="color: #000;">,</span>minh<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span>scr_exit<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">ausname <span style="color: #000;">=</span> name+<span style="color: #080;">&quot;.mesh.scr&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Schreibe CAD-Skriptdatei mit 3D-Netz (Mesh): {ausname}&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Beim Quadratnetz hat BricsCAD die Einschränkung, dass es maximal</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># 256×256 Knoten haben darf. Daher muss hier ausgedünnt werden.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">with</span> <span style="color: #808;">open</span><span style="color: black;">&#40;</span>ausname<span style="color: #000;">,</span><span style="color: #080;">&quot;w&quot;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;">as</span> aus:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span>scr_intro<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    n <span style="color: #000;">=</span> <span style="color: #008;">1</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    klm <span style="color: #000;">=</span> kl</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">while</span> <span style="color: black;">&#40;</span>or_e-ul_e+<span style="color: #008;">1</span><span style="color: black;">&#41;</span>//klm <span style="color: #000;">&gt;</span> <span style="color: #008;">256</span> <span style="color: #ff7700;">or</span> <span style="color: black;">&#40;</span>or_n-ul_n+<span style="color: #008;">1</span><span style="color: black;">&#41;</span>//klm <span style="color: #000;">&gt;</span> <span style="color: #008;">256</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        n +<span style="color: #000;">=</span> <span style="color: #008;">1</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        klm <span style="color: #000;">=</span> kl * n</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">if</span> n<span style="color: #000;">&gt;</span><span style="color: #008;">1</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        log<span style="color: black;">&#40;</span><span style="color: #080;">&quot;Verwende nur jeden %i. Punkt pro Richtung.&quot;</span> % n<span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Gelände</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;3dnetz %i %i<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span><span style="color: black;">&#40;</span>or_e-ul_e<span style="color: black;">&#41;</span>//klm+<span style="color: #008;">1</span><span style="color: #000;">,</span><span style="color: black;">&#40;</span>or_n-ul_n<span style="color: black;">&#41;</span>//klm+<span style="color: #008;">1</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> x <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_e<span style="color: #000;">,</span>or_e+<span style="color: #008;">1</span><span style="color: #000;">,</span>klm<span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #ff7700;">for</span> y <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_n<span style="color: #000;">,</span>or_n+<span style="color: #008;">1</span><span style="color: #000;">,</span>klm<span style="color: black;">&#41;</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;%i,%i,%f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>x-ul_e<span style="color: #000;">,</span>y-ul_n<span style="color: #000;">,</span>D<span style="color: black;">&#91;</span><span style="color: black;">&#40;</span>x<span style="color: #000;">,</span>y<span style="color: black;">&#41;</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Seitenflächen</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    y <span style="color: #000;">=</span> ul_n</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;3dnetz %i 2<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span><span style="color: black;">&#40;</span>or_e-ul_e<span style="color: black;">&#41;</span>//klm+<span style="color: #008;">1</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> x <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_e<span style="color: #000;">,</span>or_e+<span style="color: #008;">1</span><span style="color: #000;">,</span>klm<span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;%i,%i,%f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>x-ul_e<span style="color: #000;">,</span>y-ul_n<span style="color: #000;">,</span>minh<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;%i,%i,%f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>x-ul_e<span style="color: #000;">,</span>y-ul_n<span style="color: #000;">,</span>D<span style="color: black;">&#91;</span><span style="color: black;">&#40;</span>x<span style="color: #000;">,</span>y<span style="color: black;">&#41;</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    y <span style="color: #000;">=</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_n<span style="color: #000;">,</span>or_n+<span style="color: #008;">1</span><span style="color: #000;">,</span>klm<span style="color: black;">&#41;</span><span style="color: black;">&#91;</span>-<span style="color: #008;">1</span><span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;3dnetz %i 2<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span><span style="color: black;">&#40;</span>or_e-ul_e<span style="color: black;">&#41;</span>//klm+<span style="color: #008;">1</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> x <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_e<span style="color: #000;">,</span>or_e+<span style="color: #008;">1</span><span style="color: #000;">,</span>klm<span style="color: black;">&#41;</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;%i,%i,%f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>x-ul_e<span style="color: #000;">,</span>y-ul_n<span style="color: #000;">,</span>minh<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;%i,%i,%f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>x-ul_e<span style="color: #000;">,</span>y-ul_n<span style="color: #000;">,</span>D<span style="color: black;">&#91;</span><span style="color: black;">&#40;</span>x<span style="color: #000;">,</span>y<span style="color: black;">&#41;</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    x <span style="color: #000;">=</span> ul_e            </div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;3dnetz %i 2<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span><span style="color: black;">&#40;</span>or_n-ul_n<span style="color: black;">&#41;</span>//klm+<span style="color: #008;">1</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> y <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_n<span style="color: #000;">,</span>or_n+<span style="color: #008;">1</span><span style="color: #000;">,</span>klm<span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;%i,%i,%f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>x-ul_e<span style="color: #000;">,</span>y-ul_n<span style="color: #000;">,</span>minh<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;%i,%i,%f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>x-ul_e<span style="color: #000;">,</span>y-ul_n<span style="color: #000;">,</span>D<span style="color: black;">&#91;</span><span style="color: black;">&#40;</span>x<span style="color: #000;">,</span>y<span style="color: black;">&#41;</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    x <span style="color: #000;">=</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_e<span style="color: #000;">,</span>or_e+<span style="color: #008;">1</span><span style="color: #000;">,</span>klm<span style="color: black;">&#41;</span><span style="color: black;">&#91;</span>-<span style="color: #008;">1</span><span style="color: black;">&#93;</span>           </div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;3dnetz %i 2<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span><span style="color: black;">&#40;</span>or_n-ul_n<span style="color: black;">&#41;</span>//klm+<span style="color: #008;">1</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> y <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_n<span style="color: #000;">,</span>or_n+<span style="color: #008;">1</span><span style="color: #000;">,</span>klm<span style="color: black;">&#41;</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;%i,%i,%f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>x-ul_e<span style="color: #000;">,</span>y-ul_n<span style="color: #000;">,</span>minh<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;%i,%i,%f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>x-ul_e<span style="color: #000;">,</span>y-ul_n<span style="color: #000;">,</span>D<span style="color: black;">&#91;</span><span style="color: black;">&#40;</span>x<span style="color: #000;">,</span>y<span style="color: black;">&#41;</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Boden</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    x_max <span style="color: #000;">=</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_e<span style="color: #000;">,</span>or_e+<span style="color: #008;">1</span><span style="color: #000;">,</span>klm<span style="color: black;">&#41;</span><span style="color: black;">&#91;</span>-<span style="color: #008;">1</span><span style="color: black;">&#93;</span>-ul_e</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    y_max <span style="color: #000;">=</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_n<span style="color: #000;">,</span>or_n+<span style="color: #008;">1</span><span style="color: #000;">,</span>klm<span style="color: black;">&#41;</span><span style="color: black;">&#91;</span>-<span style="color: #008;">1</span><span style="color: black;">&#93;</span>-ul_n</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;3dfläche<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;0,0,%f &quot;</span> % <span style="color: black;">&#40;</span>minh<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;0,%i,%f &quot;</span> % <span style="color: black;">&#40;</span>y_max<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;%i,%i,%f &quot;</span> % <span style="color: black;">&#40;</span>x_max<span style="color: #000;">,</span> y_max<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;%i,0,%f <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>x_max<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span>scr_exit<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">ausname <span style="color: #000;">=</span> name+<span style="color: #080;">&quot;.3dflächen.scr&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Schreibe CAD-Scriptdatei mit 3D-Flächen: {ausname}&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Das 3D-Netz oben lässt sich in BricsCAD blöderweise nicht zu einem</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Solid umformen. Hier wird daher nun derselbe Algorithmus verwendet,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># der auch für STL-Dateien zum Einsatz kommt.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Für die Seiten und den Boden werden Vierecke verwendet.</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">with</span> <span style="color: #808;">open</span><span style="color: black;">&#40;</span>ausname<span style="color: #000;">,</span><span style="color: #080;">&quot;w&quot;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;">as</span> aus:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span>scr_intro<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Geländeoberfläche</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> x <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_e<span style="color: #000;">,</span>xmax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      xu <span style="color: #000;">=</span> x - ul_e</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      <span style="color: #ff7700;">for</span> y <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_n<span style="color: #000;">,</span>ymax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        yu <span style="color: #000;">=</span> y - ul_n</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h1 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x<span style="color: #000;">,</span>y<span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h2 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x+kl<span style="color: #000;">,</span>y<span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h3 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x<span style="color: #000;">,</span>y+kl<span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h4 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x+kl<span style="color: #000;">,</span>y+kl<span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;3dfläche<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;%i,%i,%s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h1<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;%i,%i,%s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> h4<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;%i,%i,%s<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h2<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;3dfläche<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;%i,%i,%s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h1<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;%i,%i,%s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> h3<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;%i,%i,%s<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> h4<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Unterseite</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;3dfläche<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">              <span style="color: #080;">&quot;%i,%i,%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span><span style="color: #008;">0</span><span style="color: #000;">,</span><span style="color: #008;">0</span><span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">              <span style="color: #080;">&quot;%i,%i,%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xmax-ul_e<span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">              <span style="color: #080;">&quot;%i,%i,%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xmax-ul_e<span style="color: #000;">,</span> ymax-ul_n<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">              <span style="color: #080;">&quot;%i,%i,%.2f<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span><span style="color: #008;">0</span><span style="color: #000;">,</span> ymax-ul_n<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Linke Wand</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> y <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_n<span style="color: #000;">,</span>ymax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        yu <span style="color: #000;">=</span> y-ul_n</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h1 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>ul_e<span style="color: #000;">,</span>y<span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h2 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>ul_e<span style="color: #000;">,</span>y+kl<span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;3dfläche<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;0,%i,%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>yu<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;0,%i,%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>yu+kl<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;0,%i,%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>yu+kl<span style="color: #000;">,</span> h2<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;0,%i,%.2f<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>yu<span style="color: #000;">,</span> h1<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Rechte Wand</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> y <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_n<span style="color: #000;">,</span>ymax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        xu <span style="color: #000;">=</span> xmax-ul_e</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        yu <span style="color: #000;">=</span> y-ul_n</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h1 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>xmax<span style="color: #000;">,</span>y<span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h2 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>xmax<span style="color: #000;">,</span>y+kl<span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;3dfläche<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;%i,%i,%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;%i,%i,%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h1<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;%i,%i,%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> h2<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;%i,%i,%.2f<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Vordere Wand</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> x <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_e<span style="color: #000;">,</span>xmax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h1 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x<span style="color: #000;">,</span>ul_n<span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h2 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x+kl<span style="color: #000;">,</span>ul_n<span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        xu <span style="color: #000;">=</span> x - ul_e</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;3dfläche<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;%i,0,%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;%i,0,%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> h1<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;%i,0,%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> h2<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;%i,0,%.2f<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Hintere Wand</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> x <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_e<span style="color: #000;">,</span>xmax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        xu <span style="color: #000;">=</span> x - ul_e</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        yu <span style="color: #000;">=</span> ymax - ul_n</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h1 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x<span style="color: #000;">,</span>ymax<span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h2 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x+kl<span style="color: #000;">,</span>ymax<span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;3dfläche<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;%i,%i,%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;%i,%i,%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;%i,%i,%.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h2<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;%i,%i,%.2f<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h1<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span>scr_exit<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">ausname <span style="color: #000;">=</span> name+<span style="color: #080;">&quot;.ascii.stl&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Schreibe STL-Datei für 3D-Druck (ASCII): {ausname}&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Die Flächen umhüllen einen Quader, der unten auf Höhe minh aufliegt</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># und oben durch die Geländeoberfläche abgeschnitten wird.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Für die „Flächennormalen“ wird hier immer eine der Achsenrichtungen</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># eingesetzt. Für die Geländeoberfläche ist das beispielsweise die</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># nach oben gerichtete z-Achse (0, 0, 1).</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Der genaue Winkel ist auch gar nicht relevant. Hauptsache,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># die „Normale“ zeigt irgendwie aus dem umhüllten Körper heraus</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># und nicht in ihn hinein.</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">with</span> <span style="color: #808;">open</span><span style="color: black;">&#40;</span>ausname<span style="color: #000;">,</span><span style="color: #080;">&quot;w&quot;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;">as</span> aus:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;solid &quot;</span>+ausname+<span style="color: #080;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Geländeoberfläche</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> x <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_e<span style="color: #000;">,</span>xmax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      xu <span style="color: #000;">=</span> x - ul_e</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      <span style="color: #ff7700;">for</span> y <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_n<span style="color: #000;">,</span>ymax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        yu <span style="color: #000;">=</span> y - ul_n</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h1 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x<span style="color: #000;">,</span>y<span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h2 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x+kl<span style="color: #000;">,</span>y<span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h3 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x<span style="color: #000;">,</span>y+kl<span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h4 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x+kl<span style="color: #000;">,</span>y+kl<span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;facet normal 0 0 1<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;outer loop<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i %i %s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h1<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i %i %s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> h4<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i %i %s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h2<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;endloop<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;endfacet<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;facet normal 0 0 1<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;outer loop<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i %i %s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h1<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i %i %s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> h3<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i %i %s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> h4<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;endloop<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;endfacet<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #800; font-style: italic;"># Was für ein Aufwand für zwei popelige Dreiecke!</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Die Unterseite und die Seitenflächen wiederholen im Moment</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># die Unterteilung der Oberseite. Dadurch hat die STL-Datei fast</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># doppelt so viele Dreiecke wie eigentlich nur nötig wären.</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Durch geschickte Aufteilung könnte die Unterseite mit nur zwei</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Dreiecken realisiert werden, wobei die Seitenflächen mit rund der</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Hälfte der Dreiecke auskommen könnten. Bei großen Geländesteigungen</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># gibt es da aber ein paar Herausforderungen an den Algorithmus.</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Unterseite</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> x <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_e<span style="color: #000;">,</span>xmax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      xu <span style="color: #000;">=</span> x - ul_e</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      <span style="color: #ff7700;">for</span> y <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_n<span style="color: #000;">,</span>ymax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        yu <span style="color: #000;">=</span> y - ul_n</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;facet normal 0 0 -1<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;outer loop<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i %i %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i %i %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i %i %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;endloop<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;endfacet<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;facet normal 0 0 -1<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;outer loop<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i %i %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i %i %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i %i %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;endloop<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;endfacet<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Linke Wand</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> y <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_n<span style="color: #000;">,</span>ymax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        yu <span style="color: #000;">=</span> y-ul_n</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h1 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>ul_e<span style="color: #000;">,</span>y<span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h2 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>ul_e<span style="color: #000;">,</span>y+kl<span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;facet normal -1 0 0<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;outer loop<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex 0 %i %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>yu<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex 0 %i %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>yu+kl<span style="color: #000;">,</span> h2<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex 0 %i %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>yu<span style="color: #000;">,</span> h1<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;endloop<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;endfacet<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;facet normal -1 0 0<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;outer loop<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex 0 %i %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>yu<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex 0 %i %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>yu+kl<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex 0 %i %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>yu+kl<span style="color: #000;">,</span> h2<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;endloop<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;endfacet<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Rechte Wand</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> y <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_n<span style="color: #000;">,</span>ymax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        xu <span style="color: #000;">=</span> xmax-ul_e</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        yu <span style="color: #000;">=</span> y-ul_n</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h1 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>xmax<span style="color: #000;">,</span>y<span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h2 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>xmax<span style="color: #000;">,</span>y+kl<span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;facet normal 1 0 0<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;outer loop<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i %i %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i %i %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h1<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i %i %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> h2<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;endloop<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;endfacet<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;facet normal 1 0 0<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;outer loop<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i %i %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i %i %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> h2<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i %i %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;endloop<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;endfacet<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Vordere Wand</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> x <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_e<span style="color: #000;">,</span>xmax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h1 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x<span style="color: #000;">,</span>ul_n<span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h2 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x+kl<span style="color: #000;">,</span>ul_n<span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        xu <span style="color: #000;">=</span> x - ul_e</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;facet normal 0 -1 0<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;outer loop<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i 0 %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i 0 %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> h1<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i 0 %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> h2<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;endloop<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;endfacet<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;facet normal 0 -1 0<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;outer loop<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i 0 %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i 0 %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> h2<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i 0 %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> % <span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;endloop<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;endfacet<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Hintere Wand</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> x <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_e<span style="color: #000;">,</span>xmax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        xu <span style="color: #000;">=</span> x - ul_e</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        yu <span style="color: #000;">=</span> ymax - ul_n</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h1 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x<span style="color: #000;">,</span>ymax<span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h2 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x+kl<span style="color: #000;">,</span>ymax<span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;facet normal 0 1 0<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;outer loop<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i %i %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i %i %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h2<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i %i %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h1<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;endloop<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;endfacet<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;facet normal 0 1 0<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;outer loop<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i %i %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i %i %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> minh<span style="color: black;">&#41;</span> +</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;vertex %i %i %.2f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>%<span style="color: black;">&#40;</span>xu+kl<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h2<span style="color: black;">&#41;</span> +</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;endloop<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                  <span style="color: #080;">&quot;endfacet<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">### Binäre STL-Datei ###</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># https://de.wikipedia.org/wiki/STL-Schnittstelle</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;"># Die struct-Codes unten bedeuten:</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#   &quot;&lt;&quot;   niedrigwertiges Byte voran (&quot;little-endian&quot;)</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#   &quot;I&quot;   vorzeichenlose Ganzzahl (4 Byte)</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#   &quot;12f&quot; 12 Gleitkommawerte (je 4 Byte)</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #800; font-style: italic;">#   &quot;h&quot;   kurze Ganzzahl (2 Byte)</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">ausname <span style="color: #000;">=</span> name+<span style="color: #080;">&quot;.binär.stl&quot;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Schreibe STL-Datei für 3D-Druck (binär): {ausname}&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">with</span> <span style="color: #808;">open</span><span style="color: black;">&#40;</span>ausname<span style="color: #000;">,</span><span style="color: #080;">&quot;wb&quot;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;">as</span> aus:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># 80 Bytes ungenutzter Header</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span>b<span style="color: #080;">'<span style="color: #000099; font-weight: bold;">\0</span>'</span> * <span style="color: #008;">80</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Wie viele Dreiecke hat das Modell insgesamt?</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    nx <span style="color: #000;">=</span> <span style="color: black;">&#40;</span>xmax - ul_e<span style="color: black;">&#41;</span> // kl </div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    ny <span style="color: #000;">=</span> <span style="color: black;">&#40;</span>ymax - ul_n<span style="color: black;">&#41;</span> // kl </div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    ngesamt <span style="color: #000;">=</span> <span style="color: #008;">4</span> * nx*ny + <span style="color: #008;">4</span> * nx + <span style="color: #008;">4</span> * ny</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">struct</span>.<span style="color: black;">pack</span><span style="color: black;">&#40;</span><span style="color: #080;">'&lt;I'</span><span style="color: #000;">,</span> ngesamt<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Geländeoberfläche</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> x <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_e<span style="color: #000;">,</span>xmax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      xu <span style="color: #000;">=</span> x - ul_e</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      <span style="color: #ff7700;">for</span> y <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_n<span style="color: #000;">,</span>ymax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        yu <span style="color: #000;">=</span> y - ul_n</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h1 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x<span style="color: #000;">,</span>y<span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h2 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x+kl<span style="color: #000;">,</span>y<span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h3 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x<span style="color: #000;">,</span>y+kl<span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h4 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x+kl<span style="color: #000;">,</span>y+kl<span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">struct</span>.<span style="color: black;">pack</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;&lt;12fh&quot;</span><span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">0</span><span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> <span style="color: #008;">1</span><span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h1<span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu+kl<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> h4<span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu+kl<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h2<span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">0</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">struct</span>.<span style="color: black;">pack</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;&lt;12fh&quot;</span><span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">0</span><span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> <span style="color: #008;">1</span><span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h1<span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> h3<span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu+kl<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> h4<span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">0</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Unterseite</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> x <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_e<span style="color: #000;">,</span>xmax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      xu <span style="color: #000;">=</span> x - ul_e</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      <span style="color: #ff7700;">for</span> y <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_n<span style="color: #000;">,</span>ymax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        yu <span style="color: #000;">=</span> y - ul_n</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">struct</span>.<span style="color: black;">pack</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;&lt;12fh&quot;</span><span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">0</span><span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> -<span style="color: #008;">1</span><span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> minh<span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu+kl<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> minh<span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu+kl<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> minh<span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">0</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">struct</span>.<span style="color: black;">pack</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;&lt;12fh&quot;</span><span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">0</span><span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> -<span style="color: #008;">1</span><span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> minh<span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> minh<span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu+kl<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> minh<span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">0</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Linke Wand</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> y <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_n<span style="color: #000;">,</span>ymax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        yu <span style="color: #000;">=</span> y-ul_n</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h1 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>ul_e<span style="color: #000;">,</span>y<span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h2 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>ul_e<span style="color: #000;">,</span>y+kl<span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">struct</span>.<span style="color: black;">pack</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;&lt;12fh&quot;</span><span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              -<span style="color: #008;">1</span><span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> </div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">0</span><span style="color: #000;">,</span> yu<span style="color: #000;">,</span> minh<span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">0</span><span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> h2<span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">0</span><span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h1<span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">0</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">struct</span>.<span style="color: black;">pack</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;&lt;12fh&quot;</span><span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              -<span style="color: #008;">1</span><span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">0</span><span style="color: #000;">,</span> yu<span style="color: #000;">,</span> minh<span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">0</span><span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> minh<span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">0</span><span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> h2<span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">0</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Rechte Wand</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    xu <span style="color: #000;">=</span> xmax-ul_e</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> y <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_n<span style="color: #000;">,</span>ymax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        yu <span style="color: #000;">=</span> y-ul_n</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h1 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>xmax<span style="color: #000;">,</span>y<span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h2 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>xmax<span style="color: #000;">,</span>y+kl<span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">struct</span>.<span style="color: black;">pack</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;&lt;12fh&quot;</span><span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">1</span><span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> </div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> minh<span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h1<span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> h2<span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">0</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">struct</span>.<span style="color: black;">pack</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;&lt;12fh&quot;</span><span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">1</span><span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> minh<span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> h2<span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu<span style="color: #000;">,</span> yu+kl<span style="color: #000;">,</span> minh<span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">0</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Vordere Wand</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> x <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_e<span style="color: #000;">,</span>xmax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h1 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x<span style="color: #000;">,</span>ul_n<span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h2 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x+kl<span style="color: #000;">,</span>ul_n<span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        xu <span style="color: #000;">=</span> x - ul_e</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">struct</span>.<span style="color: black;">pack</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;&lt;12fh&quot;</span><span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">0</span><span style="color: #000;">,</span> -<span style="color: #008;">1</span><span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> </div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu<span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> minh<span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu<span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> h1<span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu+kl<span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> h2<span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">0</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">struct</span>.<span style="color: black;">pack</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;&lt;12fh&quot;</span><span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">0</span><span style="color: #000;">,</span> -<span style="color: #008;">1</span><span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu<span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> minh<span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu+kl<span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> h2<span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu+kl<span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> minh<span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">0</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #800; font-style: italic;"># Hintere Wand</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    yu <span style="color: #000;">=</span> ymax - ul_n</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #ff7700;">for</span> x <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span>ul_e<span style="color: #000;">,</span>xmax+<span style="color: #008;">1</span>-kl<span style="color: #000;">,</span>kl<span style="color: black;">&#41;</span>:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        xu <span style="color: #000;">=</span> x - ul_e</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h1 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x<span style="color: #000;">,</span>ymax<span style="color: black;">&#93;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        h2 <span style="color: #000;">=</span> D<span style="color: black;">&#91;</span>x+kl<span style="color: #000;">,</span>ymax<span style="color: black;">&#93;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">struct</span>.<span style="color: black;">pack</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;&lt;12fh&quot;</span><span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">0</span><span style="color: #000;">,</span> <span style="color: #008;">1</span><span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> </div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> minh<span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu+kl<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h2<span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h1<span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">0</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        aus.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">struct</span>.<span style="color: black;">pack</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;&lt;12fh&quot;</span><span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">0</span><span style="color: #000;">,</span> <span style="color: #008;">1</span><span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> minh<span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu+kl<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> minh<span style="color: #000;">,</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              xu+kl<span style="color: #000;">,</span> yu<span style="color: #000;">,</span> h2<span style="color: #000;">,</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">                              <span style="color: #008;">0</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">log<span style="color: black;">&#40;</span><span style="color: #080;">&quot;Programmlauf erfolgreich beendet.<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808;">print</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;Die Ausgabedateien können nun weiterverarbeitet werden.&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808;">input</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Programm schließen mit [Enter]&quot;</span><span style="color: black;">&#41;</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ff7700;">if</span> plt:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    plt.<span style="color: black;">close</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></div></li></ol></pre>]]></content:encoded>
<link>https://bauforum.wirklichewelt.de/index.php?id=11725</link>
<guid>https://bauforum.wirklichewelt.de/index.php?id=11725</guid>
<pubDate>Wed, 22 May 2019 08:44:12 +0000</pubDate>
<category>Software</category><dc:creator>Martin Vogel</dc:creator>
</item>
<item>
<title>Aktualisierte Version des Geländemodellierers (Antwort)</title>
<content:encoded><![CDATA[<p>Das Python-Programm zur Erstellung von 3D-CAD-Geländemodellen wurde nach der ersten Veröffentlichung noch um einige Funktionen erweitert. So kann man nun beispielsweise die Höhenauflösung, die standardmäßig 1 cm beträgt, auf einen gröberen Wert einstellen, um architektonische Höhenschichtenmodelle zu erstellen. </p>
<p><img src="https://bauforum.wirklichewelt.de/images/uploaded/201803291138575abcd051a5c39.png" alt="[image]"  loading="lazy" /><br />
<em>Der Kaisberg in Hagen-Vorhalle als 10-Meter-Quader-Modell</em><br />
<em>Datenquelle: <a href="https://www.opengeodata.nrw.de/produkte/geobasis/dgm/dgm1/" target="_blank" rel=\"noopener\">https://www.opengeodata.nrw.de/produkte/geobasis/dgm/dgm1/</a> ; Land NRW (2017) ; Datenlizenz Deutschland - Namensnennung - Version 2.0 (<a href="http://www.govdata.de/dl-de/by-2-0" target="_blank" rel=\"noopener\">http://www.govdata.de/dl-de/by-2-0</a>)</em></p>
<p>Die STL-Dateien für den 3D-Druck werden nun auch im Binärformat geschrieben, sind dadurch nur noch halb so groß und werden schneller verarbeitet. <br />
Die Unterseite des Modells ist nun nicht mehr fest auf Meeresspiegelhöhe eingestellt, sondern liegt (auf glatte 10 Meter gerundet) etwas unterhalb der geringsten Geländehöhe. Wussten Sie, dass es Punkte in NRW gibt, die fast 300 Meter unterhalb des Meerespiegels liegen? Werfen Sie mal einen Blick in den Tagebau Hambacher Forst, wo einmal der Ort Etzweiler lag: -298,99 m! <br />
Für die Weiterverarbeitung mit CAD-Programmen gibt es nun auch einen direkten DXF-Export. Leider sind in der DXF-Datei aus skurrilen Lizenzierungsgründen[1] keine 3D-Volumenkörper enthalten, sondern nur die umhüllende Fläche. Nach dem Laden sind daher noch zwei Bearbeitungsschritte nötig. Zuerst müssen mit dem AutoCAD/BricsCAD-Befehl REGION alle 3D-Flächen in Regionen umgewandelt werden. Sobald sich das CAD-Programm davon erholt hat, können Sie mit dem Befehl DMHEFTEN den von den Regionen umhüllten Volumenkörper erstellen lassen. Kochen Sie sich in der Zeit, die dazu benötigt wird, ruhig einen Tee. Oder zwei.<br />
In manchen ländlichen Gegenden ist es gar nicht so einfach, herauszufinden, in welchen ZIP-Dateien des NRW-Geodatenservers die benötigten Geländekacheln zu finden sind. Das Programm ermittelt nun anhand eines Kataloges die Namen der maximal noch herunterzuladenden Archivdateien. Da sich die abgedeckten Bereiche überschneiden, genügen manchmal auch weniger Downloads.</p>
<p>Download des Python-Programms: <a href="images/uploaded/201803271114205aba278cf2715.zip" target="_blank" rel=\"noopener\">Digitales Geländemodell.ZIP</a></p>
<p><br />
-------------<br />
Anmerkung [1]:</p>
<p>Siehe <a href="https://web.archive.org/web/20160307053540/http://www.crlf.de/Dokumente/Dxf-R13/DXF13ENT.HTM" target="_blank" rel=\"noopener\">https://web.archive.org/web/20160307053540/http://www.crlf.de/Dokumente/Dxf-R...</a> – hier nur ein kurzes Zitat aus dieser DXF-Dokumentation:</p>
<p>„3DSOLID, BODY und REGION<br />
Wie bereits erwähnt, benutzt AutoCAD Release 13 wie viele andere CAD-Systeme den 3D-Volumenmodellierer ACIS von Spatial Technology. Innerhalb von AutoCAD und den AutoCAD-Zeichnungsdateien werden deshalb ACIS-Objekte der Datentypen 3DSOLID, BODY und REGION gespeichert. Da eine DXF-Datei eine hundertprozentige Kopie einer AutoCAD-Zeichnungsdatei ist, findet man diese ACIS-Objekte auch in der DXF-Datei wieder.</p>
<p>Da allerdings ACIS und die ACIS-Datenstruktur Eigentum der Firma Spatial Technology sind, durfte Autodesk die Bedeutung der ACIS-Objekte nicht beschreiben. Autodesk musste die Daten aus Lizenzgründen sogar verschlüsselt in die DXF-Datei schreiben, zum Ärgernis aller DXF-Leser.</p>
<p>ACIS verwendet ein eigenes Datenaustauschformat, mit dem sich allerdings lediglich die ACIS-Modelle austauschen lassen. Dieses Datenformat trägt die Bezeichnung SAT, eine Beschreibung ist über den Web-Server von Spatial Technology erreichbar.</p>
<p>Die Objekte 3DSOLID, BODY und REGION bestehen jeweils aus einer Gruppe 70 mit dem Wert 1, gefolgt von der verschlüsselten SAT-Datei des ACIS-Objekts. Die SAT-Datei besteht aus Zeilen, jede Zeile wird in Stücke zu maximal 255 Zeichen zerlegt. Wie beim Objekt MTEXT bekommen die Stücke die Gruppennummer 3, nur das letzte Stück jeder Zeile bekommt die Gruppennummer 1. Beim Lesen der DXF-Datei müssen deshalb die Gruppen 3 und die folgende Gruppe 1 zu einer Zeile zusammengesetzt werden.</p>
<p>Der verwendeten Verschlüsselung ist deutlich anzumerken, dass sie ausschließlich aus dem Grund angewendet wurde, dass irgendeine Verschlüsselung stattfinden muss. Als EDV-Profi sollten Sie nicht länger als fünf Minuten brauchen, um diese Denksportaufgabe zu lösen.“</p>
]]></content:encoded>
<link>https://bauforum.wirklichewelt.de/index.php?id=11613</link>
<guid>https://bauforum.wirklichewelt.de/index.php?id=11613</guid>
<pubDate>Tue, 27 Mar 2018 11:24:41 +0000</pubDate>
<category>Software</category><dc:creator>Martin Vogel</dc:creator>
</item>
<item>
<title>Das Einhornkänguruh im Landschaftsschutzgebiet (Antwort)</title>
<content:encoded><![CDATA[<p>Durch Zufall entdeckt: Würde man das Landschaftsschutzgebiet hinter der BO fluten, hätte der neue See die Form eines Einhornkänguruhs <img src="https://bauforum.wirklichewelt.de/images/smilies/smile.png" alt=":-)" /></p>
<p><img src="https://bauforum.wirklichewelt.de/images/uploaded/Bild_2OFQ7O7S1.png" alt="[image]"  /></p>
<p>Das Geländemodell im Bild hat eine Auflösung von 10 Metern, daher sind die Dreiecke, aus denen die Oberfläche geformt ist, noch recht gut erkennbar.</p>
<p>… kommt zufällig gerade jemand günstig an 220 Meter Spundwand?</p>
]]></content:encoded>
<link>https://bauforum.wirklichewelt.de/index.php?id=11491</link>
<guid>https://bauforum.wirklichewelt.de/index.php?id=11491</guid>
<pubDate>Fri, 17 Mar 2017 12:33:02 +0000</pubDate>
<category>Software</category><dc:creator>Martin Vogel</dc:creator>
</item>
<item>
<title>Kostenloses Digitales Geländemodell jedes beliebigen Grundstücks in NRW</title>
<content:encoded><![CDATA[<p>Die Qualität der seit Januar 2017 frei verfügbaren Geländehöhendaten für NRW kann einem den Atem stocken lassen. Hier werfen wir einen Blick auf das Gelände der in einen ehemaligen Steinbruch an der Volme hineingebauten Stadthalle Hagen. Visualisiert wurden die aufbereiteten Geländedaten mit dem kostenlosen CAD-Programm FreeCAD. Die horizontale Auflösung beträgt einen Meter, die vertikale Auflösung der Höhendaten beträgt sogar nur einen Zentimeter:</p>
<p><img src="https://bauforum.wirklichewelt.de/images/uploaded/Bild_1I27BDJK1.png" alt="[image]"  loading="lazy" /><br />
<em>Datenquelle: <a href="https://www.opengeodata.nrw.de/produkte/geobasis/dgm/dgm1/" target="_blank" rel=\"noopener\">https://www.opengeodata.nrw.de/produkte/geobasis/dgm/dgm1/</a> ; Land NRW (2017) ; Datenlizenz Deutschland - Namensnennung - Version 2.0 (<a href="http://www.govdata.de/dl-de/by-2-0" target="_blank" rel=\"noopener\">http://www.govdata.de/dl-de/by-2-0</a>)</em></p>
<p>Auf den Servern des Opengeodata-Projektes gibt es sogar <em>noch</em> höher aufgelöste Daten, diese sind aber etwas unhandlicher zu verarbeiten, da sie nicht in einem festen Raster, sondern als ungeordnete Punktewolke mit etwa 4 Punkten pro Quadratmeter vorliegen.</p>
<p>Es ist nun für jedermann ganz einfach, sich ein 3D-Modell seines Grundstücks oder eines beliebigen anderen Geländeausschnittes selber zu erstellen. Sämtliche benötigte Software dazu ist kostenlos verfügbar. Bis zur 3D-druckfähigen Geländemodelldatei sind es nur wenige Schritte:</p>
<p>1. Von der Webseite <a href="https://www.opengeodata.nrw.de/produkte/geobasis/dgm/dgm1/" target="_blank" rel=\"noopener\">https://www.opengeodata.nrw.de/produkte/geobasis/dgm/dgm1/</a> die Dateien für die gewünschten Ortschaften herunterladen.<br />
Die ZIP-Dateien sind im Schnitt ein paar hundert Megabyte groß. </p>
<p>2. Diese ZIP-Dateien in einen beliebigen Ordner entpacken.<br />
Es werden jeweils dutzende XYZ-Dateien angelegt, jede ist 124 MB groß und enthält 4 Millionen Höhenwerte einer 2000x2000 m² großen Geländekachel.</p>
<p>Wer in die XYZ-Dateien hineinschaut, stellt fest, dass die Koordinaten in einem für Nichtvermesser recht ungewöhnlichen Format vorliegen. Dieses Datenformat mit dem etwas sperrigen Namen „EPSG:25832 ETRS89/UTM 32.Zone“ lässt sich aber in gewöhnliche GPS-Koordinaten mit Längen- und Breitengrad umrechnen. Ebenso können bekannte Geokoordinaten in das EPSG-Format konvertiert werden.</p>
<p>3. Zur Umrechnung verwenden wir ein selbstgeschriebenes Python-3-Programm, welches das Python-Modul &quot;utm&quot; von Tobias Bieniek verwendet. Laden Sie die folgende ZIP-Datei herunter, entpacken Sie sie und starten Sie das Programm &quot;Gelaendemodell.py&quot;. </p>
<p>[Update: Das Programm wurde aktualisiert, siehe <a href="index.php?id=11613" class="internal">Antwort auf diesen Beitrag</a>!]</p>
<p>Falls Sie Python 3 noch nicht installiert haben, finden Sie es auf <a href="https://www.python.org/downloads/" target="_blank" rel=\"noopener\">https://www.python.org/downloads/</a> – im Moment ist Version 3.6.0 aktuell.</p>
<p>4. Das Programm führt Sie in einem Dialog schrittweise zum gewünschten Ergebnis. Sie benötigen lediglich noch die Koordinaten von zwei Punkten, mit denen Sie ein Rechteck definieren, für welches unser Python-Programm das Geländemodell erzeugen soll. Diese Koordinaten können Sie direkt aus Google Maps oder einem anderen Kartendienst kopieren oder abschreiben. Für die Stadthalle Hagen oben waren das zum Beispiel die Punkte „<a href="https://www.google.de/search?q=51.350383%2C+7.482606" target="_blank" rel=\"noopener\">51.350383, 7.482606</a>“ und  „<a href="https://www.google.de/search?q=51.356366%2C+7.491436" target="_blank" rel=\"noopener\">51.356366, 7.491436</a>“. Welche Eckpunkte des Rechtecks Sie aus der Karte abgreifen, ist egal, solange diese nur diagonal gegenüberliegen und sich innerhalb von Nordrheinwestfalen befinden.</p>
<p>5. Nach Angabe der gewünschten Auflösung legt das Programm drei Dateien neu an: eine XYZ-Datei enthält einfach nur eine Liste aller gefundenen Höhendaten des ausgewählten Bereichs, eine SCR-Datei enthält Befehle für die CAD-Programme AutoCAD und BricsCAD zur Erstellung eines Volumenkörpers, über den Sie sehr simpel Massenberechnungen zu Aushub und Auftrag anstellen können und schließlich eine Stereolithographiedatei im STL-Format, aus der Sie mit einem 3D-Drucker ein greifbares Modell erschaffen können. Die Schrittweite für die Auflösung sollte anfangs auf einen recht hohen Wert eingestellt werden, um die erzeugten Dateien klein und damit schnell bearbeitbar zu halten. Ein 10-Meter-Raster oder sogar ein 100-Meter-Raster zu verwenden, ist meistens gar keine schlechte Idee. Mehr als vielleicht 1000 Punkte pro Grundstück werden oft gar nicht benötigt.</p>
<p>Zum Ansehen und Weiterbearbeiten der STL-Datei empfiehlt sich das kostenlose Programm <a href="https://www.freecadweb.org/wiki/Download" target="_blank" rel=\"noopener\">FreeCAD</a>, in dessen erstaunlich mächtigen Funktionsumfang man sich allerdings erst einarbeiten muss. Kurzanleitung: STL-Datei öffnen, Inhalt mit dem Lupen-Icon bildfüllend darstellen, Verschieben der Ansicht mit der mittleren Maustaste, Drehen mit zusätzlichem Drücken der linken Maustaste (<a href="https://www.freecadweb.org/wiki/Mouse_Model/de" target="_blank" rel=\"noopener\">Bedienungsanleitung</a>).</p>
<p>Viel Spaß damit!<img src="http://vg02.met.vgwort.de/na/42e65dfcac424e91835da4a940290d02" alt="[image]"  loading="lazy" /></p>
]]></content:encoded>
<link>https://bauforum.wirklichewelt.de/index.php?id=11490</link>
<guid>https://bauforum.wirklichewelt.de/index.php?id=11490</guid>
<pubDate>Thu, 16 Mar 2017 14:14:14 +0000</pubDate>
<category>Software</category><dc:creator>Martin Vogel</dc:creator>
</item>
</channel>
</rss>
