tro_annotate: Lagebezug ueber die TeileId, Ablaufbeschreibung CSV/DXF -> SCL
dxf_registration.derive_from_ids: Zeichnungen aus dxfmakros tragen an jedem Layout-Block das Attribut ID = TeileId des CSV. tro_annotate paart CSV- Separatoren mit den Separator-Bloecken gleicher ID (sonst Scanner) und nimmt den Median-Versatz - eindeutig statt Abstimmung, bei jedem Lauf neu, gilt auch fuer eine verschobene Kopie der Zeichnung. Vorrang vor abgelegtem und abgestimmtem Bezug; --offset bleibt. Parameter id_spread_mm, id_min_share in cfg/parameter.ini [dxf_registration]. Dematic: gemeinsame Zeichnung 0/0, Mechanik-Zeichnung dematic.dxf +466,1/-163549,3 mm. Die Abstimmung rastete vorher auf den Scanner-Bloecken ein (Einfuegepunkt 360 mm neben der CSV-Position) und lag 360 mm daneben. Gesperrte Ausgabedatei (in BricsCAD geoeffnet) gibt eine Meldung statt Traceback. Neu: doc/Workflow_CSV_DXF_to_SCL.md - der ganze Ablauf vom CSV-Export und der Zeichnung bis zur SCL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+17
-8
@@ -437,9 +437,10 @@ new shapes — a type with no prior annotated instance in the drawing must be
|
||||
run through this tool at least once first.
|
||||
|
||||
CSV and DXF live in different coordinate systems; the offset between them is
|
||||
handled by `dxf_registration.py` — derived once, verified on every run, and
|
||||
cached per CSV/DXF filename pair in `%SKEL_CFG%\dxf_registration.json` unless
|
||||
overridden.
|
||||
handled by `dxf_registration.py`: by TeileId when the drawing's blocks carry
|
||||
`ID` attributes (see "Registration by TeileId" below), otherwise derived once,
|
||||
verified on every run, and cached per CSV/DXF filename pair in
|
||||
`%SKEL_CFG%\dxf_registration.json` unless overridden.
|
||||
|
||||
| Switch | Argument | Default | Meaning |
|
||||
|---|---|---|---|
|
||||
@@ -483,11 +484,19 @@ 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`.
|
||||
**Registration by TeileId (since 2026-10-23).** Drawings built with
|
||||
dxfmakros carry the attribute `ID` on every layout block — the same number the
|
||||
CSV lists as `TeileId`. Unless `--offset` is given, `tro_annotate` first
|
||||
pairs CSV separators with the separator blocks of the same ID
|
||||
(`dxf_registration.derive_from_ids`; scanners if there are fewer than
|
||||
`min_inliers` separators) and takes the median offset. That is an exact
|
||||
pairing, not a vote, and is recomputed on every run (not stored), so it also
|
||||
fits a moved copy of the drawing. Only if no role has enough consistent pairs
|
||||
(`id_spread_mm`, `id_min_share` in `cfg/parameter.ini [dxf_registration]`)
|
||||
does the stored / voted registration below apply. Dematic: the merged drawing
|
||||
gives exactly 0 / 0, the mechanical-only `dematic.dxf` +466.1 / −163 549.3 mm.
|
||||
Before, the vote locked onto the scanner blocks (insert point 360 mm off their
|
||||
CSV position) and was 360 mm wrong on both.
|
||||
|
||||
**Exit codes:** `0` ok · `1` input/CLI error · `4` coordinate registration
|
||||
could not be proven (or its residual error exceeds 600 mm) — resolve with
|
||||
|
||||
Reference in New Issue
Block a user