{
  "_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": 1300,
          "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": 1850,
          "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": 1200,
          "width": 4000,
          "height": 680,
          "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": "LEFT_RIGHT",
          "x": 400,
          "y": 75,
          "width": 1150,
          "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": 1600,
          "y": 250,
          "width": 4000,
          "height": 680,
          "use_polyline": false
        }
      ]
    },

    "Nummerierung2": {
      "description": "Test-Szene mit zirkulärer Nummerierung des Layouts - 8 MA-1@@ Symbole entlang einer Polyline nummerieren",
      "ma_groups": [
        {
          "name": "MA-1@@_top_left",
          "count": 1,
          "layout_type": "single",
          "base_x": 400,
          "base_y": 2800,
          "spacing": 0
        },
        {
          "name": "MA-1@@_top_right",
          "count": 1,
          "layout_type": "single",
          "base_x": 4800,
          "base_y": 2800,
          "spacing": 0
        },
        {
          "name": "MA-1@@_middle_left",
          "count": 1,
          "layout_type": "single",
          "base_x": 1200,
          "base_y": 1800,
          "spacing": 0
        },
        {
          "name": "MA-1@@_middle_right",
          "count": 1,
          "layout_type": "single",
          "base_x": 3400,
          "base_y": 1800,
          "spacing": 0
        },
        {
          "name": "MA-1@@_bottom_center",
          "count": 1,
          "layout_type": "single",
          "base_x": 2480,
          "base_y": 800,
          "spacing": 0
        },
        {
          "name": "MA-1@@_right_top",
          "count": 1,
          "layout_type": "single",
          "base_x": 6400,
          "base_y": 2400,
          "spacing": 0
        },
        {
          "name": "MA-1@@_right_middle",
          "count": 1,
          "layout_type": "single",
          "base_x": 6400,
          "base_y": 1400,
          "spacing": 0
        },
        {
          "name": "MA-1@@_right_bottom",
          "count": 1,
          "layout_type": "single",
          "base_x": 6080,
          "base_y": 800,
          "spacing": 0
        }
      ],
      "renaming_frames": [
        {
          "comment": "Polyline-Pfad: Verbindet alle MA-1@@ in kreisförmiger Bewegung",
          "type": "polyline_path",
          "name": "MA-1@@",
          "kennzeichnung": "A01+UH00",
          "layer_name": "ILS_MOTOR",
          "direction": "POLYLINE_PATH",
          "path_points": [
            {"x": 400, "y": 2800},
            {"x": 4800, "y": 2800},
            {"x": 6500, "y": 2400},
            {"x": 6500, "y": 1400},
            {"x": 6080, "y": 800},
            {"x": 2480, "y": 800},
            {"x": 3500, "y": 1800},
            {"x": 1200, "y": 1800},
            {"x": 400, "y": 2800}
          ]
        }
      ]
    },

    "BGMG": {
      "description": "Test-Szene mit drei Rechtecken für BG-1@@@ und BG-2@@@ Symbole mit mehreren Layern",
      "bg_groups": [
        {
          "name": "BG-1@@_frame1",
          "count": 1,
          "layout_type": "single",
          "base_x": 700,
          "base_y": 700,
          "spacing": 0
        },
        {
          "name": "BG-1@@_frame2_1",
          "count": 1,
          "layout_type": "single",
          "base_x": 3500,
          "base_y": 2350,
          "spacing": 0
        },
        {
          "name": "BG-1@@_frame2_2",
          "count": 1,
          "layout_type": "single",
          "base_x": 4800,
          "base_y": 2400,
          "spacing": 0
        },
        {
          "name": "BG-1@@_frame2_3",
          "count": 1,
          "layout_type": "single",
          "base_x": 6100,
          "base_y": 2300,
          "spacing": 0
        },
        {
          "name": "MB-1@@_frame2_1",
          "count": 1,
          "layout_type": "single",
          "base_x": 3500,
          "base_y": 2800,
          "spacing": 0
        },
        {
          "name": "MB-1@@_frame2_2",
          "count": 1,
          "layout_type": "single",
          "base_x": 4800,
          "base_y": 2850,
          "spacing": 0
        },
        {
          "name": "MB-1@@_frame2_3",
          "count": 1,
          "layout_type": "single",
          "base_x": 6100,
          "base_y": 2750,
          "spacing": 0
        },
        {
          "name": "BG-2@@_frame3_1",
          "count": 1,
          "layout_type": "single",
          "base_x": 3700,
          "base_y": 700,
          "spacing": 0
        },
        {
          "name": "BG-2@@_frame3_2",
          "count": 1,
          "layout_type": "single",
          "base_x": 5000,
          "base_y": 700,
          "spacing": 0
        },
        {
          "name": "BG-2@@_frame3_3",
          "count": 1,
          "layout_type": "single",
          "base_x": 6300,
          "base_y": 700,
          "spacing": 0
        }
      ],
      "renaming_frames": [
        {
          "comment": "Rahmen 1: Links unten - 1x BG-1@@@ (Polylinie) - Angepasst für left_bottom_corner",
          "name": "BG-1@@",
          "name2": "MB-1@@",
          "kennzeichnung": "",
          "layer_name1": "ILS_Eingang",
          "layer_name2": "ILS_Ausgang",
          "direction": "LEFT_RIGHT",
          "x": 600,
          "y": 500,
          "width": 1610,
          "height": 600,
          "use_polyline": true
        },
        {
          "comment": "Rahmen 2: Rechts oben - 3x BG-1@@@ + 3x MB-1@@@ (Polylinie) - Angepasst für left_bottom_corner",
          "name": "BG-1@@",
          "name2": "MB-1@@",
          "kennzeichnung": "",
          "layer_name1": "ILS_Eingang",
          "layer_name2": "ILS_Ausgang",
          "direction": "LEFT_RIGHT",
          "x": 3400,
          "y": 2100,
          "width": 4310,
          "height": 1150,
          "use_polyline": true
        },
        {
          "comment": "Rahmen 3: Rechts unten - 3x BG-2@@@ (normales Rechteck) - Angepasst für left_bottom_corner",
          "name": "BG-2@@",
          "name2": "MB-2@@",
          "kennzeichnung": "",
          "layer_name1": "ILS_Eingang",
          "layer_name2": "ILS_Ausgang",
          "direction": "LEFT_RIGHT",
          "x": 3600,
          "y": 500,
          "width": 4310,
          "height": 600,
          "use_polyline": false
        }
      ]
    },

    "BGMG-UndefSymbols": {
      "description": "Test-Szene wie BGMB, aber mit nur 2x BG-1@@ Symbolen, um Undefiniert-Symbole zu testen",
      "bg_groups": [
        {
          "name": "BG-1@@@_frame1",
          "count": 5,
          "layout_type": "horizontal",
          "base_x": 1000,
          "base_y": 1000,
          "spacing": 2000
        }
      ],
      "renaming_frames": [
        {
          "comment": "Rahmen: 2x BG-1@@@ (Polylinie) - Angepasst für linke Seite",
          "name": "BG-1@@@",
          "kennzeichnung": "",
          "layer_name1": "ILS_Eingang",
          "direction": "LEFT_RIGHT",
          "x": 800,
          "y": 800,
          "width": 3210,
          "height": 600,
          "use_polyline": true
        },
        {
          "comment": "Rahmen: 2x BG-1@@@ (Polylinie) - Angepasst für rechte Seite",
          "name": "BG-1@@@",
          "kennzeichnung": "",
          "layer_name1": "ILS_Eingang",
          "direction": "LEFT_RIGHT",
          "x": 6500,
          "y": 800,
          "width": 3210,
          "height": 600,
          "use_polyline": true
        }
      ]
    },

    "POT": {
      "description": "Test-Szene für POT-Erdungssymbole mit drei verschiedenen Typen (POT-RA30@@, POT-MA30@@, POT-UC30@@)",
      "pot_groups": [
        {
          "name": "POT-RA30@@_RA",
          "count": 3,
          "layout_type": "horizontal",
          "base_x": 1000,
          "base_y": 3000,
          "spacing": 2500
        },
        {
          "name": "POT-MA30@@_MA",
          "count": 3,
          "layout_type": "horizontal",
          "base_x": 1000,
          "base_y": 2000,
          "spacing": 2500
        },
        {
          "name": "POT-UC30@@_UC",
          "count": 3,
          "layout_type": "horizontal",
          "base_x": 1000,
          "base_y": 1000,
          "spacing": 2500
        }
      ],
      "renaming_frames": [
        {
          "comment": "Rahmen für alle 9 POT-Symbole (3x POT-RA30@@, 3x POT-MA30@@, 3x POT-UC30@@)",
          "name": "POT-RA30@@",
          "name2": "POT-MA30@@",
          "name3": "POT-UC30@@",
          "kennzeichnung": "AH01+UC0101-x",
          "layer_name1": "ILS_POT-Erdung",
          "layer_name2": "ILS_POT-Erdung",
          "layer_name3": "ILS_POT-Erdung",
          "direction": "LEFT_RIGHT",
          "x": 800,
          "y": 800,
          "width": 7200,
          "height": 2800,
          "use_polyline": false
        }
      ]
    }
  },

  "ma_defaults": {
    "_description": "Standard-Werte für MA-Symbole",
    "block_name": "io",
    "layer": "ILS_MOTOR",
    "attributes": {
      "SPS": "1",
      "IO": "MA0000",
      "VERW": "ILS-M03@@",
      "BEZEICHNUNG": "Motor MA0000",
      "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": "",
      "REALE_POSITION": "x"
    },
    "dimensions": {
      "_comment": "Symbol-Dimensionen für Layout-Berechnung. Feste Werte basierend auf IO-Feld Analyse (6 Zeichen MA-1@@: 1210 × 381)",
      "width": 1210,
      "height": 381
    }
  },
  "pot_defaults": {
    "_description": "Standard-Werte für POT-Symbole. Basiert auf Analyse von ILS_POT-Erdung aus Nummerierung_IO.dxf",
    "block_name": "ILS_POT-Erdung",
    "layer": "ILS_POT-Erdung",
    "attributes": {
      "REALE_POSITION": "x",
      "KENNZEICHNUNG": "=A01+UH00-X01",
      "NAME": "POT-1@@@"
    },
    "dimensions": {
      "_comment": "Symbol-Dimensionen für POT-Erdung. Basiert auf Block-Analyse: 816 × 618",
      "width": 1400,
      "height": 300
    },
    "attrib_defs": [
      {
        "tag": "REALE_POSITION",
        "insert": [0.0, 200.0, 0.0],
        "height": 50.0,
        "default": "x",
        "layer": "ILS_POT-Erdung",
        "invisible": false
      },
      {
        "tag": "NAME",
        "insert": [50, 100, 0.0],
        "height": 128.0,
        "default": "POT-1@@@",
        "layer": "ILS_POT-Erdung",
        "invisible": false
      },
      {
        "tag": "KENNZEICHNUNG",
        "insert": [0.0, -150, 0.0],
        "height": 128.0,
        "default": "=A01+UH00-X01",
        "layer": "ILS_POT-Erdung",
        "invisible": true
      }
    ]
  },
  "bg_defaults": {
    "_description": "Standard-Werte für BG/MB-Symbole (Eingänge/Ausgänge). Basiert auf Analyse von BG3240 aus easy.dxf",
    "block_name": "io",
    "layer": "ILS_Eingang",
    "attributes": {
      "SPS": "1",
      "IO": "BG0000",
      "VERW": "Sensor",
      "BEZEICHNUNG": "",
      "ARTIKELNR": "",
      "ARTIKELBEZEICHN": "",
      "KENNZEICHNUNG": "=A01+UC0101",
      "TEXT-D": "",
      "TEXT-E": "",
      "TEXT-ES": "",
      "TEXT-F": "",
      "TEXT-I": "",
      "ID": "",
      "REALE_POSITION": "x"
    },
    "dimensions": {
      "_comment": "Symbol-Dimensionen für BG/MB-Symbole. 7 Zeichen (BG-1@@@): 1410 × 381",
      "width": 1410,
      "height": 381
    }
  },
  "mb_defaults": {
    "_description": "Standard-Werte für MB-Symbole (Ausgänge). Verwendet dieselbe Struktur wie BG, nur anderer Layer",
    "block_name": "io",
    "layer": "ILS_Ausgang",
    "attributes": {
      "SPS": "1",
      "IO": "MB0000",
      "VERW": "Aktor",
      "BEZEICHNUNG": "",
      "ARTIKELNR": "",
      "ARTIKELBEZEICHN": "",
      "KENNZEICHNUNG": "=A01+UC0101",
      "TEXT-D": "",
      "TEXT-E": "",
      "TEXT-ES": "",
      "TEXT-F": "",
      "TEXT-I": "",
      "ID": "",
      "REALE_POSITION": "x"
    },
    "dimensions": {
      "_comment": "Symbol-Dimensionen für MB-Symbole. 7 Zeichen (MB-1@@@): 1410 × 381",
      "width": 1410,
      "height": 381
    }
  },
  "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,
      "insert_point": "left_bottom_corner",
      "_insert_point_description": "Einfügepunkt für MA-Blöcke. Mögliche Werte: left_top_corner, left_bottom_corner, right_top_corner, right_bottom_corner, center, top_center, bottom_center",
      "attdef_positions": {
        "_description": "ATTDEF Positionen im inneren Block RENAMER_ATTRIB_MA",
        "NAME": {
          "x": 10,
          "y": -10,
          "height": 21.25
        },
        "KENNZEICHNUNG": {
          "x": 10,
          "y": -35,
          "height": 21.25
        },
        "LAYER_NAME": {
          "x": 10,
          "y": -60,
          "height": 21.25
        },
        "DIRECTION": {
          "x": 10,
          "y": -85,
          "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": -10,
          "height": 21.25
        },
        "NAME2": {
          "x": 10,
          "y": -45,
          "height": 21.25
        },
        "NAME3": {
          "x": 10,
          "y": -80,
          "height": 21.25
        },
        "KENNZEICHNUNG": {
          "x": 10,
          "y": -115,
          "height": 21.25
        },
        "LAYER_NAME1": {
          "x": 10,
          "y": -150,
          "height": 21.25
        },
        "LAYER_NAME2": {
          "x": 10,
          "y": -185,
          "height": 21.25
        },
        "LAYER_NAME3": {
          "x": 10,
          "y": -220,
          "height": 21.25
        },
        "DIRECTION": {
          "x": 10,
          "y": -255,
          "height": 21.25
        },
        "ID": {
          "x": 10,
          "y": -290,
          "height": 21.25
        }
      },
      "dimensions": {
        "_comment": "Symbol-Dimensionen für Multi-Layer Frames. Feste Werte basierend auf IO-Feld Analyse (7 Zeichen BG-1@@@: 1410 × 381)",
        "width": 1410,
        "height": 381
      }
    },

    "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]
    }
  }
}
