tro_annotate --anlage: Staubereiche in der Zeichnung, --read-jams zurueck

Mit --anlage <csv>_anlage.json zeichnet tro_annotate je Staubereich einen
Block JAM_AREA (Layer TRO_JAM): Rechteck mit dem Namen Jam<NNNN>_<k> wie in
der SCL, jam_versatz vor dem Separator Richtung Vorgaenger. Attribute
CONVEYOR, NUMBER, TRO + ENTRY (stabiler Schluessel), AREA, AUTO. Doppelklick
oeffnet den Dialog JAM_EDIT (dxfmakros).

--read-jams uebernimmt im Dialog geaenderte Nummern aus der beschrifteten
Zeichnung nach cfg/<csv>_jam_names.ini (nur Abweichungen von AUTO);
scl_skeleton wendet die Datei mit der Anlagen-JSON an (scl_context:
jam_numbers + Korrekturen, load/save_jam_overrides).

Dematic: 25 Staubereiche gezeichnet; Rundreise TRO20 -> Jam0054_9 bis in die
SCL geprueft. Gemeinsame Zeichnung mit --offset 0,0 beschriften (automatischer
Lagebezug waehlte dy +360 mm).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 12:47:11 +02:00
parent 404d500271
commit e5d1fce41f
7 changed files with 540 additions and 17 deletions
+26
View File
@@ -456,6 +456,26 @@ overridden.
| `--re-register` | — | off | Re-derive the coordinate offset even if a verified one is already cached in `%SKEL_CFG%`. |
| `--check` | — | off | Dry run: only analyze and report, write no output file. |
| `--emit-lisp` | — | off | Regenerate `cad/tro_types.lsp` (the type list for the `TRO_INSERT`/`TRO_EDIT` dialogs) from `tro_catalog.py` and exit — no `--dxf` needed. Written under `%DXFM_LISP%` if set (next to the `dxfmakros` SSG_LIB modules that provide the dialogs), otherwise under `<SPS_SKEL>/cad`. |
| `--anlage` | `NAME` | — | Plant JSON (`<csv>_anlage.json` from `merge_hw_layout`, in `%SKEL_RESULTS%` or a path): also draw the **jam areas** (see below). Must belong to the same CSV. |
| `--read-jams` | `[DXF]` | `<csv>_annotated.dxf` | Read the jam-area numbers edited in BricsCAD back from the annotated drawing (saved as DXF) into `%SKEL_CFG%\<csv>_jam_names.ini`, then exit — no `--dxf` needed. |
**Jam areas (`--anlage`).** One block `JAM_AREA` per jam area of the plant
JSON on layer `TRO_JAM`: a small rectangle with the name inside
(`Jam0054_3`, the same name the SCL uses — `scl_context.jam_numbers` plus the
corrections file). It sits `jam_versatz` mm (`cfg/parameter.ini
[tro_annotate]`) in front of its separator, towards the predecessor TRO,
where the carriers wait. Hidden attributes: `CONVEYOR` (NNNN), `NUMBER` (k),
`TRO` + `ENTRY` (the stable key, `scl_context.jam_key`), `AREA` (J0039) and
`AUTO` (the derived NNNN_k). A jam area without a conveyor shows
`Jam????_?`. Double-click opens the dialog **`JAM_EDIT`** (dxfmakros:
`Lisp/Jam_Edit.lsp`, `dcl/jam_edit.dcl`, dispatched by `SSG_BLOCKEDIT` on
`JAM_*`): conveyor and running number, a button to go back to the derived
value, and a warning if the name already exists. The dialog only changes the
drawing; `--read-jams` takes every block whose `CONVEYOR_NUMBER` differs from
`AUTO` into `<csv>_jam_names.ini` (`[jam] TRO17.1 = 0054_3`) and drops entries
that are back at `AUTO`. `scl_skeleton` with a plant JSON reads that file, and
the next `--anlage` run draws it, so drawing, file and SCL agree. Invalid
values (conveyor not four digits, number < 1) are reported and skipped.
Layers always carry the prefix `TRO_`. Like `tro_flow.py`, it never reads
`cfg/tro_overrides.ini`, so the markers always match the flow diagram.
@@ -463,6 +483,12 @@ Layers always carry the prefix `TRO_`. Like `tro_flow.py`, it never reads
**Output** (in `%SKEL_RESULTS%`, unless `--check`): `<name>_annotated.dxf`,
`<name>_registration.json` (the coordinate transform used, with its proof).
**Merged drawing (Dematic).** The automatic registration only sees the
top-level 3D blocks and their insert points, which sit up to ~360 mm away
from the CSV positions; on `dematic_merge..dxf` it chose a wrong dy = +360 mm
(18/59 points). CSV and merged drawing share coordinates, so annotate with
`--offset 0,0`.
**Exit codes:** `0` ok · `1` input/CLI error · `4` coordinate registration
could not be proven (or its residual error exceeds 600 mm) — resolve with
`--offset`.