Files
dxfmakros/cfg/hw_symbole.json
T
Michael StanglandClaude Opus 5.5 8abb6b3c65 feat: HW Planung - Symbole erzeugen, Nummerierung, Ausgabeziel-Dialog
- Symbole erzeugen (HW_SYMBOLE, Einzelbefehle HW_SYM_*): Bauteile nach
  cfg/io_regeln.json (reduzierte Kopie aus kabellaengen), Symbole aus
  cfg/hw_symbole.json katalog-identisch nachgebaut (lib/hw_symbole.py),
  REALE_POSITION mit x auf dem Bauteil, Paare uebereinander, Ausweichen
  in y ohne Ueberlappung
- Symbole nummerieren (HW_NUMMERIEREN): lib/create_numbers.py samt
  error_collector.py und cfg/enumerate.cfg aus kabellaengen uebernommen
- Ausgabeziel per Dialog dcl/hw_ausgabe.dcl: aktuelle Zeichnung,
  bestehende Datei ergaenzen oder neue Datei
- Materialfluss mit XDATA SSG_HW_MF, ergaenzt vorhandene Datei
- Doku doc/hw_planung.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 16:39:37 +01:00

221 lines
12 KiB
JSON

{
"_kommentar": "Symboldefinitionen der HW-Planung. lib/hw_symbole.py baut daraus die Blockdefinitionen in der <dwg>_HW.dxf selbst - es gibt keine Symbol-Bibliothek als Referenzdokument. Abgeleitet aus den ILS-Katalogsymbolen in kabellaengen/doc/Symbole/ILS-Symbole.dxf (Stand 2026-11-03); aendert sich dort ein Symbol, hier nachziehen. Welches Symbol an welchem Bauteil sitzt, steht in cfg/io_regeln.json (rollen -> block). Bei jedem Lauf wird die Blockdefinition neu aus dieser Datei aufgebaut.",
"_textstile": "Textstile der Attribute (Name -> Schriftdatei); werden in der _HW.dxf angelegt, falls sie fehlen. Ohne \"stil\" am Attribut gilt standard.",
"textstile": {
"standard": "ARIAL",
"schriften": {"ARIAL": "arial.ttf", "MtXpl_Arial_Narrow": "arialn.ttf"}
},
"_platzierung": "Lage der Symbole in der _HW.dxf (lib/hw_symbole.py, platzieren): die Marke REALE_POSITION jedes Symbols liegt mit ihrem x genau auf dem Bauteil (Sensor, AS/ES-Element, Motor-/Kreiselzentrum), der Kasten daneben; mehrere Symbole eines Bauteils stehen uebereinander (Reihenfolge = benoetigt in cfg/io_regeln.json), als Gruppe um das Bauteil zentriert. Ueberlappt eine Gruppe mit einer schon gesetzten (Rahmen mit Mindestabstand abstand), wird sie in y um +-schritt, +-2*schritt ... bis max_verschiebung verschoben (mm).",
"platzierung": {"abstand": 20.0, "schritt": 50.0, "max_verschiebung": 3000.0},
"_vorlagen": "Gemeinsames Aussehen mehrerer Symbole, uebernommen aus je einem Katalogsymbol (io_750: ILS_Separator-Ausgang, geraet_800: ILS_829624040-Encoder-800). rahmen = [Breite, Hoehe] ab Rahmen-Ecke links unten; attribute = Reihenfolge, Lage (x, y relativ zur Rahmen-Ecke), Texthoehe. Optional je Attribut: unsichtbar, farbe (Zahl; \"symbol\" = Farbe des Symbols, fehlt = VONLAYER), layer (fehlt = Layer des Symbols), ausrichtung (C/R = Grundlinie mittig/rechts, ML/MC/MR = Mitte links/mittig/rechts; fehlt = links), stil, breite (Breitenfaktor), wert (Vorgabe). schraffur = Fuellmuster im Rahmen.",
"vorlagen": {
"io_750": {
"rahmen": [750.0, 270.0],
"attribute": [
{"tag": "SPS", "x": 0.0, "y": 130.4, "hoehe": 125.0, "farbe": "symbol"},
{"tag": "IO", "x": 103.9, "y": 129.2, "hoehe": 125.0, "farbe": "symbol"},
{"tag": "VERW", "x": 27.7, "y": 20.8, "hoehe": 70.0, "farbe": "symbol"},
{"tag": "BEZEICHNUNG", "x": 1.1, "y": -83.8, "hoehe": 60.0, "unsichtbar": true, "farbe": 7},
{"tag": "KENNZEICHNUNG", "x": 1.1, "y": -163.8, "hoehe": 60.0, "unsichtbar": true, "farbe": 7},
{"tag": "ARTINR", "x": 1.1, "y": -248.6, "hoehe": 60.0, "unsichtbar": true, "farbe": 7},
{"tag": "BESCHR", "x": 1.1, "y": -336.9, "hoehe": 60.0, "unsichtbar": true, "farbe": 7},
{"tag": "TEXT-D", "x": 780.4, "y": 190.4, "hoehe": 60.0, "layer": "ILS_Text-D"},
{"tag": "TEXT-E", "x": 772.9, "y": 110.4, "hoehe": 60.0, "layer": "ILS_Text-E"},
{"tag": "TEXT-ES", "x": 780.4, "y": 30.4, "hoehe": 60.0, "layer": "ILS_Text-ES"},
{"tag": "TEXT-F", "x": 780.4, "y": 30.4, "hoehe": 60.0, "layer": "ILS_Text-F"},
{"tag": "TEXT-IT", "x": 780.4, "y": 30.4, "hoehe": 60.0, "layer": "ILS_Text-IT"},
{"tag": "TEXT-CS", "x": 780.4, "y": 30.4, "hoehe": 60.0, "layer": "ILS_Text-CS"},
{"tag": "ID", "x": 371.2, "y": 0.0, "hoehe": 80.0, "unsichtbar": true, "farbe": 7},
{"tag": "REALE_POSITION", "x": 750.0, "y": 135.0, "hoehe": 50.0, "farbe": 7, "ausrichtung": "MR", "wert": "x"}
]
},
"geraet_800": {
"rahmen": [800.0, 350.0],
"attribute": [
{"tag": "SPS", "x": 0.0, "y": 244.1, "hoehe": 140.0, "farbe": "symbol", "ausrichtung": "ML", "stil": "MtXpl_Arial_Narrow"},
{"tag": "IO", "x": 400.0, "y": 244.1, "hoehe": 140.0, "farbe": "symbol", "ausrichtung": "MC", "stil": "MtXpl_Arial_Narrow"},
{"tag": "VERW", "x": 400.0, "y": 77.2, "hoehe": 100.0, "farbe": "symbol", "ausrichtung": "MC", "breite": 0.8},
{"tag": "KENNZEICHNUNG", "x": 10.3, "y": -253.8, "hoehe": 60.0, "unsichtbar": true, "farbe": 7},
{"tag": "ARTINR", "x": 10.3, "y": -88.9, "hoehe": 60.0, "unsichtbar": true, "farbe": 7},
{"tag": "BESCHR", "x": 10.3, "y": -173.8, "hoehe": 60.0, "unsichtbar": true, "farbe": 7},
{"tag": "ID", "x": 0.0, "y": 0.0, "hoehe": 80.0, "unsichtbar": true, "farbe": 7},
{"tag": "REALE_POSITION", "x": 800.0, "y": 175.0, "hoehe": 50.0, "farbe": 7, "ausrichtung": "MR", "wert": "x"}
],
"schraffur": {"muster": "INSULATION", "massstab": 0.25}
}
},
"_symbole": "Blockname -> vorlage, layer, farbe (fuer Attribute mit farbe \"symbol\"), versatz (Lage der Rahmen-Ecke zum Einfuegepunkt: Eingaenge/Motoren haengen im Katalog nach unten, [0, -270]), attribute (Abweichungen von der Vorlage je Tag), ohne (Vorlagen-Attribute, die dieses Symbol nicht hat), schraffur_layer/-farbe, werte. IO traegt die Platzhalter-ID (z.B. MB0): hw_symbole.py ersetzt sie in IO, VERW und BEZEICHNUNG durch die ID-Vorlage aus cfg/io_regeln.json (z.B. MB1@@@). Umlaute als \\u-Escape, damit die Datei ASCII bleibt.",
"symbole": {
"ILS_Separator-Ausgang": {
"vorlage": "io_750",
"layer": "ILS_Ausgang",
"farbe": 3,
"werte": {"SPS": "1", "IO": "MB0", "VERW": "Sep", "BEZEICHNUNG": "Separator ILS-VARIO (MA0)", "KENNZEICHNUNG": "=A01+UC0000-KF1DQ1", "ARTINR": "929012603", "BESCHR": "WEGEVENT.5/2 MONOSTABIL SY5120-5WAOU-C6F-Q"}
},
"ILS_Weiche-Abzweig-Ausgang": {
"vorlage": "io_750",
"layer": "ILS_Ausgang",
"farbe": 3,
"versatz": [0.0, -0.7],
"attribute": {
"IO": {"y": 130.4},
"VERW": {"x": 27.0},
"BEZEICHNUNG": {"x": 2.0, "y": -91.2},
"KENNZEICHNUNG": {"x": 2.0, "y": -171.2},
"ARTINR": {"x": 2.0, "y": -247.8},
"BESCHR": {"x": 2.0, "y": -327.8},
"TEXT-E": {"y": 111.2},
"TEXT-IT": {"layer": "TEXT-IT"},
"ID": {"x": 0.0, "y": 0.7}
},
"werte": {"SPS": "1", "IO": "MB0", "VERW": "Weiche Abzweig", "BEZEICHNUNG": "Weiche Abzweig ILS-VARIO", "KENNZEICHNUNG": "=A01+UC0000-KF1DQ1", "ARTINR": "929012603", "BESCHR": "WEGEVENT.5/2 MONOSTABIL SY5120-5WAOU-C6F-Q"}
},
"ILS_720002003-Separator": {
"vorlage": "io_750",
"layer": "ILS_Eingang",
"farbe": 6,
"versatz": [0.0, -270.0],
"attribute": {
"VERW": {"x": 17.0},
"BEZEICHNUNG": {"x": -5.7, "y": -83.0},
"KENNZEICHNUNG": {"x": -5.7, "y": -171.3},
"ARTINR": {"x": -5.7, "y": -258.1},
"BESCHR": {"x": -5.7, "y": -338.1}
},
"werte": {"SPS": "1", "IO": "BG0", "VERW": "In Sep", "BEZEICHNUNG": "in Separator ILS-VARIO (MA0)", "KENNZEICHNUNG": "=A01+UC0000-KF1DI1", "ARTINR": "720002003", "BESCHR": "Sensor Induk. M18x1, SA=12mm N-B\u00dc/NO, Kabel-150mm"}
},
"ILS_720002011-Rad dreht": {
"vorlage": "io_750",
"layer": "ILS_Eingang",
"farbe": 6,
"attribute": {
"IO": {"y": 130.4},
"VERW": {"x": 23.0},
"BEZEICHNUNG": {"x": 0.0, "y": -67.0},
"KENNZEICHNUNG": {"x": 0.0, "y": -147.0},
"ARTINR": {"x": 0.0, "y": -227.0},
"BESCHR": {"x": 0.0, "y": -307.0},
"TEXT-IT": {"farbe": 7},
"ID": {"x": 0.0, "y": 0.7}
},
"werte": {"SPS": "1", "IO": "BG0", "VERW": "Rad dreht", "BEZEICHNUNG": "Rad dreht ILS-KR (MA0)", "KENNZEICHNUNG": "=A01+UC0000-KF1DI1", "ARTINR": "720002011", "BESCHR": "Sensor Induk. M18 8mm b\u00fcndig/PNP-NO/ST M12"}
},
"ILS_200000375-Finger in Position": {
"vorlage": "io_750",
"layer": "ILS_Eingang",
"farbe": 6,
"attribute": {
"SPS": {"x": 10.0},
"IO": {"y": 130.4},
"VERW": {"x": 29.3, "breite": 0.85},
"BEZEICHNUNG": {"x": -1.0, "y": -67.0},
"KENNZEICHNUNG": {"x": -1.0, "y": -149.7},
"ARTINR": {"x": -1.0, "y": -239.4},
"BESCHR": {"x": -1.0, "y": -319.4},
"TEXT-F": {"layer": "TEXT-F"},
"TEXT-IT": {"farbe": 7},
"ID": {"x": 400.0, "ausrichtung": "R"}
},
"werte": {"SPS": "1", "IO": "BG0", "VERW": "Finger in Position", "BEZEICHNUNG": "Finger in Position", "KENNZEICHNUNG": "=A01+UC0000-KF1DI1", "ARTINR": "200000375", "BESCHR": "Halter mit Sensor f\u00fcr Abfrage VARIO Finger"}
},
"ILS_200000248-PC in Position": {
"vorlage": "io_750",
"layer": "ILS_Eingang",
"farbe": 6,
"attribute": {
"VERW": {"x": 18.4},
"BEZEICHNUNG": {"x": 0.0, "y": -67.0},
"KENNZEICHNUNG": {"x": 0.0, "y": -147.0},
"ARTINR": {"x": 0.0, "y": -227.0},
"BESCHR": {"x": 0.0, "y": -307.0},
"ID": {"x": 375.0}
},
"werte": {"SPS": "1", "IO": "BG0", "VERW": "PC in Position", "BEZEICHNUNG": "PC in Position (MA0)", "KENNZEICHNUNG": "=A01+UC0000-KF1DI1", "ARTINR": "200000248", "BESCHR": "Lichttaster LP+SP als Staumelder"}
},
"ILS_Motorschutz": {
"vorlage": "io_750",
"layer": "ILS_Eingang",
"ohne": ["ARTINR", "BESCHR"],
"attribute": {
"IO": {"y": 130.4},
"VERW": {"x": 21.4},
"BEZEICHNUNG": {"x": -10.1, "y": -67.0},
"KENNZEICHNUNG": {"x": -10.1, "y": -155.3},
"TEXT-E": {"x": 780.4},
"ID": {"x": 375.0}
},
"werte": {"SPS": "1", "IO": "FC0", "VERW": "MS FC0", "BEZEICHNUNG": "MSS ausgel\u00f6st FC0", "KENNZEICHNUNG": "=A01+UH01-KF1DI1"}
},
"ILS_Motor-400102811-Kreisel": {
"vorlage": "io_750",
"layer": "ILS_Motor",
"versatz": [0.0, -270.0],
"attribute": {
"IO": {"y": 130.4},
"VERW": {"x": 6.9, "breite": 0.9},
"BEZEICHNUNG": {"x": 0.0, "y": -79.3},
"KENNZEICHNUNG": {"x": 0.0, "y": -171.6},
"ARTINR": {"x": 0.0, "y": -250.7},
"BESCHR": {"x": 0.0, "y": -334.5},
"ID": {"x": 375.0}
},
"werte": {"SPS": "1", "IO": "MA0", "VERW": "ILS-KR-MA0", "BEZEICHNUNG": "Motor ILS-KR-MA0", "KENNZEICHNUNG": "=A01+UH01-KF1FDQ1", "ARTINR": "400102811", "BESCHR": "Kegelradgetriebemotor KF47 DRN80MK4/ASE1/Z Pos.1"}
},
"ILS_Motor-200000020-VARIO-links": {
"vorlage": "io_750",
"layer": "ILS_Motor",
"versatz": [0.0, -270.0],
"attribute": {
"IO": {"y": 130.4},
"VERW": {"x": 6.9, "breite": 0.85},
"BEZEICHNUNG": {"x": 0.0, "y": -90.5},
"KENNZEICHNUNG": {"x": 0.0, "y": -182.8},
"ARTINR": {"x": 0.0, "y": -278.8},
"BESCHR": {"x": 0.0, "y": -362.6},
"TEXT-E": {"x": 780.4},
"ID": {"x": 375.0}
},
"werte": {"SPS": "1", "IO": "MA0", "VERW": "ILS-VARIO-0,55kW", "BEZEICHNUNG": "Motor MA0", "KENNZEICHNUNG": "=A01+UH01-KF1FDQ1", "ARTINR": "200000020", "BESCHR": "Schneckengetriebem. SA57 DRN80MK4/ASE1 VARIO LI 0,55 KW, v=29 bei 50Hz, links"}
},
"ILS_Motor-200000021-VARIO-rechts": {
"vorlage": "io_750",
"layer": "ILS_Motor",
"versatz": [0.0, -270.0],
"attribute": {
"IO": {"y": 130.4},
"VERW": {"x": 6.9, "breite": 0.85},
"BEZEICHNUNG": {"x": 0.0, "y": -90.5},
"KENNZEICHNUNG": {"x": 0.0, "y": -182.8},
"ARTINR": {"x": 0.0, "y": -278.8},
"BESCHR": {"x": 0.0, "y": -362.6},
"TEXT-E": {"x": 780.4},
"ID": {"x": 375.0}
},
"werte": {"SPS": "1", "IO": "MA0", "VERW": "ILS-VARIO-0,55kW", "BEZEICHNUNG": "Motor MA0", "KENNZEICHNUNG": "=A01+UH01-KF1FDQ1", "ARTINR": "200000021", "BESCHR": "Schneckengetriebem. SA57 DRN80MK4/ASE1 VARIO RE 0,55 KW, v=29 bei 50Hz, rechts"}
},
"ILS_829624040-Encoder-800": {
"vorlage": "geraet_800",
"layer": "ILS_Encoder-800",
"farbe": 1,
"werte": {"IO": "GF0", "VERW": "192.168.1.100", "KENNZEICHNUNG": "=A01+UH01-KF1DQ1", "ARTINR": "829624040", "BESCHR": "Encoder f\u00fcr ILS 2.0 Rad-800"}
},
"ILS_Scanner-829534306": {
"vorlage": "geraet_800",
"layer": "ILS_Scanner",
"schraffur_layer": "0",
"schraffur_farbe": 40,
"attribute": {
"SPS": {"y": 254.4, "hoehe": 125.0, "stil": null},
"IO": {"y": 254.4, "hoehe": 150.0},
"VERW": {"y": 81.3},
"KENNZEICHNUNG": {"x": -1.0, "y": -245.7},
"ARTINR": {"x": -1.0, "y": -85.7},
"BESCHR": {"x": -1.0, "y": -165.7},
"ID": {"x": 450.0, "ausrichtung": "R"},
"REALE_POSITION": {"y": 135.0}
},
"werte": {"IO": "BX0", "VERW": "192.168.1.100", "KENNZEICHNUNG": "=A01+UH01-KF1FDQ1", "ARTINR": "829534306", "BESCHR": "Camera DM280 m. Halter (ILS) - BG"}
}
}
}