Weitere TOS Nummern für Zusatzmodul, Weichen Strecke und Automation in den Code für Export eingepflegt
This commit is contained in:
+60
-9
@@ -103,7 +103,18 @@ def build_kreisel_details(block):
|
|||||||
# --- Bekannte Bloecke ignorieren ---
|
# --- Bekannte Bloecke ignorieren ---
|
||||||
SKIP_BLOCKS = {"K1", "K2", "K3", "K4", "KS_EIN", "KS_AUS"}
|
SKIP_BLOCKS = {"K1", "K2", "K3", "K4", "KS_EIN", "KS_AUS"}
|
||||||
|
|
||||||
VARIO_BLOCKS = {
|
# Sivas-Nummern und Bezeichnungen je ILS-Elementtyp
|
||||||
|
ILS_SIVASNR = {
|
||||||
|
"kreisel": ("6200", "ILS 2.0 Kreisel"),
|
||||||
|
"eckrad": ("6210", "ILS 2.0 Eckrad"),
|
||||||
|
"zusatzmodul":("6215", "ILS 2.0 Zusatzmodul"),
|
||||||
|
"ils_weiche": ("6216", "ILS 2.0 Weichen"),
|
||||||
|
"strecke": ("6220", "ILS 2.0 Strecke - Module"),
|
||||||
|
"automation": ("6269", "ILS 2.0 Automation und Pneumatik - Gesamtanlage"),
|
||||||
|
}
|
||||||
|
|
||||||
|
# Strecken-Module: Blocknamen-Fragmente fuer Vario/Staustrecke-Elemente
|
||||||
|
STRECKE_BLOCKS = {
|
||||||
"AUS_Element_links", "EIN_Element_links",
|
"AUS_Element_links", "EIN_Element_links",
|
||||||
"Staustrecke_SP_1000_mm", "Staustrecke_Separator_SP_300_mm",
|
"Staustrecke_SP_1000_mm", "Staustrecke_Separator_SP_300_mm",
|
||||||
"Vario_Spannstation_SP_500mm", "Vario_Motorstation_SP_500mm",
|
"Vario_Spannstation_SP_500mm", "Vario_Motorstation_SP_500mm",
|
||||||
@@ -233,9 +244,14 @@ def process_blocks(blocks, lookup):
|
|||||||
counters["anzahl_streckengruppen"] = 1
|
counters["anzahl_streckengruppen"] = 1
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# --- VarioFoerderer ---
|
# --- ILS Eckrad ---
|
||||||
for vb in VARIO_BLOCKS:
|
if bname.startswith("ECKRAD_"):
|
||||||
if vb in bname:
|
counters["anzahl_eckraeder"] += 1
|
||||||
|
continue
|
||||||
|
|
||||||
|
# --- ILS Strecke-Module (Vario/Staustrecke) ---
|
||||||
|
for sb in STRECKE_BLOCKS:
|
||||||
|
if sb in bname:
|
||||||
counters["anzahl_variofoerderer"] += 1
|
counters["anzahl_variofoerderer"] += 1
|
||||||
break
|
break
|
||||||
|
|
||||||
@@ -286,10 +302,11 @@ def process_blocks(blocks, lookup):
|
|||||||
nr += 1
|
nr += 1
|
||||||
|
|
||||||
for block in kreisel_list:
|
for block in kreisel_list:
|
||||||
|
sivasnr, teileart = ILS_SIVASNR["kreisel"]
|
||||||
items.append({
|
items.append({
|
||||||
"nr": nr,
|
"nr": nr,
|
||||||
"teileart": "ILS 2.0 Kreisel",
|
"teileart": teileart,
|
||||||
"sivasnr": "6200",
|
"sivasnr": sivasnr,
|
||||||
"sivasnr_quoted": True,
|
"sivasnr_quoted": True,
|
||||||
"dispgruppe": 20,
|
"dispgruppe": 20,
|
||||||
"anzahl": 1,
|
"anzahl": 1,
|
||||||
@@ -299,8 +316,41 @@ def process_blocks(blocks, lookup):
|
|||||||
})
|
})
|
||||||
nr += 1
|
nr += 1
|
||||||
|
|
||||||
|
if counters["anzahl_eckraeder"] > 0:
|
||||||
|
sivasnr, teileart = ILS_SIVASNR["eckrad"]
|
||||||
|
items.append({
|
||||||
|
"nr": nr,
|
||||||
|
"teileart": teileart,
|
||||||
|
"sivasnr": sivasnr,
|
||||||
|
"sivasnr_quoted": True,
|
||||||
|
"dispgruppe": 20,
|
||||||
|
"anzahl": counters["anzahl_eckraeder"],
|
||||||
|
"laenge_mm": "",
|
||||||
|
"hoehe_m": "",
|
||||||
|
"details": {},
|
||||||
|
})
|
||||||
|
nr += 1
|
||||||
|
|
||||||
|
if counters["anzahl_variofoerderer"] > 0:
|
||||||
|
sivasnr, teileart = ILS_SIVASNR["strecke"]
|
||||||
|
items.append({
|
||||||
|
"nr": nr,
|
||||||
|
"teileart": teileart,
|
||||||
|
"sivasnr": sivasnr,
|
||||||
|
"sivasnr_quoted": True,
|
||||||
|
"dispgruppe": 20,
|
||||||
|
"anzahl": counters["anzahl_variofoerderer"],
|
||||||
|
"laenge_mm": "",
|
||||||
|
"hoehe_m": "",
|
||||||
|
"details": {},
|
||||||
|
})
|
||||||
|
nr += 1
|
||||||
|
|
||||||
# ILS Automation Summierungszeile (nur wenn ILS-Elemente vorhanden)
|
# ILS Automation Summierungszeile (nur wenn ILS-Elemente vorhanden)
|
||||||
if counters["anzahl_kreisel"] > 0 or counters["anzahl_variofoerderer"] > 0:
|
has_ils = (counters["anzahl_kreisel"] > 0
|
||||||
|
or counters["anzahl_eckraeder"] > 0
|
||||||
|
or counters["anzahl_variofoerderer"] > 0)
|
||||||
|
if has_ils:
|
||||||
automation_details = {
|
automation_details = {
|
||||||
"Anzahl Kreisel": counters["anzahl_kreisel"],
|
"Anzahl Kreisel": counters["anzahl_kreisel"],
|
||||||
"Anzahl Kreisel mit Pinband": counters["anzahl_kreisel_pinband"],
|
"Anzahl Kreisel mit Pinband": counters["anzahl_kreisel_pinband"],
|
||||||
@@ -323,10 +373,11 @@ def process_blocks(blocks, lookup):
|
|||||||
"Anzahl aller BTBeladung": counters["anzahl_btbeladung"],
|
"Anzahl aller BTBeladung": counters["anzahl_btbeladung"],
|
||||||
"Anzahl aller Abwurfstationen": counters["anzahl_abwurfstationen"],
|
"Anzahl aller Abwurfstationen": counters["anzahl_abwurfstationen"],
|
||||||
}
|
}
|
||||||
|
auto_sivasnr, auto_teileart = ILS_SIVASNR["automation"]
|
||||||
items.append({
|
items.append({
|
||||||
"nr": nr,
|
"nr": nr,
|
||||||
"teileart": "ILS 2.0 Automation",
|
"teileart": auto_teileart,
|
||||||
"sivasnr": "6270",
|
"sivasnr": auto_sivasnr,
|
||||||
"sivasnr_quoted": True,
|
"sivasnr_quoted": True,
|
||||||
"dispgruppe": 20,
|
"dispgruppe": 20,
|
||||||
"anzahl": 1,
|
"anzahl": 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user