From 847723fe156e509aeaccbff07b21e473f14f4942 Mon Sep 17 00:00:00 2001 From: Paul Wolok Date: Tue, 16 Dec 2025 13:01:46 +0100 Subject: [PATCH] =?UTF-8?q?Korrektur=20der=20Gef=C3=A4llestrecke?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/plant2dxf.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/plant2dxf.py b/lib/plant2dxf.py index caa88bf..5eb80e6 100644 --- a/lib/plant2dxf.py +++ b/lib/plant2dxf.py @@ -587,9 +587,9 @@ def handle_ils_2_0_gefaellestrecke(msp, teileid, merkmale, x, y, doc, lib_doc, v line.translate(-x,-y,-hoehe_gefaehlle) block.add_entity(line) msp.add_blockref(blockname,(x,y,hoehe_gefaehlle),dxfattribs={"rotation": rotation,"layer": gefaelle_layer}) - else: + elif hat_motor_0 == True or hat_motor_1 == True or hat_umlenk_0 == True or hat_umlenk_1 == True: if blockname not in doc.blocks: - block = doc.blocks.new(name=blockname,base_point = (0,0,0)) + block = doc.blocks.new(name=blockname,base_point = (0,0,0)) if (hat_motor_0 == True and tefkurve_0 == "rechts") or (hat_motor_1 == True and tefkurve_1 == "rechts"): block.add_blockref(block_Vario_Motorstation_500mm, (start[0]-x,start[1] - 250* math.cos(math.radians(3))-y,start[2] - 250* math.sin(math.radians(3))-hoehe_gefaehlle),dxfattribs={"rotation": 270}) else: @@ -604,7 +604,9 @@ def handle_ils_2_0_gefaellestrecke(msp, teileid, merkmale, x, y, doc, lib_doc, v line.translate(-x,-y,-hoehe_gefaehlle) block.add_entity(line) msp.add_blockref(blockname,(x,y,hoehe_gefaehlle),dxfattribs={"rotation": rotation,"layer": gefaelle_layer}) - + else: + a= msp.add_line(start,ende) + a.dxf.layer = "6-SP" def anzahl_seperatoren_oder_scan(msp, x, y, doc, lib_doc, klassen_objekt, hoehe, rotation): """Importiert alle seperatoren und/oder scanner für das nötige objekt""" separatoren = klassen_objekt.anzahl_separatoren