From 7ed328d897454813f12001af68fff876ce0f7d75 Mon Sep 17 00:00:00 2001
From: Paul Wolok
Date: Mon, 17 Nov 2025 11:40:14 +0100
Subject: [PATCH] =?UTF-8?q?Vorbereitung=20wenn=20mehr=20bl=C3=B6cke=20zur?=
=?UTF-8?q?=20verf=C3=BCgung=20stehen,=20fertig=20stellung=20eckrad?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
lib/plant2dxf.py | 34 +++++++++++++++++++++++++++++++---
1 file changed, 31 insertions(+), 3 deletions(-)
diff --git a/lib/plant2dxf.py b/lib/plant2dxf.py
index 08a7842..402b033 100644
--- a/lib/plant2dxf.py
+++ b/lib/plant2dxf.py
@@ -206,7 +206,6 @@ def transform_coords(x: float, y: float, height: float) -> tuple[float, float]:
return x, y -height
def handle_ils_2_0_kreisel_mit_pin(msp, teileid, merkmale, x, y, doc, lib_doc, verbose, symbols,strecken_nachbarn,config,config_allgemein):
- merkmale["pin"] = "True"
handle_ils_2_0_kreisel(msp, teileid, merkmale, x, y, doc, lib_doc, verbose, symbols,strecken_nachbarn,config,config_allgemein)
def handle_ils_2_0_kreisel(msp, teileid, merkmale, x, y, doc, lib_doc, verbose, symbols,strecken_nachbarn,config,config_allgemein):
@@ -365,8 +364,26 @@ def handle_standard(msp, blocknames, teileid, x, y, lib_doc, doc, verbose):
def handle_ils_2_0_eckrad(msp, teileid, merkmale, x, y, doc, lib_doc, verbose, symbols, strecken_nachbarn,config,config_allgemein):
import_block("AN8",lib_doc,doc)
- hight = float(merkmale.get("Höhe in m"))* 1000
- msp.add_blockref("AN8",(x,y,hight))
+ import_block("Richtungspfeil",lib_doc,doc)
+ eckrad_rechts = "eckrad_rechts"
+ eckrad_links = "eckrad_links"
+ hight = float(merkmale.get("Höhe in m"))
+ if eckrad_rechts not in doc.blocks:
+ block_rechts = doc.blocks.new(name= eckrad_rechts,base_point=(0,0,0))
+ block_links = doc.blocks.new(name= eckrad_links,base_point=(0,0,0))
+ block_rechts.add_blockref("AN8",(0,0,0))
+ block_links.add_blockref("AN8",(0,0,0))
+ block_rechts.add_blockref("Richtungspfeil",(0+200,0+ RADIUS,0))
+ block_rechts.add_blockref("Richtungspfeil",(0-200,0- RADIUS,0),dxfattribs={"rotation": 180})
+ block_links.add_blockref("Richtungspfeil",(0+200,0- RADIUS,0))
+ block_links.add_blockref("Richtungspfeil",(0-200,0+ RADIUS,0),dxfattribs={"rotation": 180})
+
+ if merkmale.get("Richtung") == "rechts":
+ msp.add_blockref(eckrad_rechts,(x,y,hight))
+ elif merkmale.get("Richtung") == "links":
+ msp.add_blockref(eckrad_links,(x,y,hight))
+ else:
+ msp.add("AN8",x,y,hight)
def handle_ils_2_0_gefaellestrecke(msp, teileid, merkmale, x, y, doc, lib_doc, verbose, symbols, strecken_nachbarn,config,config_allgemein):
#Vorbereitung der attributen
@@ -2364,6 +2381,16 @@ def vario_erstellung(msp,merkmale, x, y, doc, lib_doc, config, winkel, hoehe_var
clone.transform(matrix)
block_links.add_entity(clone)
+def handle_ils_2_0_kurve_angetrieben(msp, teileid, merkmale, x, y, doc, lib_doc, verbose, symbols, strecken_nachbarn,config,config_allgemein):
+ test = 3
+def handle_ils_2_0_kurve(msp, teileid, merkmale, x, y, doc, lib_doc, verbose, symbols, strecken_nachbarn,config,config_allgemein):
+ test = 3
+def handle_bt___beladung(msp, teileid, merkmale, x, y, doc, lib_doc, verbose, symbols, strecken_nachbarn,config,config_allgemein):
+ import_block("AN8",lib_doc,doc)
+ msp.add_blockref("AN8",(x,y))
+def handle_bt___entladung(msp, teileid, merkmale, x, y, doc, lib_doc, verbose, symbols, strecken_nachbarn,config,config_allgemein):
+ import_block("AN8",lib_doc,doc)
+ msp.add_blockref("AN8",(x,y))
def handle_omniflo(msp, teileid, merkmale, x, y, doc, lib_doc, verbose, symbols, strecken_nachbarn,config,config_allgemein):
"""
Für Omniflo Gerade: zeichnet eine Linie (Mitte = Koordinate, Länge und Winkel aus Merkmale).
@@ -3171,6 +3198,7 @@ def normalize_func_name(name):
.replace('ß', 'ss')
.replace(' ', '_')
.replace('.', '_')
+ .replace('-', '_')
.lower()
)