update mubea with BTMT information
This commit is contained in:
+7
-3
@@ -611,9 +611,13 @@ der gewuenschten Dimension, greift der 3D-Fallback mit Warnung – aktuell fuer
|
||||
`BTMT-Beladung_2D.dwg`; sobald diese Datei in `data/ils/` liegt, wird sie im
|
||||
2D-Modus ohne Codeaenderung verwendet (`SC_Entladung_2D.dwg` existiert bereits).
|
||||
|
||||
> Hinweis: Beide Stationen werden von `ssg-id-collect-blocks` (`ssg_id.lsp`) und
|
||||
> den `blockpattern`-Mustern in `cfg/export.cfg` **nicht** erfasst – sie
|
||||
> erscheinen daher noch nicht im Sivas-/CSV-Export.
|
||||
Beide Stationen werden ueber `pattern_btmt_beladung`/`pattern_btmt_entladung`
|
||||
(`cfg/export.cfg`) von `ssg-id-collect-blocks` (`ssg_id.lsp`) UND von
|
||||
`csv:collect-export-blocks` (`export.lsp`) erfasst und erscheinen im Sivas-/
|
||||
CSV-Export als eigene TeileArt-Zeilen ("ILS 2.0 BTMT Beladung"/"ILS 2.0 BTMT
|
||||
Entladung" bzw. "BT - Beladung ..."/"Abwurf fuer Klammerbuegel ..."); im
|
||||
Sivas-Export zusaetzlich in den Summenzaehlern "Anzahl aller BTBeladung"/
|
||||
"Anzahl aller Abwurfstationen" der ILS-Automation-Zeile.
|
||||
|
||||
Registrierte Dummy-Befehle:
|
||||
|
||||
|
||||
@@ -910,6 +910,11 @@
|
||||
;; export_sivas.py schliesst sie bewusst wieder aus (siehe dort), da ihre
|
||||
;; Anzahl schon ueber ANZAHL_SEPARATOR/ANZAHL_SCANNER an Kreisel/GF/VF
|
||||
;; gezaehlt wird.
|
||||
;; BTMT-Beladung*/SC_Entladung* = eigenstaendige BTMT Be-/Entladestationen
|
||||
;; (siehe pattern_btmt_beladung/pattern_btmt_entladung in cfg/export.cfg,
|
||||
;; ils-insert-station in SSG_LIB_Commands.lsp). Anders als Separator/
|
||||
;; Scanner werden sie von KEINEM anderen Element mitgezaehlt - export_csv.py
|
||||
;; UND export_sivas.py fuehren sie beide als eigene TeileArt-Zeilen.
|
||||
;; Gibt Auswahlsatz zurueck oder nil.
|
||||
(defun csv:collect-export-blocks ( / ss-all ss-out i ename ed bname)
|
||||
(setq ss-all (ssget "X" (list (cons 0 "INSERT"))))
|
||||
@@ -927,6 +932,8 @@
|
||||
"Vario*,Staustrecke*,AUS_Element*,EIN_Element*,VF_*,GF_*"))
|
||||
(wcmatch bname (export:pattern "pattern_separator" "Separator_SP*,S-LP*"))
|
||||
(wcmatch bname (export:pattern "pattern_scanner" "Scanner*"))
|
||||
(wcmatch bname (export:pattern "pattern_btmt_beladung" "BTMT-Beladung*"))
|
||||
(wcmatch bname (export:pattern "pattern_btmt_entladung" "SC_Entladung*"))
|
||||
;; Rein numerische Namen = Omniflo SivasNr (Boegen/Weichen)
|
||||
;; Rein LISP-intern (Python klassifiziert Omniflo stattdessen
|
||||
;; ueber exakten Katalog-Match), daher fest im Code statt in
|
||||
|
||||
@@ -34,6 +34,10 @@
|
||||
;; ID-ATTDEF haben und daher hier ebenfalls erfasst werden muessen, sonst
|
||||
;; bleibt ihr ID-Attribut trotz ATTDEF für immer leer - ssg-attrib-set-on
|
||||
;; kann nur einen Wert SETZEN, wenn der Block ueberhaupt erst hier landet).
|
||||
;; BTMT-Beladung*/SC_Entladung* (siehe pattern_btmt_beladung/
|
||||
;; pattern_btmt_entladung in cfg/export.cfg) aus demselben Grund: sonst bleibt
|
||||
;; ihre ID trotz ATTDEF leer und sie fehlen bei der zeichnungsweiten Duplikat-
|
||||
;; pruefung/Maximum-Ermittlung (ssg-id-check-all).
|
||||
(defun ssg-id-collect-blocks ( / ss-all ss-out i ename ed bname)
|
||||
(dbgf "ssg-id-collect-blocks")
|
||||
(setq ss-all (ssget "X" (list (cons 0 "INSERT"))))
|
||||
@@ -50,6 +54,7 @@
|
||||
(wcmatch (strcase bname) "AP110*,AP_110*,AP60*,AP_60*,APG110*")
|
||||
(wcmatch bname "Vario*,Staustrecke*,AUS_Element*,EIN_Element*,VF_*,GF_*")
|
||||
(wcmatch bname "Separator_SP*,S-LP*,Scanner*")
|
||||
(wcmatch bname "BTMT-Beladung*,SC_Entladung*")
|
||||
(wcmatch bname "#*")
|
||||
)
|
||||
(ssadd ename ss-out)
|
||||
|
||||
@@ -28,6 +28,14 @@
|
||||
# ANZAHL_SCANNER-Attribute der zugehoerigen Kreisel/Gefaellestrecke/
|
||||
# VarioFoerderer-Bloecke gezaehlt - ein zusaetzlicher eigener Eintrag wuerde
|
||||
# doppelt zaehlen.
|
||||
#
|
||||
# pattern_btmt_beladung/pattern_btmt_entladung: eigenstaendige BTMT Be-/
|
||||
# Entladestationen (siehe ils-insert-station in SSG_LIB_Commands.lsp). Anders
|
||||
# als Separator/Scanner werden sie NICHT von einem anderen Element mitgezaehlt
|
||||
# (kein ANZAHL_*-Attribut an einem Carrier) - export_csv.py UND export_sivas.py
|
||||
# fuehren sie daher beide als eigene TeileArt-Zeilen (export_sivas.py zusaetzlich
|
||||
# in den Summierungszaehlern "Anzahl aller BTBeladung"/"Anzahl aller
|
||||
# Abwurfstationen" der ILS-Automation-Zeile).
|
||||
# ============================================================
|
||||
|
||||
[blockpattern]
|
||||
@@ -40,6 +48,8 @@ pattern_gefaellestrecke= GF_*
|
||||
pattern_strecke_module= Vario*, Staustrecke*, AUS_Element*, EIN_Element*
|
||||
pattern_separator= Separator_SP*, S-LP*
|
||||
pattern_scanner= Scanner*
|
||||
pattern_btmt_beladung= BTMT-Beladung*
|
||||
pattern_btmt_entladung= SC_Entladung*
|
||||
pattern_ks_subblocks= KS_EIN, KS_AUS, K1, K2, K3, K4
|
||||
|
||||
[python]
|
||||
|
||||
BIN
Binary file not shown.
@@ -8,7 +8,7 @@
|
||||
- ILS Weichen
|
||||
- ILS Horizontalvariobögen (30,60,90 r und l, innen und aussen angetrieben)
|
||||
- ILS Gefällebögen (30,60,90 r und l)
|
||||
- BTMT Beladung und Entladung DONE (Einfuegen; Export noch offen)
|
||||
- BTMT Beladung und Entladung DONE (Einfuegen + Sivas-/CSV-Export)
|
||||
- CSV Export aller ILS Elemente
|
||||
|
||||
## Meilenstein 2: Ersatz von Bihler Gerüst
|
||||
|
||||
@@ -300,6 +300,21 @@ def build_sensor_merkmale(block):
|
||||
}
|
||||
|
||||
|
||||
def build_btmt_merkmale(block):
|
||||
"""Merkmale-Dict fuer eine eigenstaendige BTMT-Beladung/SC_Entladung-Station
|
||||
(siehe pattern_btmt_beladung/pattern_btmt_entladung in cfg/export.cfg).
|
||||
|
||||
Anders als build_sensor_merkmale ohne "Zuordnung": eine BTMT-Station ist
|
||||
keinem Kreisel/GF/VF-Carrier zugeordnet, das ZUORDNUNG-Attribut existiert
|
||||
hier nicht."""
|
||||
attribs = block.get("attribs", {})
|
||||
return {
|
||||
"ARTINR": attribs.get("ARTINR", ""),
|
||||
"Höhe": get_hoehe(block),
|
||||
"Drehung": get_drehung(block),
|
||||
}
|
||||
|
||||
|
||||
def format_sensor_id(prefix, n):
|
||||
"""Fallback-TeileId fuer Separator/Scanner-Zeilen im CSV-Export, falls das
|
||||
Block-Attribut "ID" (noch) leer ist.
|
||||
@@ -581,6 +596,8 @@ def process_blocks(blocks, lookup, dbg=None):
|
||||
strecke_modul_count = 0
|
||||
separator_count = 0
|
||||
scanner_count = 0
|
||||
btmt_beladung_count = 0
|
||||
btmt_entladung_count = 0
|
||||
|
||||
# Zaehlung fuer die Omniflo-Sum-Zeile (nur Bogen/Weiche/Gerade)
|
||||
cnt_wk = cnt_einzel = cnt_delta = cnt_doppel = cnt_stern = 0
|
||||
@@ -798,6 +815,39 @@ def process_blocks(blocks, lookup, dbg=None):
|
||||
})
|
||||
continue
|
||||
|
||||
# BTMT-Beladestation - eigene TeileArt-Zeile, sonst analog zu Separator/
|
||||
# Scanner oben. Anders als dort NICHT von export_sivas.py ausgeschlossen
|
||||
# (siehe SEP_SCANNER_PATTERNS-Kommentar) - eine BTMT-Station wird von
|
||||
# keinem anderen Element mitgezaehlt.
|
||||
if matches_any(bname, BLOCKPATTERNS.get("pattern_btmt_beladung", [])):
|
||||
elem_nr += 1
|
||||
btmt_beladung_count += 1
|
||||
items.append({
|
||||
"nr": elem_nr,
|
||||
"teileart": "ILS 2.0 BTMT Beladung",
|
||||
"teileid": block.get("attribs", {}).get("ID") or format_sensor_id("BEL", btmt_beladung_count),
|
||||
"bezeichnung": f"BTMT Beladung :{btmt_beladung_count}",
|
||||
"planquadrat": planquadrat_column(block, planquadrat_cfg),
|
||||
"merkmale": build_btmt_merkmale(block),
|
||||
**bbox_columns(block),
|
||||
})
|
||||
continue
|
||||
|
||||
# BTMT-Entladestation (Abwurfstation) - analog zur Beladestation oben.
|
||||
if matches_any(bname, BLOCKPATTERNS.get("pattern_btmt_entladung", [])):
|
||||
elem_nr += 1
|
||||
btmt_entladung_count += 1
|
||||
items.append({
|
||||
"nr": elem_nr,
|
||||
"teileart": "ILS 2.0 BTMT Entladung",
|
||||
"teileid": block.get("attribs", {}).get("ID") or format_sensor_id("ENT", btmt_entladung_count),
|
||||
"bezeichnung": f"BTMT Entladung :{btmt_entladung_count}",
|
||||
"planquadrat": planquadrat_column(block, planquadrat_cfg),
|
||||
"merkmale": build_btmt_merkmale(block),
|
||||
**bbox_columns(block),
|
||||
})
|
||||
continue
|
||||
|
||||
if has_omniflo:
|
||||
elem_nr += 1
|
||||
items.append({
|
||||
|
||||
+60
-1
@@ -339,6 +339,10 @@ def process_blocks(blocks, lookup):
|
||||
strecke_bezeichnungen = [] # Bezeichnung-Attribut loser Strecke-Elemente
|
||||
vario_list = [] # Liste von VarioFoerderer-Compound-Bloecken (VF_N), je einer Zeile
|
||||
gefaelle_list = [] # Liste von Gefaellestrecke-Bloecken (GF_*), je einer Zeile
|
||||
btmt_beladung_ids = [] # IDs aller BTMT-Beladung*-Bloecke (eine gruppierte Zeile)
|
||||
btmt_beladung_bezeichnungen = []
|
||||
btmt_entladung_ids = [] # IDs aller SC_Entladung*-Bloecke (eine gruppierte Zeile)
|
||||
btmt_entladung_bezeichnungen = []
|
||||
|
||||
counters = {
|
||||
"anzahl_boegen": 0,
|
||||
@@ -381,6 +385,23 @@ def process_blocks(blocks, lookup):
|
||||
if matches_any(bname, SEP_SCANNER_PATTERNS):
|
||||
continue
|
||||
|
||||
# --- BTMT-Beladestation ---
|
||||
# Anders als Separator/Scanner wird sie von keinem Carrier-Attribut
|
||||
# mitgezaehlt, darum eigene (gruppierte) Zeile UND eigener Zaehler in
|
||||
# der ILS-Automation-Summierungszeile (siehe unten).
|
||||
if matches_any(bname, BLOCKPATTERNS.get("pattern_btmt_beladung", [])):
|
||||
btmt_beladung_ids.append(get_id(block))
|
||||
btmt_beladung_bezeichnungen.append(block.get("attribs", {}).get("Bezeichnung", ""))
|
||||
counters["anzahl_btbeladung"] += 1
|
||||
continue
|
||||
|
||||
# --- BTMT-Entladestation (Abwurfstation) ---
|
||||
if matches_any(bname, BLOCKPATTERNS.get("pattern_btmt_entladung", [])):
|
||||
btmt_entladung_ids.append(get_id(block))
|
||||
btmt_entladung_bezeichnungen.append(block.get("attribs", {}).get("Bezeichnung", ""))
|
||||
counters["anzahl_abwurfstationen"] += 1
|
||||
continue
|
||||
|
||||
# --- Omniflo Bogen oder Weiche (erkannt via Katalog) ---
|
||||
if bname in lookup:
|
||||
typ, eintrag = lookup[bname]
|
||||
@@ -649,6 +670,42 @@ def process_blocks(blocks, lookup):
|
||||
})
|
||||
nr += 1
|
||||
|
||||
# BTMT-Beladestationen: eine gruppierte Zeile fuer alle Instanzen (wie die
|
||||
# losen Strecke-Elemente oben) - Stueckzahl zusaetzlich im Automation-
|
||||
# Zaehler "Anzahl aller BTBeladung" (siehe counters oben).
|
||||
if btmt_beladung_ids:
|
||||
sivasnr, teileart = ILS_SIVASNR["bt_beladung"]
|
||||
items.append({
|
||||
"nr": nr,
|
||||
"teileart": teileart,
|
||||
"sivasnr": sivasnr,
|
||||
"sivasnr_quoted": True,
|
||||
"bezeichnung": ", ".join(b for b in btmt_beladung_bezeichnungen if b),
|
||||
"dispgruppe": 20,
|
||||
"anzahl": len(btmt_beladung_ids),
|
||||
"laenge_mm": "",
|
||||
"ids": btmt_beladung_ids,
|
||||
"details": {},
|
||||
})
|
||||
nr += 1
|
||||
|
||||
# BTMT-Entladestationen (Abwurfstationen): analog gruppiert.
|
||||
if btmt_entladung_ids:
|
||||
sivasnr, teileart = ILS_SIVASNR["bg_entladung"]
|
||||
items.append({
|
||||
"nr": nr,
|
||||
"teileart": teileart,
|
||||
"sivasnr": sivasnr,
|
||||
"sivasnr_quoted": True,
|
||||
"bezeichnung": ", ".join(b for b in btmt_entladung_bezeichnungen if b),
|
||||
"dispgruppe": 20,
|
||||
"anzahl": len(btmt_entladung_ids),
|
||||
"laenge_mm": "",
|
||||
"ids": btmt_entladung_ids,
|
||||
"details": {},
|
||||
})
|
||||
nr += 1
|
||||
|
||||
# VarioFoerderer-Compound-Bloecke (VF_N) - je Block eine eigene Zeile mit
|
||||
# vollstaendigen Gefaelle-/Angetrieben-Teilgruppen (immer TYP "Streckengruppe").
|
||||
for block in vario_list:
|
||||
@@ -699,7 +756,9 @@ def process_blocks(blocks, lookup):
|
||||
has_ils = (counters["anzahl_kreisel"] > 0
|
||||
or counters["anzahl_eckraeder"] > 0
|
||||
or counters["anzahl_variofoerderer"] > 0
|
||||
or counters["anzahl_gefaellestrecken"] > 0)
|
||||
or counters["anzahl_gefaellestrecken"] > 0
|
||||
or counters["anzahl_btbeladung"] > 0
|
||||
or counters["anzahl_abwurfstationen"] > 0)
|
||||
if has_ils:
|
||||
automation_details = {
|
||||
"Anzahl Kreisel": counters["anzahl_kreisel"],
|
||||
|
||||
Vendored
+28
@@ -22,6 +22,7 @@
|
||||
"abstand": 20015,
|
||||
"rotation": 90.0,
|
||||
"typ": "STANDARD",
|
||||
"drehrichtung": "GUZ",
|
||||
"expect_block_prefix": "KREISEL_",
|
||||
"expect_hoehe": "1467",
|
||||
"expect_kreiselart": "STANDARD",
|
||||
@@ -300,5 +301,32 @@
|
||||
"z": 1941,
|
||||
"rotation": 0,
|
||||
"assigned_to": "Kreisel_rechts"
|
||||
},
|
||||
{
|
||||
"comment": "BTMT-Beladung, aus mubea_mit_btmt.csv Insertpoint dekodiert (Elementnummer 47)",
|
||||
"function": "insert",
|
||||
"block": "BTMT-Beladung",
|
||||
"x": 10341.61,
|
||||
"y": -241.32,
|
||||
"z": 1941,
|
||||
"rotation": 270.4716
|
||||
},
|
||||
{
|
||||
"comment": "SC_Entladung 1, aus mubea_mit_btmt.csv Insertpoint dekodiert (Elementnummer 48)",
|
||||
"function": "insert",
|
||||
"block": "SC_Entladung",
|
||||
"x": -407.79,
|
||||
"y": -1478.08,
|
||||
"z": 0,
|
||||
"rotation": 90.4078
|
||||
},
|
||||
{
|
||||
"comment": "SC_Entladung 2, aus mubea_mit_btmt.csv Insertpoint dekodiert (Elementnummer 49)",
|
||||
"function": "insert",
|
||||
"block": "SC_Entladung",
|
||||
"x": -404.22,
|
||||
"y": -2718.44,
|
||||
"z": 0,
|
||||
"rotation": 90.1019
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user