Merge branch 'main' of http://gitea.schoenenberger.de/mistangl/kabellaengen
This commit is contained in:
+1
-1
@@ -57,7 +57,7 @@ QM = WD_Q
|
||||
BG = WD_I
|
||||
BG-829422026 = WD_I-829422026
|
||||
BG-720002003 = WD_I-720002003
|
||||
BG-822304037 = WD_I-822304037
|
||||
BG-822035037 = WD_I-822035037
|
||||
BX = WF_B, WD_I
|
||||
PO = WD_PO
|
||||
BP = WD_I
|
||||
|
||||
+5
-5
@@ -155,10 +155,10 @@
|
||||
827072102 = KLEIDERBÜGEL ABFRAGE KPL. MIT SENSOR AM CP
|
||||
827072105 = TROLLEY-V IDENTIFIKATION MIT SCANNER AUF AP 110
|
||||
827072110 = SCHLEPPSEGMENTABFRAGE BIDIREKTIONAL
|
||||
790002020 = SIRIUS ACT TABLEAU 2 FACH "LDT-GE+NA" KPL. (HALTER
|
||||
790002020 = SIRIUS ACT TABLEAU 2 FACH "LDT-GE+NA" KPL. (HALTER)
|
||||
790002021 = SIRIUS ACT TABLEAU 1 FACH "LDT-GN" KPL.
|
||||
790002022 = Bedientableau kpl. LDT GRÜN+8-STUFENSCHALTER
|
||||
790002023 = TABLEAU 6- FACH KPL. "NA+DT-WS+ LDT-BL+ DT-GN
|
||||
790002023 = TABLEAU 6- FACH KPL. "NA+DT-WS+ LDT-BL+ DT-GN"
|
||||
790002024 = TABLEAU 1-F kpl. LDT BLAU
|
||||
790002026 = Bedientableau 1 F kpl "DT-grün"
|
||||
790002027 = Bedientableau 2 F -kpl. "LDT-GE+NA"
|
||||
@@ -167,10 +167,10 @@
|
||||
790002040 = Bedientableau 3 F"LDT-BL+LDT-KL+NA" KPL.
|
||||
790002041 = Bedientableau 4 F kpl."LDT-BL+LDT-BL+LDT-KL+NA"
|
||||
790002045 = Bedientableau 4 F -kpl. "DT-GN+LDT-BL+DT-WS+NA"
|
||||
790002057 = Bedientableau 4 F -kpl. LM-GN+PDT-GE+LDT-BL+NA"
|
||||
790002057 = Bedientableau 4 F -kpl. "LM-GN+PDT-GE+LDT-BL+NA"
|
||||
790002058 = Bedientableau 4 F -kpl. LM-GN+PDT-GE+LDT-BL+BLIND
|
||||
790002059 = Bedientableau 1 F -kpl. DT-Weiss"
|
||||
790002061 = Bedientableau 4 F -kpl. LM-GN+PDT-GE+LDT-BL+NA"
|
||||
790002059 = Bedientableau 1 F -kpl. "DT-Weiss"
|
||||
790002061 = Bedientableau 4 F -kpl. "LM-GN+PDT-GE+LDT-BL+NA"
|
||||
790002064 = Bedientableau 6 F, Not-halt, Ldt-bl, Ldt gn,Blind,
|
||||
790002066 = Bedientableau 2 F -kpl. "PDT-GE+KN-RAST 1-0-2"
|
||||
|
||||
|
||||
@@ -53,6 +53,8 @@
|
||||
30.0=722001357
|
||||
40.0=722001359
|
||||
|
||||
[WD_I-822035037]
|
||||
100.0=725000012
|
||||
|
||||
# Kabel für Sensor 720002003
|
||||
# cables for sensor 720002003
|
||||
|
||||
+6
-8
@@ -505,7 +505,6 @@ def get_tunnel_positions_from_symbols(all_inserts: list, all_positions: list, er
|
||||
ret = {}
|
||||
tunnel_length = {}
|
||||
tunnel_missing_length = {}
|
||||
default_length = "5" # Default-Länge in Metern
|
||||
|
||||
for insert, pos in zip(all_inserts, all_positions):
|
||||
if "NAME" not in insert: # Tunnel haben immer einen eindeutigen Namen
|
||||
@@ -524,18 +523,17 @@ def get_tunnel_positions_from_symbols(all_inserts: list, all_positions: list, er
|
||||
ret[id_] = []
|
||||
ret[id_].append(ld["pos"])
|
||||
|
||||
# Sammle Längeninformation falls vorhanden, sonst Default verwenden
|
||||
# Sammle Längeninformation falls vorhanden, sonst Fehler melden
|
||||
if "laenge" in ld and ld["laenge"]:
|
||||
tunnel_length[id_] = ld["laenge"]
|
||||
else:
|
||||
warning_msg = f"Tunnel '{id_}' hat keine LAENGE-Angabe. Verwende Default-Länge: {default_length}m"
|
||||
print(f"WARNUNG: {warning_msg}")
|
||||
tunnel_missing_length[id_] = warning_msg
|
||||
tunnel_length[id_] = default_length
|
||||
error_msg = f"Tunnel '{id_}' hat keine LAENGE-Angabe. Bitte LAENGE-Attribut im DXF-Symbol setzen."
|
||||
print(f"FEHLER: {error_msg}")
|
||||
tunnel_missing_length[id_] = error_msg
|
||||
|
||||
# Warnings zum ErrorCollector hinzufügen
|
||||
# Fehlende LAENGE als Fehler melden (stoppt die Verarbeitung)
|
||||
if error_collector and tunnel_missing_length:
|
||||
error_collector.add_warnings({"tunnel_missing_length": tunnel_missing_length})
|
||||
error_collector.add_errors({"tunnel_missing_length": tunnel_missing_length})
|
||||
|
||||
# Füge Längeninformation hinzu, falls Tunnel gefunden wurden
|
||||
if len(tunnel_length) > 0:
|
||||
|
||||
+1
-1
@@ -573,7 +573,7 @@ class Anlage():
|
||||
color = "blue"
|
||||
elif re.match("t-.*", rname):
|
||||
color = "orange"
|
||||
tname = rname.split("-")[2]
|
||||
tname = rname.split("-", 2)[2]
|
||||
weight = self.get_tunnel_length(tname)
|
||||
elif re.match("c-.*", rname):
|
||||
color = "green"
|
||||
|
||||
Reference in New Issue
Block a user