fix
This commit is contained in:
@@ -384,6 +384,13 @@
|
||||
;; Omniflo Boegen/Weichen = rein numerische Blocknamen (SivasNr)
|
||||
;; Vario* = VarioFoerderer-Bloecke
|
||||
;; GF_* = Gefaellestrecke Compound-Bloecke
|
||||
;; Separator_SP*/S-LP*, Scanner* = eigenstaendige Sensor-Bloecke (siehe
|
||||
;; pattern_separator/pattern_scanner in cfg/export.cfg). Landen in
|
||||
;; export_raw.json fuer BEIDE Exporte (EXPORTCSV/EXPORTSIVAS teilen sich
|
||||
;; diese Sammlung) - export_csv.py gibt ihnen eigene TeileArt-Zeilen,
|
||||
;; 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.
|
||||
;; 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"))))
|
||||
@@ -399,6 +406,8 @@
|
||||
(wcmatch (strcase bname) (export:pattern "pattern_gerade" "AP110*,AP_110*"))
|
||||
(wcmatch bname (export:pattern "pattern_strecke"
|
||||
"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*"))
|
||||
;; Rein numerische Namen = Omniflo SivasNr (Boegen/Weichen)
|
||||
;; Rein LISP-intern (Python klassifiziert Omniflo stattdessen
|
||||
;; ueber exakten Katalog-Match), daher fest im Code statt in
|
||||
|
||||
@@ -16,6 +16,18 @@
|
||||
# pattern_strecke_module-Keys sind Teilmengen davon fuer die feinere
|
||||
# TeileArt-KLASSIFIKATION in Python (eigene Zeile je Teileart) -
|
||||
# Aenderungen an Blocknamen bitte in beiden Stellen nachziehen.
|
||||
#
|
||||
# pattern_separator/pattern_scanner: eigenstaendige Sensor-Bloecke
|
||||
# (Separator_SP/S-LP, Scanner - siehe ils-insert-sensor/mubea:build-separator-one).
|
||||
# Werden von Lisp's Block-SAMMLUNG mitgesammelt (siehe export.lsp) und von
|
||||
# export_csv.py als eigene TeileArt-Zeilen mit einer beim Export erzeugten
|
||||
# laufenden ID ausgegeben (die Bloecke selbst haben KEIN ID-Attribut - anders
|
||||
# als Kreisel/GF/VF -, daher keine ssg-id-generate-Persistenz). export_sivas.py
|
||||
# schliesst dieselben Bloecke bewusst aus (siehe SEP_SCANNER_PATTERNS dort):
|
||||
# ihre Stueckzahl wird im Sivas-Export bereits ueber die ANZAHL_SEPARATOR/
|
||||
# ANZAHL_SCANNER-Attribute der zugehoerigen Kreisel/Gefaellestrecke/
|
||||
# VarioFoerderer-Bloecke gezaehlt - ein zusaetzlicher eigener Eintrag wuerde
|
||||
# doppelt zaehlen.
|
||||
# ============================================================
|
||||
|
||||
[blockpattern]
|
||||
@@ -26,6 +38,8 @@ pattern_strecke= Vario*, Staustrecke*, AUS_Element*, EIN_Element*, VF_
|
||||
pattern_variofoerderer= VF_*
|
||||
pattern_gefaellestrecke= GF_*
|
||||
pattern_strecke_module= Vario*, Staustrecke*, AUS_Element*, EIN_Element*
|
||||
pattern_separator= Separator_SP*, S-LP*
|
||||
pattern_scanner= Scanner*
|
||||
pattern_ks_subblocks= KS_EIN, KS_AUS, K1, K2, K3, K4
|
||||
|
||||
[Planquadrate]
|
||||
|
||||
Binary file not shown.
@@ -188,6 +188,33 @@ def build_gerade_merkmale(block):
|
||||
}
|
||||
|
||||
|
||||
def build_sensor_merkmale(block):
|
||||
"""Merkmale-Dict fuer einen eigenstaendigen Separator_SP/S-LP- oder
|
||||
Scanner-Block (siehe pattern_separator/pattern_scanner in cfg/export.cfg).
|
||||
Diese Bloecke haben (anders als Kreisel/GF/VF) kein ID-Attribut -
|
||||
ZUORDNUNG/ARTINR/LAYER sind die einzigen ATTDEFs (siehe ils-insert-sensor/
|
||||
mubea:build-separator-one)."""
|
||||
attribs = block.get("attribs", {})
|
||||
return {
|
||||
"Zuordnung": attribs.get("ZUORDNUNG", ""),
|
||||
"ARTINR": attribs.get("ARTINR", ""),
|
||||
"Höhe": get_hoehe(block),
|
||||
"Drehung": get_drehung(block),
|
||||
}
|
||||
|
||||
|
||||
def format_sensor_id(prefix, n):
|
||||
"""Erzeugt eine laufende TeileId fuer Separator/Scanner-Zeilen im CSV-Export.
|
||||
|
||||
Diese Bloecke haben KEIN persistiertes ID-Attribut in der Zeichnung
|
||||
(anders als Kreisel/GF/VF, deren "ID" von ssg-id-generate/ssg-id-check-all
|
||||
beim Insert bzw. vor jedem Export vergeben wird) - der Praefix macht das
|
||||
sichtbar: eine rein fuer diesen Exportlauf erzeugte, NICHT ueber mehrere
|
||||
Exportlaeufe hinweg stabile laufende Nummer, keine echte Block-ID.
|
||||
"""
|
||||
return f"{prefix}-{n:04d}"
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Omniflo Sum-Zeile (Anzahl Boegen/Weichentypen, Gesamtlaenge AP110/AP60)
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -329,6 +356,8 @@ def process_blocks(blocks, lookup, dbg=None):
|
||||
vf_count = 0
|
||||
gf_count = 0
|
||||
strecke_modul_count = 0
|
||||
separator_count = 0
|
||||
scanner_count = 0
|
||||
|
||||
# Zaehlung fuer die Omniflo-Sum-Zeile (nur Bogen/Weiche/Gerade)
|
||||
cnt_wk = cnt_einzel = cnt_delta = cnt_doppel = cnt_stern = 0
|
||||
@@ -479,6 +508,40 @@ def process_blocks(blocks, lookup, dbg=None):
|
||||
})
|
||||
continue
|
||||
|
||||
# Separator (Separator_SP/S-LP) - eigene TeileArt-Zeile mit laufender
|
||||
# ID (siehe format_sensor_id; kein echtes ID-Attribut am Block, anders
|
||||
# als Kreisel/GF/VF). EXPORTSIVAS schliesst denselben Blockpattern
|
||||
# bewusst aus (siehe export_sivas.py) - dort zaehlt bereits
|
||||
# ANZAHL_SEPARATOR am zugehoerigen Kreisel/GF/VF.
|
||||
if matches_any(bname, BLOCKPATTERNS.get("pattern_separator", [])):
|
||||
elem_nr += 1
|
||||
separator_count += 1
|
||||
items.append({
|
||||
"nr": elem_nr,
|
||||
"teileart": "ILS 2.0 Separator",
|
||||
"teileid": format_sensor_id("SEP", separator_count),
|
||||
"bezeichnung": f"Separator :{separator_count}",
|
||||
"planquadrat": planquadrat_column(block, planquadrat_cfg),
|
||||
"merkmale": build_sensor_merkmale(block),
|
||||
**bbox_columns(block),
|
||||
})
|
||||
continue
|
||||
|
||||
# Scanner - eigene TeileArt-Zeile, sonst analog zu Separator oben.
|
||||
if matches_any(bname, BLOCKPATTERNS.get("pattern_scanner", [])):
|
||||
elem_nr += 1
|
||||
scanner_count += 1
|
||||
items.append({
|
||||
"nr": elem_nr,
|
||||
"teileart": "ILS 2.0 Scanner",
|
||||
"teileid": format_sensor_id("SCN", scanner_count),
|
||||
"bezeichnung": f"Scanner :{scanner_count}",
|
||||
"planquadrat": planquadrat_column(block, planquadrat_cfg),
|
||||
"merkmale": build_sensor_merkmale(block),
|
||||
**bbox_columns(block),
|
||||
})
|
||||
continue
|
||||
|
||||
if has_omniflo:
|
||||
elem_nr += 1
|
||||
items.append({
|
||||
|
||||
@@ -255,6 +255,17 @@ def build_eckrad_details(block):
|
||||
# --- Bekannte Bloecke ignorieren ---
|
||||
SKIP_BLOCKS = set(BLOCKPATTERNS.get("pattern_ks_subblocks", ["K1", "K2", "K3", "K4", "KS_EIN", "KS_AUS"]))
|
||||
|
||||
# Eigenstaendige Separator_SP/S-LP- und Scanner-Bloecke werden von der Lisp-
|
||||
# Sammlung (csv:collect-export-blocks) zwar mit in export_raw.json geschrieben
|
||||
# (export_csv.py gibt ihnen dort eigene TeileArt-Zeilen), aber HIER bewusst
|
||||
# NICHT in eine eigene Sivas-Zeile uebernommen: ihre Stueckzahl wird bereits
|
||||
# ueber die ANZAHL_SEPARATOR/ANZAHL_SCANNER-Attribute des zugehoerigen
|
||||
# Kreisel/GF/VF-Blocks gezaehlt (siehe kreisel_signature/build_*_details
|
||||
# oben) - ein zusaetzlicher eigener Eintrag wuerde doppelt zaehlen.
|
||||
SEP_SCANNER_PATTERNS = (
|
||||
BLOCKPATTERNS.get("pattern_separator", []) + BLOCKPATTERNS.get("pattern_scanner", [])
|
||||
)
|
||||
|
||||
# Sivas-Nummern und Bezeichnungen je ILS-Elementtyp
|
||||
# Hinweis: "ils_kurve", sind aktuell nur
|
||||
# Typnamen-Platzhalter - die zugehoerigen Menuebefehle sind noch Dummies
|
||||
@@ -330,6 +341,10 @@ def process_blocks(blocks, lookup):
|
||||
if bname in SKIP_BLOCKS:
|
||||
continue
|
||||
|
||||
# Separator/Scanner: siehe Kommentar bei SEP_SCANNER_PATTERNS oben.
|
||||
if matches_any(bname, SEP_SCANNER_PATTERNS):
|
||||
continue
|
||||
|
||||
# --- Omniflo Bogen oder Weiche (erkannt via Katalog) ---
|
||||
if bname in lookup:
|
||||
typ, eintrag = lookup[bname]
|
||||
|
||||
Reference in New Issue
Block a user