feat(understand): drawing_understand - units, extents, clusters, layers, tags, rooms

A drawing somebody else made, read back as one report in which every
claim carries its evidence and a confidence; the drawing is never
modified.

- units.py: $INSUNITS against the unit the geometry implies (text
  heights, wall thickness, door swings, labelled room areas, overall
  size). The header is overruled only when the evidence outweighs it,
  and then with a warning that quotes the numbers. Robust extents grow
  from the quartile box of entity centres; what never joins is an
  outlier, named by handle.
- clusters.py: separate bodies of model-space content by raster,
  8-connectivity and box absorption - two copies of one plan are two
  clusters.
- describe.py: layers with drawn length and the vocabulary's meaning
  (name keyword, else the texts on the layer), equipment tags (one tag
  lettered twice beside its symbol merged, repeats flagged ambiguous),
  room labels in the wall-layer faces of engineering.arch.faces, text
  languages by character class, blocks, layouts, the title block.
- server.py opens SECTION 26 (Understanding & QA) with
  drawing_understand: core, read-only, tagged analysis/query. Alias
  record, inventory, README release snapshot 242, frozen group sizes
  (analysis 13).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FKFStjEFzpGyLq5bMpWxTd
This commit is contained in:
Umut CAN
2026-09-24 11:50:41 +03:00
co-authored by Claude Opus 5.5
parent 704a44b190
commit 2459694880
12 changed files with 1818 additions and 8 deletions
+29
View File
@@ -2465,6 +2465,35 @@ TOOL_ALIASES: dict[str, ToolAliases] = {
"mimari plan",
),
),
# ── Understanding & QA (SECTION 26, track H group U) ────────────────────
# No AutoCAD command reads a foreign drawing back as a report, so `acad`
# is empty. UNITS stays with drawing_settings (it sets units; this reads
# what the geometry implies), and no synonym here says "layers", "blocks"
# or "how big", the words the golden layer_list / block_list /
# analysis_bounding_box queries lean on.
"drawing_understand": ToolAliases(
acad=(),
synonyms=(
"understand this drawing",
"read a foreign drawing",
"summarise a client drawing",
"drawing report",
"which unit is this drawing really in",
"wrong insunits",
"inches or millimetres",
"two copies of the plan",
"stray entity far away",
"what is on this p&id",
"birim",
"birimi ne",
"çizimi anla",
"cizimi anla",
"çizim raporu",
"cizim raporu",
"yabancı çizim",
"yabanci cizim",
),
),
}