ILS Elementtypen für den Export hinzugefügt.

This commit is contained in:
2026-07-14 16:25:21 +02:00
parent ae9ce69d5f
commit bf517475bb
5 changed files with 41 additions and 17 deletions
+34 -10
View File
@@ -132,13 +132,20 @@ def build_kreisel_details(block):
SKIP_BLOCKS = set(BLOCKPATTERNS.get("pattern_ks_subblocks", ["K1", "K2", "K3", "K4", "KS_EIN", "KS_AUS"]))
# Sivas-Nummern und Bezeichnungen je ILS-Elementtyp
# Hinweis: "ils_kurve", "bt_beladung" und "bg_entladung" sind aktuell nur
# Typnamen-Platzhalter - die zugehoerigen Menuebefehle sind noch Dummies
# (siehe Lisp/README.md), es gibt noch keine Block-Erkennung dafuer.
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"),
"kreisel": ("6200", "ILS 2.0 Kreisel"),
"eckrad": ("6210", "ILS 2.0 Eckrad"),
"zusatzmodul": ("6215", "ILS 2.0 Zusatzmodul"),
"ils_weiche": ("6216", "ILS 2.0 Weiche"),
"ils_kurve": ("", "ILS 2.0 Kurve"),
"strecke": ("6220", "ILS 2.0 Strecke"),
"gefaellestrecke": ("6220", "ILS 2.0 Gefaellestrecke"),
"bt_beladung": ("", "BT - Beladung"),
"bg_entladung": ("", "BG - Entladung"),
"automation": ("6269", "ILS 2.0 Automation und Pneumatik - Gesamtanlage"),
}
@@ -157,7 +164,8 @@ def process_blocks(blocks, lookup):
gerade_groups = {}
kreisel_list = [] # Liste von blocks
eckrad_ids = [] # IDs aller Eckrad-Bloecke
strecke_ids = [] # IDs aller Strecke-Module (VF_*, GF_*, Vario/Staustrecke)
strecke_ids = [] # IDs aller Strecke-/Variofoerderer (VF_*, Vario/Staustrecke)
gefaelle_ids = [] # IDs aller Gefaellestrecken (GF_*)
counters = {
"anzahl_boegen": 0,
@@ -300,11 +308,11 @@ def process_blocks(blocks, lookup):
continue
# --- Gefaellestrecke Compound-Block (GF_N) ---
# Eigener Typ "ILS 2.0 Gefaellestrecke" - NICHT als Variofoerderer zaehlen.
if matches_any(bname, BLOCKPATTERNS.get("pattern_gefaellestrecke", [])):
attribs = block.get("attribs", {})
counters["anzahl_variofoerderer"] += 1
counters["anzahl_gefaellestrecken"] += 1
strecke_ids.append(get_id(block))
gefaelle_ids.append(get_id(block))
try:
counters["laengen_gefaellestrecken"] += float(attribs.get("L_GF_m", "0") or "0")
except (ValueError, TypeError):
@@ -419,10 +427,26 @@ def process_blocks(blocks, lookup):
})
nr += 1
if counters["anzahl_gefaellestrecken"] > 0:
sivasnr, teileart = ILS_SIVASNR["gefaellestrecke"]
items.append({
"nr": nr,
"teileart": teileart,
"sivasnr": sivasnr,
"sivasnr_quoted": True,
"dispgruppe": 20,
"anzahl": counters["anzahl_gefaellestrecken"],
"laenge_mm": "",
"hoehe_m": "",
"details": {"IDs": gefaelle_ids},
})
nr += 1
# ILS Automation Summierungszeile (nur wenn ILS-Elemente vorhanden)
has_ils = (counters["anzahl_kreisel"] > 0
or counters["anzahl_eckraeder"] > 0
or counters["anzahl_variofoerderer"] > 0)
or counters["anzahl_variofoerderer"] > 0
or counters["anzahl_gefaellestrecken"] > 0)
if has_ils:
automation_details = {
"Anzahl Kreisel": counters["anzahl_kreisel"],