feat(understand): drawing_diff - two revisions matched by geometric signature
engineering/understand/diff.py reads each revision once into entity records and matches them in three stages: exact signature (type, layer, geometry rounded to tol, text, block, rotation, scale, attributes; handles ignored), then handle while at least half of the exact matches kept theirs, then type + layer + nearest anchor within move_tol (default 2 % of the 1st-99th percentile diagonal). The report counts changes by layer and type, says what changed per entity (moved by, text, attribute, radius ... from -> to), compares named block definitions by content and groups the changes into clusters. drawing_diff opens group D's copy of SECTION 26. It is read-only unless markup=True, which files revision clouds around the model-space clusters on the current document through add_revision - refused before any read with new_path, without a valid rev, or on an engine without revcloud. A revision path that is neither .dxf nor .dwg is refused naming the parameter (old_path: / new_path:), like every other path refusal. Tests: the synthetic plant P&ID edited five ways (a move, a text, an attribute, an add, a delete) under renumbered handles reports exactly those five edits; renumbering alone reports nothing. 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:
co-authored by
Claude Opus 5.5
parent
704a44b190
commit
54325e6de0
@@ -2465,6 +2465,19 @@ TOOL_ALIASES: dict[str, ToolAliases] = {
|
||||
"mimari plan",
|
||||
),
|
||||
),
|
||||
# ── Understanding & QA (SECTION 26, track H group D) ────────────────────
|
||||
"drawing_diff": ToolAliases(
|
||||
acad=("COMPARE",),
|
||||
synonyms=(
|
||||
"compare two drawings",
|
||||
"compare two revisions",
|
||||
"what changed between revisions",
|
||||
"drawing differences",
|
||||
"cloud the changes",
|
||||
"revizyonlar arası değişiklik",
|
||||
"revizyonlar arasi degisiklik",
|
||||
),
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user