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:
+6
-6
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user