977b5c826e
Takes the original DXF, the CSV export and the derived TROs and writes a copy of the drawing with the TRO information overlaid. The original is never touched. Per TRO a block marker with attributes, not loose geometry: one block definition per type (TRO_SYM_<type>), inserted at the plant coordinate, carrying TRO_ID, TRO_TYPE, FB_BLOCK visibly and ITEMS, CONFIDENCE, SEPARATORS as hidden data. That makes the result queryable and editable inside BricsCAD, and a corrected TRO_ID can later feed back into the generator. Layers follow the colour groups of tro_catalog (TRO_MARKER_sep, _vario, _store, ...) with the group colour as true colour and entities BYLAYER, so the layer manager filters by TRO type. Flow arrows and the legend get their own layers. Re-runs are idempotent through XDATA, not layer names: every generated entity is tagged with the SPS_SKEL_TRO appid and a re-run deletes exactly those. Deleting by layer would also destroy anything a user had put on the same layer. Switches follow the other tools; --check reports the registration and what would be drawn without writing, --flow adds the TRO-level arrows, --fb shows the function block, --offset and --re-register override the stored transform. DWG is rejected with a clear message since ezdxf cannot read it. Verified against the real 23.8 MB drawing: 9 markers on the correct layers with readable attributes, 15 flow arrows, and a re-run replaces its own 46 entities instead of duplicating them. Adds ezdxf to requirements and stores the verified Mubea transform in cfg/. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
14 lines
321 B
Plaintext
14 lines
321 B
Plaintext
# Python-Abhaengigkeiten
|
|
# Installieren mit: pip install -r requirements.txt
|
|
|
|
pydantic >= 2.0.0
|
|
|
|
# DXF lesen und schreiben (tro_annotate). DWG wird nicht unterstuetzt.
|
|
ezdxf >= 1.4.0
|
|
|
|
# Nur fuer Vorschaubilder eines DXF (ezdxf.addons.drawing) - optional:
|
|
# matplotlib >= 3.8
|
|
|
|
# Noch nicht benoetigt:
|
|
# pytest >= 9.0.0
|