HundM05-Testfall und DXF-Analyse-Skripte

- lib/dxf_scan_components.py: erkennt ILS-/Omniflo-Komponenten in fremden
  Projektzeichnungen und schreibt sie im Testdaten-JSON-Schema aus
- lib/dxf_abbild.py: getreue Abbildung der Bauteile einer Fremdzeichnung
  (Attribute, Weltkoordinaten, Unterkomponenten) ohne Interpretation
- tests/test_hundm05.{lsp,py}, testdata/hundm05.json, conftest-Fixtures und
  alltests.json-Eintrag fuer den Kreisel-Abschnitt aus ST500592_05.dxf
- menu: TEST_HUNDM05 im Testmenue, Connection_Insert/Edit in SSG_LIB.cui
- Doku: hartkodierte Pfade durch (getenv "DXFMAKRO") ersetzt

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-24 12:10:58 +02:00
parent e91608d7cc
commit 7242e815f8
15 changed files with 3112 additions and 63 deletions
+34
View File
@@ -187,3 +187,37 @@ def mubea_dxf():
if not os.path.exists(path):
pytest.skip("mubea_tests.dxf nicht vorhanden - TESTRUN (save:dxf) in BricsCAD ausfuehren")
return ezdxf.readfile(path)
# --- HundM05 Fixtures ---
@pytest.fixture
def hundm05_testdata():
"""Laedt die HundM05-Testdefinitionen aus testdata/hundm05.json.
Erzeugt von lib/dxf_scan_components.py aus results/ST500592_05.dxf
(Fenster 216000 144000 228000 156000, Kreisel-Abschnitt).
"""
path = os.path.join(_testdata_dir(), "hundm05.json")
return _load_json(path)
@pytest.fixture
def hundm05_results():
"""Laedt die HundM05-Ergebnisse aus output/hundm05_results.json."""
path = os.path.join(_output_dir(), "hundm05_results.json")
if not os.path.exists(path):
pytest.skip("hundm05_results.json nicht vorhanden - TEST_HUNDM05 in BricsCAD ausfuehren")
data = _load_json(path)
if not data:
pytest.skip("hundm05_results.json ist leer")
return data
@pytest.fixture
def hundm05_dxf():
"""Laedt die erzeugte HundM05-DXF aus output/hundm05_tests.dxf."""
path = os.path.join(_output_dir(), "hundm05_tests.dxf")
if not os.path.exists(path):
pytest.skip("hundm05_tests.dxf nicht vorhanden - TESTRUN (save:dxf) in BricsCAD ausfuehren")
return ezdxf.readfile(path)