feat(understand): drawing_scale_check - is this drawing to scale against that one

Equipment tags found exactly once in each drawing are matched (a tag
found twice - a plan copy, a legend - is reported ambiguous and takes no
part; two plan copies resolve to the cluster that matches the most
tags). For every pair of matched tags at least min_pair_mm apart on the
reference, the ratio of their distances is taken in millimetres by each
drawing's inferred unit; the median, the quartiles, the share within
+/-10 % of the median, the same per room of the reference, and the
verdict: to_scale (>= 80 %, with its factor), schematic (<= 50 %),
partly, or insufficient under three matched tags.

server.py grows SECTION 26 to two tools with drawing_scale_check (core,
read-only, tagged analysis/query); alias record, inventory, README
release snapshot 243, frozen group sizes (analysis 14).

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:55:57 +03:00
co-authored by Claude Opus 5.5
parent 2459694880
commit 7aaead43d9
8 changed files with 695 additions and 12 deletions
+19
View File
@@ -2494,6 +2494,25 @@ TOOL_ALIASES: dict[str, ToolAliases] = {
"yabanci cizim",
),
),
"drawing_scale_check": ToolAliases(
acad=(),
synonyms=(
"scale check",
"is the p&id to scale",
"is this drawing to scale",
"schematic or to scale",
"unscaled p&id",
"tag distances against the layout",
"can i measure pipe on the p&id",
"ölçek",
"olcek",
"ölçek kontrolü",
"olcek kontrolu",
"ölçekli mi",
"olcekli mi",
"масштаб",
),
),
}