<?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 - Wendeltreppenprogramm für glatte Unterseite und beidseitigen Handlauf</title>
<link>https://bauforum.wirklichewelt.de/</link>
<description>Das Bauforum</description>
<language>de</language>
<item>
<title>Wendeltreppenprogramm für glatte Unterseite und beidseitigen Handlauf (Antwort)</title>
<content:encoded><![CDATA[<p>Weil es viel einfacher ist, überflüssige Elemente zu löschen, als fehlende Elemente hinzuzufügen, erzeugt das in den letzten beiden Foreneinträgen vorgestellte Python-Wendeltreppenprogramm für AutoCAD und BricsCAD jetzt auch gleich noch zwei Handläufe. </p>
<p>Eine Wahlmöglichkeit besteht nicht. Die Geländer sind 100 cm hoch, der Handlaufdurchmesser beträgt 7 cm, pro Stufe werden auf der Innenseite ein und auf der Außenseite zwei Geländerstäbe mit 2,5 cm Durchmesser angeordnet. Wer das variabel haben möchte, darf das Pythonprogramm gerne an seine Bedürfnisse anpassen.</p>
<p>Download: <a href="images/uploaded/201806231102345b2e28ca97791.zip" target="_blank">ZIP-Datei</a></p>
<p><img src="https://bauforum.wirklichewelt.de/images/uploaded/201806221109015b2cd8cd6b723.jpg" alt="[image]"  /><br />
<em>So sieht eine mit dem Programm erzeugte und mit Materialien (Marmor, Messing) versehene Wendeltreppe aus.</em></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;"><span style="color: #800; font-style: italic;">#</span></div></li><li 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;"># Dieses Programm benötigt mindestens Python 3.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;"><span style="color: #ff7700;">from</span> <span style="color: #dc143c;">math</span> <span style="color: #ff7700;">import</span> pi<span style="color: #000;">,</span> degrees<span style="color: #000;">,</span> radians<span style="color: #000;">,</span> sin<span style="color: #000;">,</span> cos</div></li><li 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;">os</span>.<span style="color: black;">path</span></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;&quot;&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;">Dieses Programm erzeugt eine AutoCAD/BricsCAD-Scriptdatei zur Konstruktion</span></div></li><li 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;">einer Wendeltreppe in einer leeren Zeichnungsdatei.</span></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;">Autor:  Martin Vogel, 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: #080;">Lizenz: Namensnennung - Weitergabe unter gleichen Bedingungen 3.0 Deutschland</span></div></li><li 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;">        (CC BY-SA 3.0 DE) https://creativecommons.org/licenses/by-sa/3.0/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: #080;">Info:   https://bauforum.wirklichewelt.de/index.php?id=11644</span></div></li><li 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;"># Funktion zur Eingabe einer Gleitkommazahl (mit optionalem Vorgabewert):</span></div></li><li 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> fi<span style="color: black;">&#40;</span>s<span style="color: #000;">,</span> vorgabe<span style="color: #000;">=</span><span style="color: #808;">None</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;">while</span> <span style="color: #808;">True</span>:</div></li><li 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;{s}{f' ({vorgabe})' if vorgabe else ''}: &quot;</span><span style="color: #000;">,</span> end<span style="color: #000;">=</span><span style="color: #080;">&quot;&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;">        inp <span style="color: #000;">=</span> <span style="color: #808;">input</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">replace</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;,&quot;</span><span style="color: #000;">,</span> <span style="color: #080;">&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;">        <span style="color: #ff7700;">if</span> <span style="color: #ff7700;">not</span> inp:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            inp <span style="color: #000;">=</span> vorgabe</div></li><li 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;">            <span style="color: #ff7700;">return</span> <span style="color: #808;">float</span><span style="color: black;">&#40;</span>inp<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;">            <span style="color: #808;">print</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;Fehler: Eingabe wurde nicht als Zahl erkannt.&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;"># Funktion zur Koordinatendrehung im Gegenuhrzeigersinn (GUZ)</span></div></li><li 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> rot<span style="color: black;">&#40;</span>x<span style="color: #000;">,</span> y<span style="color: #000;">,</span> grad<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;">    w <span style="color: #000;">=</span> radians<span style="color: black;">&#40;</span>grad<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;">return</span> x * cos<span style="color: black;">&#40;</span>w<span style="color: black;">&#41;</span> - y * sin<span style="color: black;">&#40;</span>w<span style="color: black;">&#41;</span><span style="color: #000;">,</span> x * sin<span style="color: black;">&#40;</span>w<span style="color: black;">&#41;</span> + y * cos<span style="color: black;">&#40;</span>w<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;"># Funktion zum Finden eines noch nicht benutzten Dateinamens</span></div></li><li 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> freiername<span style="color: black;">&#40;</span>maske<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;"># Die Maske ist ein Musterdateiname, der um eine fortlaufende Zahl</span></div></li><li 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;"># in einer Klammer vor der Dateinamenerweiterung ergänzt 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;">    <span style="color: #800; font-style: italic;"># Wo ist der letzte Punkt in der Maske?</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    p <span style="color: #000;">=</span> <span style="color: #808;">len</span><span style="color: black;">&#40;</span>maske<span style="color: black;">&#41;</span> - maske<span style="color: black;">&#91;</span>::-<span style="color: #008;">1</span><span style="color: black;">&#93;</span>.<span style="color: black;">find</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;.&quot;</span><span style="color: black;">&#41;</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;">    <span style="color: #800; font-style: italic;"># Eventuell wird der Dateiname in der Maske noch gar nicht 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;">    name <span style="color: #000;">=</span> maske</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    i <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;"># Ansonsten erhöhen wir den Zähler i, bis ein freier Name gefunden wurde.</span></div></li><li 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;">while</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>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;">        i +<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;">        <span style="color: #800; font-style: italic;"># aus &quot;Wendeltreppe.scr&quot; wird &quot;Wendeltreppe(2).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;">        name <span style="color: #000;">=</span> maske<span style="color: black;">&#91;</span>:p<span style="color: black;">&#93;</span> + f<span style="color: #080;">&quot;({i})&quot;</span> + maske<span style="color: black;">&#91;</span>p:<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;">return</span> name</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;"># Für die Geländerabmessungen ist keine Interaktion vorgesehen.</span></div></li><li 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änderhöhe</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">hg <span style="color: #000;">=</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: #800; font-style: italic;"># Geländerhandlaufdurchmesser</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">dg <span style="color: #000;">=</span> <span style="color: #008;">7</span></div></li><li 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änderstabdurchmesser</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">ds <span style="color: #000;">=</span> <span style="color: #008;">2.5</span></div></li><li 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 Abschlusskugeldurchmesser ist etwas größer als der Handlaufdurchmesser.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">dk <span style="color: #000;">=</span> <span style="color: #008;">1.5</span> * dg</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;"># Abfrage der Treppenparameter und Berechnung der abhängigen 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;">&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;"># Außendurchmesser</span></div></li><li 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;Der Außendurchmesser sollte nicht kleiner als 120 cm sein.&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;">da <span style="color: #000;">=</span> fi<span style="color: black;">&#40;</span><span style="color: #080;">&quot;Außendurchmesser der Treppe&quot;</span><span style="color: #000;">,</span> <span style="color: #008;">250</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 Lauflinie ist die Linie, auf der die Treppe am bequemsten zu gehen ist.</span></div></li><li 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 legen sie 30 cm vom inneren Rand des äußeren Handlaufs aus nach innen 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: #dc143c;">dl</span> <span style="color: #000;">=</span> da - <span style="color: #008;">2</span> * dg - <span style="color: #008;">60</span></div></li><li 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>f<span style="color: #080;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Der Durchmesser der Lauflinie beträgt {dl} cm.&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;"># Der Umfang der Lauflinie ist die Strecke, die man bei einer vollen</span></div></li><li 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;"># Wendelumdrehung horizontal zurücklegen würde</span></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 <span style="color: #000;">=</span> pi * <span style="color: #dc143c;">dl</span></div></li><li 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;Ihr Umfang beträgt {ul:.1f} cm.&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;"># Innendurchmesser</span></div></li><li 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;"># Wenn der Innendurchmesser null ist, kann die Unterseite nicht ausgeformt</span></div></li><li 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;"># 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;"><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>Der Innendurchmesser muss größer als null sein.&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;">di <span style="color: #000;">=</span> fi<span style="color: black;">&#40;</span><span style="color: #080;">&quot;Innendurchmesser der Treppe&quot;</span><span style="color: #000;">,</span> <span style="color: #008;">50</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 hoch soll die Treppe sein? Gemessen wird von der Unterkante 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;"># untersten Stufe bis zur Oberkante der obersten Stufe.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">ht <span style="color: #000;">=</span> fi<span style="color: black;">&#40;</span><span style="color: #080;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Höhe der Treppe&quot;</span><span style="color: #000;">,</span> <span style="color: #008;">260</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 Stufen werden benötigt (Idealhöhe 17 cm)?</span></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: #808;">round</span><span style="color: black;">&#40;</span>ht / <span style="color: #008;">17</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>f<span style="color: #080;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Die Treppe erhält {n} Stufen.&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;"># Welche Stufenhöhe ergibt sich aus dieser Anzahl?</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">hs <span style="color: #000;">=</span> ht / 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: #808;">print</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Die Stufenhöhe beträgt {hs:.1f} cm.&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 rechnerische Auftrittslänge (Stufentiefe) ergibt sich aus 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;"># Schrittmaßregel.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">ra <span style="color: #000;">=</span> <span style="color: #008;">63</span> - <span style="color: #008;">2</span> * hs</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 rechnerische Drehwinkel der Treppe hat vermutlich ein recht krummes Maß.</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">rw <span style="color: #000;">=</span> <span style="color: #008;">360</span> * n * ra / ul</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;"># Wir runden ihn auf ein Vielfaches von 15°.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">rwg <span style="color: #000;">=</span> <span style="color: #808;">int</span><span style="color: black;">&#40;</span><span style="color: #808;">round</span><span style="color: black;">&#40;</span>rw / <span style="color: #008;">15</span><span style="color: black;">&#41;</span> * <span style="color: #008;">15</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;"># Vermutlich sind ohnehin nur Vielfache von 90° gewünscht.</span></div></li><li 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 halten uns da raus.</span></div></li><li 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>Links herum ansteigende Treppen besitzen einen positiven Drehwinkel,&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;<span style="color: #000099; font-weight: bold;">\n</span>rechts herum ansteigende Treppen einen negativen.&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;">wt <span style="color: #000;">=</span> fi<span style="color: black;">&#40;</span><span style="color: #080;">&quot;Gesamtdrehwinkel der Treppe&quot;</span><span style="color: #000;">,</span> rwg<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;"># Daraus ergibt sich der Drehwinkel einer einzelnen Stufe.</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">ws <span style="color: #000;">=</span> wt/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;">&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 Geometriewerte sind eingesammelt,</span></div></li><li 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 Scriptdatei kann geschrieben 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;">wtn <span style="color: #000;">=</span> freiername<span style="color: black;">&#40;</span><span style="color: #080;">&quot;Wendeltreppe.scr&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;">with</span> <span style="color: #808;">open</span><span style="color: black;">&#40;</span>wtn<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> scr:</div></li><li 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;"># Koordinateneingabe geht vor Objektfang</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;OSnapCoord 1<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: #800; font-style: italic;"># Einheit Zentimeter</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;_InsUnits 5<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: #800; font-style: italic;"># Definierende Geometrie automatisch löschen (z. B. Handlauf-Spirale)</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;DelObj 2<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: #800; font-style: italic;"># Seitenansicht, um sicherzustellen, dass beim Ausformen 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;"># Treppenunterseite alle Stufenrückseiten angeklickt 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;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;-APunkt 0,-1,0<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;"># Dummykörper als Zoomziel</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Zylinder 0,0,0 {da/2} {ht+hg+hs}<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;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;Zoom Objekt L <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;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;_Erase L <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;"># Die Unterseite der Wendeltreppe wird als Ausformungskörper entlang</span></div></li><li 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 Rückseiten der (späteren) Stufenprofile angelegt.</span></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;"># In der Liste Lp merken wir uns einen Punkt pro Querschnitt, den</span></div></li><li 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 beim Ausformen anklicken können.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    Lp <span style="color: #000;">=</span> <span style="color: black;">&#91;</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;">&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;"># Für alle Stufen ab der zweiten:</span></div></li><li 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> i <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span><span style="color: #008;">1</span><span style="color: #000;">,</span>n+<span style="color: #008;">1</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;"># Die Hinterseite jeder Stufe ist ein Rechteck.</span></div></li><li 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 auf der x-y-Ebene:</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        xi<span style="color: #000;">,</span> yi <span style="color: #000;">=</span> rot<span style="color: black;">&#40;</span>di/<span style="color: #008;">2</span><span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> i*ws<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;">        xa<span style="color: #000;">,</span> ya <span style="color: #000;">=</span> rot<span style="color: black;">&#40;</span>da/<span style="color: #008;">2</span><span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> i*ws<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;"># Vier Punkte im Raum:</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        p0 <span style="color: #000;">=</span> f<span style="color: #080;">&quot;{xi},{yi},{(i-1)*hs}&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;">        p1 <span style="color: #000;">=</span> f<span style="color: #080;">&quot;{xa},{ya},{(i-1)*hs}&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;">        p2 <span style="color: #000;">=</span> f<span style="color: #080;">&quot;{xa},{ya},{i*hs}&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;">        p3 <span style="color: #000;">=</span> f<span style="color: #080;">&quot;{xi},{yi},{i*hs}&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;"># CAD-Befehl zum Zeichnen der geschlossenen 3D-Polylinie:</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;3DPoly {p0} {p1} {p2} {p3} 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: #800; font-style: italic;"># Wir merken uns einen Anklickpunkt ganz außen auf halber Stufenhöhe.</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        Lp.<span style="color: black;">append</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;{xa},{ya},{(i-0.5)*hs}&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;"># Ausformen der &quot;Rampe&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;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;_Loft {' '.join(Lp)}<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;">&#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;"># Drehrichtung der Handläufe</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    twist <span style="color: #000;">=</span> <span style="color: #080;">&quot;GUZ&quot;</span> <span style="color: #ff7700;">if</span> wt<span style="color: #000;">&gt;</span><span style="color: #008;">0</span> <span style="color: #ff7700;">else</span> <span style="color: #080;">&quot;UZ&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;"># Handlauf außen:</span></div></li><li 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;"># Pfad</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Spirale 0,0,{hg+hs} {da/2-dg/2}  &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;">              f<span style="color: #080;">&quot;_T {abs(wt)/360} _W {twist} A 0,0,{hg+hs+ht}<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;"># Profil</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Kreis 0,0,0 {dg/2}<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;"># Extrudiere Profil entlang Pfad</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;_Sweep l  {da/2-dg/2},0,{hg+hs}<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;"># Handlauf innen:</span></div></li><li 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;"># Pfad</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Spirale 0,0,{hg+hs} {di/2+dg/2}  &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;_T {abs(wt)/360} _W {twist} A 0,0,{hg+hs+ht}<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: #800; font-style: italic;"># Profil</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Kreis 0,0,0 {dg/2}<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: #800; font-style: italic;"># Extrudiere Profil entlang Pfad</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;_Sweep l  {di/2+dg/2},0,{hg+hs}<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;"># Geländerstäbe außen:</span></div></li><li 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 alle Stufen je zwei Stäbe in den Viertelspunkten</span></div></li><li 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> i <span style="color: #ff7700;">in</span> <span style="color: #808;">range</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;">        x<span style="color: #000;">,</span>y <span style="color: #000;">=</span> rot<span style="color: black;">&#40;</span>da/<span style="color: #008;">2</span>-dg/<span style="color: #008;">2</span><span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> <span style="color: black;">&#40;</span>i+<span style="color: #008;">1</span>/<span style="color: #008;">4</span><span style="color: black;">&#41;</span>*ws<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;">        scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Zylinder {x},{y},{(i+1)*hs} {ds/2} {hg+hs/4}<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;">        x<span style="color: #000;">,</span>y <span style="color: #000;">=</span> rot<span style="color: black;">&#40;</span>da/<span style="color: #008;">2</span>-dg/<span style="color: #008;">2</span><span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> <span style="color: black;">&#40;</span>i+<span style="color: #008;">3</span>/<span style="color: #008;">4</span><span style="color: black;">&#41;</span>*ws<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;">        scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Zylinder {x},{y},{(i+1)*hs} {ds/2} {hg+hs*3/4}<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;"># Geländerstäbe innen:</span></div></li><li 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 alle Stufen je ein Stab in Stufenmitte</span></div></li><li 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> i <span style="color: #ff7700;">in</span> <span style="color: #808;">range</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;">        x<span style="color: #000;">,</span>y <span style="color: #000;">=</span> rot<span style="color: black;">&#40;</span>di/<span style="color: #008;">2</span>+dg/<span style="color: #008;">2</span><span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> <span style="color: black;">&#40;</span>i+<span style="color: #008;">0.5</span><span style="color: black;">&#41;</span>*ws<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;">        scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Zylinder {x},{y},{(i+1)*hs} {ds/2} {hg+hs/2}<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;"># Noch etwas Deko: Kugeln als Handlaufabschluss</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Kugel {(di+dg)/2},0,{hg+hs} {dk/2}<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;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Kugel {(da-dg)/2},0,{hg+hs} {dk/2}<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;">    x<span style="color: #000;">,</span> y <span style="color: #000;">=</span> rot<span style="color: black;">&#40;</span><span style="color: black;">&#40;</span>di+dg<span style="color: black;">&#41;</span>/<span style="color: #008;">2</span><span style="color: #000;">,</span><span style="color: #008;">0</span><span style="color: #000;">,</span>wt<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;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Kugel {x},{y},{hg+ht+hs} {dk/2}<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;">    x<span style="color: #000;">,</span> y <span style="color: #000;">=</span> rot<span style="color: black;">&#40;</span><span style="color: black;">&#40;</span>da-dg<span style="color: black;">&#41;</span>/<span style="color: #008;">2</span><span style="color: #000;">,</span><span style="color: #008;">0</span><span style="color: #000;">,</span>wt<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;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Kugel {x},{y},{hg+ht+hs} {dk/2}<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;"># Nun werden die einzelnen Stufen auf die „Rampe“ gesetzt.</span></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;"># Für alle Stufen:</span></div></li><li 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> i <span style="color: #ff7700;">in</span> <span style="color: #808;">range</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;">        <span style="color: #800; font-style: italic;"># Die Vorderseite jeder Stufe ist ein Rechteck.</span></div></li><li 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 auf der x-y-Ebene:</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        xi<span style="color: #000;">,</span>yi <span style="color: #000;">=</span> rot<span style="color: black;">&#40;</span>di/<span style="color: #008;">2</span><span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> i*ws<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;">        xa<span style="color: #000;">,</span>ya <span style="color: #000;">=</span> rot<span style="color: black;">&#40;</span>da/<span style="color: #008;">2</span><span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> i*ws<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;"># Vier Punkte im Raum:</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        p0 <span style="color: #000;">=</span> f<span style="color: #080;">&quot;{xi},{yi},{i*hs}&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;">        p1 <span style="color: #000;">=</span> f<span style="color: #080;">&quot;{xa},{ya},{i*hs}&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;">        p2 <span style="color: #000;">=</span> f<span style="color: #080;">&quot;{xa},{ya},{(i+1)*hs}&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;">        p3 <span style="color: #000;">=</span> f<span style="color: #080;">&quot;{xi},{yi},{(i+1)*hs}&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;"># CAD-Befehl zum Zeichnen der geschlossenen 3D-Polylinie:      </span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;3DPoly {p0} {p1} {p2} {p3} 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: #800; font-style: italic;"># Durch Rotieren der Stufenvorderseite um die Mittelachse entsteht die</span></div></li><li 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;"># Stufe als Volumenkörper. Der Drehwinkel ist so gewählt, dass 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;"># Stufen sich jeweils an einer Kante berühren. Diese liegt außerdem</span></div></li><li 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;"># genau auf der oberen Fläche der Rampe.</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Rotation l  0,0,0 0,0,1 {ws}<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;"># Anzeige anpassen, perspektivische Ansicht von vorne rechts:</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;-APunkt 1,-1,1<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;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;Perspective 1<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;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Zoom Grenzen<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;"># Automatisches Löschen erzeugender Geometrie wieder ausschalten.</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;DelObj 0<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: #808;">print</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;&quot;&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;">Fertig. </span></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;">Starten Sie die erzeugte Scriptdatei &quot;{wtn}&quot; im CAD-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;"><span style="color: #080;">in einer leeren Zeichnung (Einheit Zentimeter) mit dem Befehl SCRIPT!</span></div></li><li 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;&quot;&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;">input</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;[Enter]&quot;</span><span style="color: black;">&#41;</span></div></li></ol></pre>]]></content:encoded>
<link>https://bauforum.wirklichewelt.de/index.php?id=11647</link>
<guid>https://bauforum.wirklichewelt.de/index.php?id=11647</guid>
<pubDate>Fri, 22 Jun 2018 11:47:22 +0000</pubDate>
<category>Software</category><dc:creator>Martin Vogel</dc:creator>
</item>
<item>
<title>Wendeltreppe mit glatter Unterseite (Antwort)</title>
<content:encoded><![CDATA[<p>Das Wendeltreppenprogramm hat nun noch eine kleine Erweiterung bekommen. Die Unterseite der Treppe wird jetzt als Ausformungskörper an den Stufenrückseiten entlanggeführt. Dadurch ergibt sich eine sehr schöne glatte Treppenunterseite.</p>
<p>Die neue Version des Pythonprogramms verzichtet darauf, die Stufen der Wendeltreppe als eigenen Block zu definieren. Das sorgte für die Unbequemlichkeit, das Script nicht erneut in derselben Zeichnungsdatei laufen lassen zu können.</p>
<p><img src="https://bauforum.wirklichewelt.de/images/uploaded/201806211717515b2bddbf29de6.png" alt="[image]"  /></p>
<p>Beim Konstruieren von Wendeltreppen mit mehreren Windungen kam es beim Testen des Programms gelegentlich vor, dass der Ausformen-Befehl ein paar Stufen nicht mitbekam und das CAD-Programm eine originelle Betonschleife konstruierte. In diesem Fall hilft es, mit der Maus die Ansicht so zu drehen und zu zoomen, dass alle Stufen gut erkennbar sind und sich nicht gegenseitig verdecken, die missratene Wendeltreppe zu löschen und die Ausführung des Scriptes mittels SCRIPT zu wiederholen.</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;"><span style="color: #800; font-style: italic;"># benötigt mindestens Python 3.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;"><span style="color: #ff7700;">from</span> <span style="color: #dc143c;">math</span> <span style="color: #ff7700;">import</span> pi<span style="color: #000;">,</span> degrees<span style="color: #000;">,</span> radians<span style="color: #000;">,</span> sin<span style="color: #000;">,</span> cos</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;&quot;&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;">Dieses Programm erzeugt eine AutoCAD/BricsCAD-Scriptdatei für eine</span></div></li><li 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;">Wendeltreppe.</span></div></li><li 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;&quot;&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> fi<span style="color: black;">&#40;</span>s<span style="color: #000;">,</span> vorgabe<span style="color: #000;">=</span><span style="color: #808;">None</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: #080;">&quot;float input&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;">while</span> <span style="color: #808;">True</span>:</div></li><li 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>f<span style="color: #080;">&quot;{s}{f' ({vorgabe})' if vorgabe else ''}: &quot;</span><span style="color: #000;">,</span>end<span style="color: #000;">=</span><span style="color: #080;">&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;">        inp <span style="color: #000;">=</span> <span style="color: #808;">input</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">replace</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;,&quot;</span><span style="color: #000;">,</span><span style="color: #080;">&quot;.&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> <span style="color: #ff7700;">not</span> inp:</div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            inp <span style="color: #000;">=</span> vorgabe</div></li><li 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;">return</span> <span style="color: #808;">float</span><span style="color: black;">&#40;</span>inp<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;Fehler: Eingabe wurde nicht als Zahl 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;">&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;Der Außendurchmesser sollte nicht kleiner als 120 cm sein.&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;">da <span style="color: #000;">=</span> fi<span style="color: black;">&#40;</span><span style="color: #080;">&quot;Außendurchmesser der Treppe&quot;</span><span style="color: #000;">,</span> <span style="color: #008;">250</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;">du <span style="color: #000;">=</span> da - <span style="color: #008;">60</span></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 <span style="color: #000;">=</span> pi * du</div></li><li 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>Der Durchmesser der Lauflinie beträgt {du} cm.&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>f<span style="color: #080;">&quot;Ihr Umfang beträgt {ul:.1f} cm.&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: #808;">print</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Der Innendurchmesser muss größer als null sein.&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;">di <span style="color: #000;">=</span> fi<span style="color: black;">&#40;</span><span style="color: #080;">&quot;Innendurchmesser der Treppe&quot;</span><span style="color: #000;">,</span> <span style="color: #008;">50</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;">ht <span style="color: #000;">=</span> fi<span style="color: black;">&#40;</span><span style="color: #080;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Höhe der Treppe&quot;</span><span style="color: #000;">,</span> <span style="color: #008;">260</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: #808;">round</span><span style="color: black;">&#40;</span>ht/<span style="color: #008;">17</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;">hs <span style="color: #000;">=</span> ht/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: #808;">print</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Die Treppe erhält {n} Stufen.&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: #808;">print</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Die Stufenhöhe beträgt {hs:.1f} cm.&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;"># rechnerischer Auftritt aus Schrittmaßregel</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">ra <span style="color: #000;">=</span> <span style="color: #008;">63</span> - <span style="color: #008;">2</span> * hs</div></li><li 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;"># rechnerischer Winkel der Treppe</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">rw <span style="color: #000;">=</span> <span style="color: #008;">360</span> * n * ra / ul</div></li><li 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;"># gerundet auf 15°</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">rwg <span style="color: #000;">=</span> <span style="color: #808;">int</span><span style="color: black;">&#40;</span><span style="color: #808;">round</span><span style="color: black;">&#40;</span>rw/<span style="color: #008;">15</span><span style="color: black;">&#41;</span>*<span style="color: #008;">15</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>Links herum ansteigende Treppen besitzen einen positiven Drehwinkel,&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;<span style="color: #000099; font-weight: bold;">\n</span>rechts herum ansteigende Treppen einen negativen.&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;">wt <span style="color: #000;">=</span> fi<span style="color: black;">&#40;</span><span style="color: #080;">&quot;Gesamtdrehwinkel der Treppe&quot;</span><span style="color: #000;">,</span>rwg<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;"># Winkel einer Stufe</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">ws <span style="color: #000;">=</span> wt/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;">&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;"># Koordinatendrehung</span></div></li><li 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> rot<span style="color: black;">&#40;</span>x<span style="color: #000;">,</span> y<span style="color: #000;">,</span> grad<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;">    w <span style="color: #000;">=</span> radians<span style="color: black;">&#40;</span>grad<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;">return</span> x * cos<span style="color: black;">&#40;</span>-w<span style="color: black;">&#41;</span> - y * sin<span style="color: black;">&#40;</span>w<span style="color: black;">&#41;</span><span style="color: #000;">,</span> x * sin<span style="color: black;">&#40;</span>w<span style="color: black;">&#41;</span> + y * cos<span style="color: black;">&#40;</span>-w<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><span style="color: #080;">&quot;WENDELTREPPE.SCR&quot;</span><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> scr:</div></li><li 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;"># Koordinateneingabe geht vor Objektfang</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;OSnapCoord 1<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: #800; font-style: italic;"># Einheit Zentimeter</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;_InsUnits 5<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;"># Die Unterseite der Wendeltreppe wird als Ausformungskörper entlang</span></div></li><li 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 Rückseiten der (späteren) Stufenprofile angelegt.</span></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;"># In der Liste Lp merken wir uns einen Punkt pro Querschnitt, den</span></div></li><li 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;"># wir beim Ausformen anklicken 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;">    Lp <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;">&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 alle Stufen ab der zweiten:</span></div></li><li 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> i <span style="color: #ff7700;">in</span> <span style="color: #808;">range</span><span style="color: black;">&#40;</span><span style="color: #008;">1</span><span style="color: #000;">,</span>n+<span style="color: #008;">1</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;"># Hinterseite der Stufe</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        xi<span style="color: #000;">,</span>yi <span style="color: #000;">=</span> rot<span style="color: black;">&#40;</span>di/<span style="color: #008;">2</span><span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> i*ws<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;">        xa<span style="color: #000;">,</span>ya <span style="color: #000;">=</span> rot<span style="color: black;">&#40;</span>da/<span style="color: #008;">2</span><span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> i*ws<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> f<span style="color: #080;">&quot;{xi},{yi},{(i-1)*hs}&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;">        p1 <span style="color: #000;">=</span> f<span style="color: #080;">&quot;{xa},{ya},{(i-1)*hs}&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;">        p2 <span style="color: #000;">=</span> f<span style="color: #080;">&quot;{xa},{ya},{i*hs}&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;">        p3 <span style="color: #000;">=</span> f<span style="color: #080;">&quot;{xi},{yi},{i*hs}&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;">        scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;3DPoly {p0} {p1} {p2} {p3} 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;">        Lp.<span style="color: black;">append</span><span style="color: black;">&#40;</span>p1<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;"># Ausformen</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;_Loft {' '.join(Lp)}<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;">&#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;"># Nun werden die einzelnen Stufen auf die „Rampe“ gesetzt.</span></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;"># Für alle Stufen:</span></div></li><li 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> i <span style="color: #ff7700;">in</span> <span style="color: #808;">range</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;">        <span style="color: #800; font-style: italic;"># Vorderseite der Stufe</span></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>yi <span style="color: #000;">=</span> rot<span style="color: black;">&#40;</span>di/<span style="color: #008;">2</span><span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> i*ws<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;">        xa<span style="color: #000;">,</span>ya <span style="color: #000;">=</span> rot<span style="color: black;">&#40;</span>da/<span style="color: #008;">2</span><span style="color: #000;">,</span> <span style="color: #008;">0</span><span style="color: #000;">,</span> i*ws<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;">        p0 <span style="color: #000;">=</span> f<span style="color: #080;">&quot;{xi},{yi},{i*hs}&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;">        p1 <span style="color: #000;">=</span> f<span style="color: #080;">&quot;{xa},{ya},{i*hs}&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;">        p2 <span style="color: #000;">=</span> f<span style="color: #080;">&quot;{xa},{ya},{(i+1)*hs}&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;">        p3 <span style="color: #000;">=</span> f<span style="color: #080;">&quot;{xi},{yi},{(i+1)*hs}&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;">        scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;3DPoly {p0} {p1} {p2} {p3} s<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;"># Rotieren</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Rotation l  0,0,0 0,0,1 {ws}<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;"># Anzeige anpassen</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;-APunkt -1,-1,1<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;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Zoom Fenster {-da/2},{-da/2},0 {da/2},{da/2},{ht}<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: #808;">print</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;&quot;&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;">Fertig. </span></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;">Starten Sie die erzeugte Scriptdatei WENDELTREPPE.SCR im CAD-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;"><span style="color: #080;">in einer leeren Zeichnung (Einheit Zentimeter) mit dem Befehl SCRIPT!</span></div></li><li 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;&quot;&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;">input</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;[Enter]&quot;</span><span style="color: black;">&#41;</span></div></li></ol></pre>]]></content:encoded>
<link>https://bauforum.wirklichewelt.de/index.php?id=11645</link>
<guid>https://bauforum.wirklichewelt.de/index.php?id=11645</guid>
<pubDate>Thu, 21 Jun 2018 17:38:50 +0000</pubDate>
<category>Software</category><dc:creator>Martin Vogel</dc:creator>
</item>
<item>
<title>Python-Programm für Wendeltreppen in AutoCAD und BricsCAD</title>
<content:encoded><![CDATA[<p>Um schnell mal eine Wendeltreppe in einem generischen CAD-Programm wie BricsCAD oder AutoCAD zu zeichnen, sind eine Anzahl sich wiederholender Schritte nötig, die man sinnvollerweise einem Programm überlässt.</p>
<p>Wer LISP mag, kann zum Beispiel das 1995 von Xue-dong Zhao geschriebene Spiral-Stair-Script SPST.LSP so anpassen, dass es auch unter aktuellen Programmversionen noch läuft. Es ist nach kurzer Suche an verschiedenen Orten im Web zu finden.</p>
<p>Man könnte aber auch einfach ein kleines Pythonprogramm schreiben, das eine Scriptdatei für AutoCAD oder BricsCAD zum Zeichnen einer Wendeltreppe erzeugt. Diese kann die Treppe dann gleich so bemessen, dass sie bequem zu gehen ist.</p>
<p><img src="https://bauforum.wirklichewelt.de/images/uploaded/201806211356555b2baea7d96ac.png" alt="[image]"  loading="lazy" /></p>
<p>Das unten zu findende Programm Wendeltreppe.py fragt zuerst nach der gewünschten Höhe der Treppe in Zentimetern. Daraus ermittelt es die Zahl der Stufen, die erforderlich ist, um der optimalen Stufenhöhe von 17 Zentimetern so nah wie möglich zu kommen.</p>
<p>Der Innen- und der Außendurchmesser der Wendel bestimmen die Stufenbreite. 30 Zentimeter vom äußeren Rand entfernt befindet sich die Lauflinie, welche die für eine bequeme und sichere Nutzung der Treppe optimale Stufentiefe und den erforderlichen Drehwinkel (auf 15° gerundet) festlegt. Dieser Drehwinkel kann noch verändert werden, um mehr Freiheit in der Gestaltung der Treppengeometrie zu haben.</p>
<p>Sind alle Geometrieparameter festgelegt, schreibt das Pythonprogramm das CAD-Script WENDELTREPPE.SCR. Wer BricsCAD verwendet, kann diese Datei einfach doppelklicken und hat im nächsten Augenblick eine fertige Wendeltreppe auf dem Bildschirm, bei der nur noch ein paar Kleinigkeiten wie Handlauf, Geländerstäbe oder eine schöne, ebenmäßig geformte Unterseite ergänzt werden müssen. AutoCAD unterstützt das Doppelklicken von Scriptdateien nicht; hier müssen Sie in einer neuen, leeren Datei den Befehl SCRIPT eintippen und im sich öffnenden Dialogfenster die Datei WENDELTREPPE.SCR suchen und ausführen.</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;"><span style="color: #800; font-style: italic;"># benötigt mindestens Python 3.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;"><span style="color: #ff7700;">from</span> <span style="color: #dc143c;">math</span> <span style="color: #ff7700;">import</span> pi<span style="color: #000;">,</span> degrees</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;&quot;&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;">Dieses Programm erzeugt eine AutoCAD/BricsCAD-Scriptdatei für eine</span></div></li><li 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;">Wendeltreppe.</span></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;">Starten Sie die erzeugte Scriptdatei WENDELTREPPE.SCR 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: #080;">in einer leeren Zeichnung (Einheit Zentimeter) mit dem Befehl SCRIPT!</span></div></li><li 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: #ff7700;">def</span> fi<span style="color: black;">&#40;</span>s<span style="color: #000;">,</span> vorgabe<span style="color: #000;">=</span><span style="color: #808;">None</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;float input&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;">while</span> <span style="color: #808;">True</span>:</div></li><li 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;{s}{f' ({vorgabe})' if vorgabe else ''}: &quot;</span><span style="color: #000;">,</span>end<span style="color: #000;">=</span><span style="color: #080;">&quot;&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;">        inp <span style="color: #000;">=</span> <span style="color: #808;">input</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">replace</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;,&quot;</span><span style="color: #000;">,</span><span style="color: #080;">&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;">        <span style="color: #ff7700;">if</span> <span style="color: #ff7700;">not</span> inp:</div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">            inp <span style="color: #000;">=</span> vorgabe</div></li><li 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;">            <span style="color: #ff7700;">return</span> <span style="color: #808;">float</span><span style="color: black;">&#40;</span>inp<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;">            <span style="color: #808;">print</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;Fehler: Eingabe wurde nicht als Zahl erkannt.&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;">da <span style="color: #000;">=</span> fi<span style="color: black;">&#40;</span><span style="color: #080;">&quot;Außendurchmesser der Treppe&quot;</span><span style="color: #000;">,</span> <span style="color: #008;">250</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;">du <span style="color: #000;">=</span> da - <span style="color: #008;">60</span></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 <span style="color: #000;">=</span> pi * du</div></li><li 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;Der Durchmesser der Lauflinie beträgt {du} cm.&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>f<span style="color: #080;">&quot;Ihr Umfang beträgt {ul:.1f} cm.&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;">di <span style="color: #000;">=</span> fi<span style="color: black;">&#40;</span><span style="color: #080;">&quot;Innendurchmesser der Treppe&quot;</span><span style="color: #000;">,</span> <span style="color: #008;">50</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;">ht <span style="color: #000;">=</span> fi<span style="color: black;">&#40;</span><span style="color: #080;">&quot;Höhe der Treppe&quot;</span><span style="color: #000;">,</span> <span style="color: #008;">260</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 <span style="color: #000;">=</span> <span style="color: #808;">round</span><span style="color: black;">&#40;</span>ht/<span style="color: #008;">17</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;">hs <span style="color: #000;">=</span> ht/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: #808;">print</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Die Treppe erhält {n} Stufen.&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>f<span style="color: #080;">&quot;Die Stufenhöhe beträgt {hs:.1f} cm.&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;"># rechnerischer Auftritt aus Schrittmaßregel</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">ra <span style="color: #000;">=</span> <span style="color: #008;">63</span> - <span style="color: #008;">2</span> * hs</div></li><li 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;"># rechnerischer Winkel der Treppe</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">rw <span style="color: #000;">=</span> <span style="color: #008;">360</span> * n * ra / ul</div></li><li 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;"># gerundet auf 15°</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">rwg <span style="color: #000;">=</span> <span style="color: #808;">int</span><span style="color: black;">&#40;</span><span style="color: #808;">round</span><span style="color: black;">&#40;</span>rw/<span style="color: #008;">15</span><span style="color: black;">&#41;</span>*<span style="color: #008;">15</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;">wt <span style="color: #000;">=</span> fi<span style="color: black;">&#40;</span><span style="color: #080;">&quot;Gesamtdrehwinkel der Treppe&quot;</span><span style="color: #000;">,</span>rwg<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;"># Winkel einer Stufe</span></div></li><li style="background:#f5f5f5;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">ws <span style="color: #000;">=</span> wt/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;"># Vorderseite der Stufe</span></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> f<span style="color: #080;">&quot;{di/2},0,0&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;">p1 <span style="color: #000;">=</span> f<span style="color: #080;">&quot;{da/2},0,0&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;">p2 <span style="color: #000;">=</span> f<span style="color: #080;">&quot;{da/2},0,{hs}&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;">p3 <span style="color: #000;">=</span> f<span style="color: #080;">&quot;{di/2},0,{hs}&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;">&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><span style="color: #080;">&quot;WENDELTREPPE.SCR&quot;</span><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> scr:</div></li><li 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 geht 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;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;OSnapCoord 1<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;"># Einheit Zentimeter</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;_InsUnits 5<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;"># Vorderseite der Stufe</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;3DPoly {p0} {p1} {p2} {p3} s<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;"># Rotieren</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;Rotation l  0,0,0 0,0,1 {ws}<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;"># Block definieren</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;-Block Stufe 0,0,0 l <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: #ff7700;">for</span> i <span style="color: #ff7700;">in</span> <span style="color: #808;">range</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;">        scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span>f<span style="color: #080;">&quot;_-Insert Stufe<span style="color: #000099; font-weight: bold;">\n</span>0,0,{i*hs} 1 1 {i*ws}<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;"># Anzeige anpassen</span></div></li><li style="background:#f9f9f9;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;-APunkt -1,-1,1<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;">    scr.<span style="color: black;">write</span><span style="color: black;">&#40;</span><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:#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;">input</span><span style="color: black;">&#40;</span><span style="color: #080;">&quot;Fertig. [Enter]&quot;</span><span style="color: black;">&#41;</span></div></li></ol></pre>]]></content:encoded>
<link>https://bauforum.wirklichewelt.de/index.php?id=11644</link>
<guid>https://bauforum.wirklichewelt.de/index.php?id=11644</guid>
<pubDate>Thu, 21 Jun 2018 14:09:40 +0000</pubDate>
<category>Software</category><dc:creator>Martin Vogel</dc:creator>
</item>
</channel>
</rss>
