POT Beispiel korrigiert. Octal Nummerierung eingebaut

This commit is contained in:
2026-02-02 16:48:50 +01:00
parent 18d4f62d24
commit 0f16f1cfba
3 changed files with 23 additions and 4 deletions
+19
View File
@@ -90,6 +90,9 @@ class TestDataGenerator:
{'name': '0', 'color': 7}, # Standard-Layer
{'name': 'ILS_MOTOR', 'color': 7},
{'name': 'ILS_RENAMER', 'color': 1}, # Rot
{'name': 'ILS_Eingang', 'color': 7}, # BG-Symbole
{'name': 'ILS_Ausgang', 'color': 7}, # MB-Symbole
{'name': 'ILS_POT-Erdung', 'color': 7}, # POT-Symbole
{'name': 'VALIDATION_ERROR', 'color': 1}, # Rot für Fehlerkreise
{'name': 'TEXT-D', 'color': -7}, # Ausgeschaltet (negativ)
{'name': 'TEXT-E', 'color': 7},
@@ -604,6 +607,22 @@ class TestDataGenerator:
print("Fehler: io-Block konnte nicht erstellt werden")
return
# Prüfe ob POT-Symbole in der Scene verwendet werden
if self.config and 'test_scenes' in self.config and scene_name in self.config['test_scenes']:
scene = self.config['test_scenes'][scene_name]
if 'pot_groups' in scene and scene['pot_groups']:
print("POT-Symbole erkannt, lade ILS_POT-Erdung Block...")
# Lade POT-Block aus Referenzdatei
pot_reference_file = os.path.join(PROJECT, 'testdata', 'Nummerierung_IO.dxf')
if os.path.exists(pot_reference_file):
pot_block = self.load_block_from_file(pot_reference_file, 'ILS_POT-Erdung')
if pot_block:
print(f"POT-Block 'ILS_POT-Erdung' erfolgreich geladen")
else:
print(f"WARNUNG: POT-Block konnte nicht aus {pot_reference_file} geladen werden")
else:
print(f"WARNUNG: Referenzdatei {pot_reference_file} nicht gefunden")
# Wenn Config geladen ist, verwende sie, ansonsten Hard-coded Defaults
if self.config and 'test_scenes' in self.config and scene_name in self.config['test_scenes']:
print(f"Verwende JSON-Config für {scene_name}...")