Files
sps_skel/cfg/dxf_registration.json
T
s.ayadi 977b5c826e Add TRO annotation tool writing an annotated copy of the drawing
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>
2026-07-30 15:39:54 +02:00

31 lines
1.0 KiB
JSON

{
"mubea.csv|500573_60_1.dxf": {
"dx": 50905.678327433096,
"dy": 8414.490373798908,
"rotation": 0.0,
"source": "auto",
"anchor": "20 exakte Treffer (<= 50 mm) ueber die Rollen Scanner:4, Separator:31; 20 Stimmen im 100-mm-Raster, 6 Kandidaten geprueft",
"matched": 34,
"candidates": 35,
"residual_max": 452.04557170439375,
"residual_mean": 102.6006793267277,
"csv_file": "mubea.csv",
"dxf_file": "500573_60_1.dxf",
"created": "2026-07-30 15:32"
},
"mubea.csv|Mubea.dxf": {
"dx": 50905.67832743315,
"dy": 8454.490373798795,
"rotation": 0.0,
"source": "auto",
"anchor": "14 exakte Treffer (<= 50 mm) ueber die Rollen Scanner:4, Separator:31; 14 Stimmen im 100-mm-Raster, 6 Kandidaten geprueft; ACHTUNG mehrdeutig - Kandidat 2 hat ebenfalls 14 exakte Treffer (Restfehler 0.0 mm)",
"matched": 27,
"candidates": 35,
"residual_max": 544.8224945439861,
"residual_mean": 122.81360370388875,
"csv_file": "mubea.csv",
"dxf_file": "Mubea.dxf",
"created": "2026-07-30 15:38"
}
}