From d55d71d6238aa8934883e3cd8b1db40a23b95960 Mon Sep 17 00:00:00 2001 From: mistangl Date: Fri, 23 Jan 2026 15:39:52 +0100 Subject: [PATCH] =?UTF-8?q?Config=20f=C3=BCr=20Testerzeugung=20ins=20json?= =?UTF-8?q?=20Format,=20da=20Hierarchien=20einfacher=20verwaltet=20werden?= =?UTF-8?q?=20k=C3=B6nnen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cfg/create_tests.json | 204 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 204 insertions(+) create mode 100644 cfg/create_tests.json diff --git a/cfg/create_tests.json b/cfg/create_tests.json new file mode 100644 index 0000000..600fb2a --- /dev/null +++ b/cfg/create_tests.json @@ -0,0 +1,204 @@ +{ + "_description": "Konfiguration für create_example.py zur Erzeugung von Test-DXF-Dateien", + + "test_scenes": { + "Nummerierung1": { + "description": "Test-Szene für automatische Nummerierung von MA-Symbolen mit Renamer-Rahmen", + "ma_groups": [ + { + "name": "MA-1@@_top", + "count": 3, + "layout_type": "horizontal", + "base_x": 1500, + "base_y": 1000, + "spacing": 1450 + }, + { + "name": "MA-1@@_bottom", + "count": 1, + "layout_type": "single", + "base_x": 500, + "base_y": 200, + "spacing": 0 + }, + { + "name": "MA-2@@_bottom", + "count": 3, + "layout_type": "horizontal_offset", + "base_x": 1500, + "base_y": 400, + "spacing": 1450 + } + ], + "renaming_frames": [ + { + "comment": "Rahmen 1: Rechts oben - umschließt 3x MA-1@@", + "name": "MA-1@@", + "kennzeichnung": "A01+UH00", + "layer_name": "ILS_MOTOR", + "direction": "LEFT_RIGHT", + "x": 1400, + "y": 1100, + "width": 3600, + "height": 580, + "use_polyline": false + }, + { + "comment": "Rahmen 2: Links unten - umschließt 1x MA-1@@, schmaler Rahmen mit Polylinie", + "name": "MA-1@@", + "kennzeichnung": "A01+UH00", + "layer_name": "ILS_MOTOR", + "direction": "TOP_BOTTOM/LEFT_RIGHT", + "x": 450, + "y": 150, + "width": 1400, + "height": 480, + "use_polyline": true + }, + { + "comment": "Rahmen 3: Rechts unten - umschließt 3x MA-2@@, mit Extra-Höhe für vertikale Offsets", + "name": "MA-2@@", + "kennzeichnung": "A01+UH00", + "layer_name": "ILS_MOTOR", + "direction": "TOP_BOTTOM", + "x": 1400, + "y": 250, + "width": 3600, + "height": 680, + "use_polyline": false + } + ] + } + }, + + "ma_defaults": { + "_description": "Standard-Werte für MA-Symbole", + "block_name": "io", + "layer": "ILS_MOTOR", + "attributes": { + "SPS": "1", + "VERW": "Motor", + "ARTIKELNR": "790902001", + "ARTIKELBEZEICHN": "E-Teile für SEW Motor ASE1-HAN10ES-BG", + "KENNZEICHNUNG": "=A01+UH00", + "REALE_POSITION": "x", + "TEXT-D": "", + "TEXT-E": "", + "TEXT-ES": "", + "TEXT-F": "", + "TEXT-I": "", + "ID": "" + }, + "dimensions": { + "_comment": "Symbol-Dimensionen für Layout-Berechnung. Basiert auf Analyse: ~201.49 Einheiten Breite pro Zeichen, 380.94 Einheiten Höhe", + "width_per_char": 201.49, + "fixed_height": 380.94 + } + }, + + "general": { + "_description": "Allgemeine Frame-Attribute und Einstellungen. Renamer Frame Struktur (zweistufig): Äußerer Block mit LWPOLYLINE (umschließender Rahmen), Innerer Block mit ATTDEF (NAME, KENNZEICHNUNG, LAYER_NAME, DIRECTION)", + + "ma_frame": { + "_description": "MA Frame-Typ Attribute (einfache Frames für MA, MG, etc.)", + "layer": "ILS_RENAMER", + "color": 1, + "attdef_positions": { + "_description": "ATTDEF Positionen im inneren Block RENAMER_ATTRIB_MA", + "NAME": { + "x": 10, + "y": 50, + "height": 21.25 + }, + "KENNZEICHNUNG": { + "x": 10, + "y": 20, + "height": 21.25 + }, + "LAYER_NAME": { + "x": 10, + "y": 0, + "height": 21.25 + }, + "DIRECTION": { + "x": 10, + "y": -80, + "height": 21.25 + } + } + }, + + "multi_frame": { + "_description": "MULTI Frame-Typ Attribute (für BG/MG/POT mit mehreren Layern)", + "layer": "ILS_RENAMER", + "color": 1, + "attdef_positions": { + "_description": "ATTDEF Positionen im inneren Block RENAMER_ATTRIB_MULTI", + "NAME1": { + "x": 10, + "y": 80, + "height": 21.25 + }, + "NAME2": { + "x": 10, + "y": 60, + "height": 21.25 + }, + "NAME3": { + "x": 10, + "y": 40, + "height": 21.25 + }, + "KENNZEICHNUNG": { + "x": 10, + "y": 20, + "height": 21.25 + }, + "LAYER_NAME1": { + "x": 10, + "y": -20, + "height": 21.25 + }, + "LAYER_NAME2": { + "x": 10, + "y": -40, + "height": 21.25 + }, + "LAYER_NAME3": { + "x": 10, + "y": -60, + "height": 21.25 + }, + "DIRECTION": { + "x": 10, + "y": -80, + "height": 21.25 + }, + "ID": { + "x": 10, + "y": -100, + "height": 21.25 + } + } + }, + + "textstyle": { + "attrib_textstyle": "textstyle3", + "attrib_color": 1 + }, + + "inner_block_position": { + "_description": "Innerer Block Insert-Position (relativ zum äußeren Block)", + "x": 10, + "y_offset_from_top": 30 + }, + + "layout": { + "_description": "Frame-Padding (Abstand zwischen Symbol und Rahmen), Symbol-Spacing (Abstand zwischen Symbolen in Gruppen)", + "frame_padding": 100, + "frame_padding_small": 50, + "symbol_spacing_factor": 1.2, + "horizontal_offset_y_offsets": [0, -50, 50] + } + } +}