Kabel-Config komplett mit float zahlen als keys versehen. Fehlermeldungen angepasst. Übeprüfung des pos-Eintrags im dict vo merge_two_dict wieder einkommentiert.

This commit is contained in:
2025-06-10 16:05:28 +02:00
parent 7733b50609
commit 2d29705d4a
2 changed files with 14 additions and 20 deletions
+6 -6
View File
@@ -160,11 +160,11 @@ def get_input_positions_iter(dxf_path) -> tuple:
# Nur wenn eine ID vorhanden ist, und eine gültige Position existiert
if typ == "Sensor":
#if id and "pos" in ld and isinstance(ld["pos"], tuple) and len(ld["pos"]) == 2:
if id in allSensors:
allSensors[id] = merge_two_dicts(allSensors[id], ld) #Kombiniert alle infos aus dxf und "pos"
else:
allSensors[id] = ld
if id and "pos" in ld and isinstance(ld["pos"], tuple) and len(ld["pos"]) == 2:
if id in allSensors:
allSensors[id] = merge_two_dicts(allSensors[id], ld) #Kombiniert alle infos aus dxf und "pos"
else:
allSensors[id] = ld
elif typ == "Kabel":
allCables[id] = ld
elif typ == "Schaltschrankelement":
@@ -464,7 +464,7 @@ if __name__ == '__main__':
msp = doc.modelspace()
use_iter = False
else:
print("Given .dxf-file is ASCII-dxf. Proceeding to user iterative functions. Process may take longer.")
print("Given .dxf-file is ASCII-dxf. Proceeding to use iterative functions. Process may take longer.")
use_iter = True
res_sens = dict()