From c734e2f82122c68da80e49d16b19e9cddec1f9b9 Mon Sep 17 00:00:00 2001
From: Paul Wolok
Date: Tue, 16 Dec 2025 10:13:50 +0100
Subject: [PATCH] Behebung von Bugs
---
lib/Elemente/Gefaehllestrecke.py | 8 ++++----
lib/plant2dxf.py | 3 ---
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/lib/Elemente/Gefaehllestrecke.py b/lib/Elemente/Gefaehllestrecke.py
index ebcc49f..32c2bdf 100644
--- a/lib/Elemente/Gefaehllestrecke.py
+++ b/lib/Elemente/Gefaehllestrecke.py
@@ -45,8 +45,8 @@ class Gefaellestrecke(BaseModel):
tefkurve_0 = None
tefkurve_1 = None
if "Kurvenrichtung" in gefaellestrecke_nachbarn:
- vario_hoehe_0 = float(gefaellestrecke_nachbarn.get("vario_hoehe_0")) * 1000
- vario_hoehe_1 = float(gefaellestrecke_nachbarn.get("vario_hoehe_1")) * 1000
+ vario_hoehe_0 = float(gefaellestrecke_nachbarn.get("vario_hoehe_0"))
+ vario_hoehe_1 = float(gefaellestrecke_nachbarn.get("vario_hoehe_1"))
kurvenrichtung = gefaellestrecke_nachbarn.get("Kurvenrichtung")
tefkurve_0 = gefaellestrecke_nachbarn.get("Tefkurve")
if (kurvenrichtung == "links" and tefkurve_0 == "Aussen") or kurvenrichtung == "rechts" and tefkurve_0 == "Innen":
@@ -59,8 +59,8 @@ class Gefaellestrecke(BaseModel):
blockname_umlenk_links = block_Vario_Umlenkstation_500mm + "links"
plant2dxf.import_block(block_Vario_Umlenkstation_500mm,lib_doc,doc)
plant2dxf.import_block(block_Vario_Motorstation_500mm,lib_doc,doc)
- block_Vario_Umlenkstation_500mm =plant2dxf.dreh_block(block_Vario_Umlenkstation_500mm,doc,math.radians(3))
- block_Vario_Motorstation_500mm =plant2dxf.dreh_block(block_Vario_Motorstation_500mm,doc,math.radians(3))
+ block_Vario_Umlenkstation_500mm =plant2dxf.dreh_block(block_Vario_Umlenkstation_500mm,doc,lib_doc,math.radians(3))
+ block_Vario_Motorstation_500mm =plant2dxf.dreh_block(block_Vario_Motorstation_500mm,doc,lib_doc,math.radians(3))
if blockname_motor_links not in doc.blocks:
matrix = Matrix44.scale(1,-1,1)
block_motor_links = doc.blocks.new(name=blockname_motor_links,base_point=(0,0,0))
diff --git a/lib/plant2dxf.py b/lib/plant2dxf.py
index 3bbd068..caa88bf 100644
--- a/lib/plant2dxf.py
+++ b/lib/plant2dxf.py
@@ -15,11 +15,8 @@ from ezdxf import units
from ezdxf.entities import Line
from ezdxf.addons import importer
from ezdxf.math import Matrix44, X_AXIS,Y_AXIS,Z_AXIS
-from ezdxf import bbox
from pathlib import Path
import math
-from pydantic import BaseModel, Field, field_validator
-from typing import Optional
from utils import check_environment_var, setup_logger
from Elemente import Kreisel, VarioFoerderer,Gefaehllestrecke,Angetriebene_Kurve,Bt_element,Omniflo
import as_es_methoden