feat(blocks): block_define — typed primitives + ATTDEFs on both engines

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FKFStjEFzpGyLq5bMpWxTd
This commit is contained in:
Umut CAN
2026-09-15 13:58:09 +03:00
co-authored by Claude Opus 5
parent 94840042a5
commit a84cae2641
9 changed files with 540 additions and 9 deletions
+14
View File
@@ -66,11 +66,15 @@ class ToolAliases:
# QSELECT -- AutoCAD's Quick Select dialog is both "filter by properties"
# (selection_filter) and "find things like this one"
# (entity_select_smart); a drafter typing it could mean either.
# BLOCK -- one command makes a definition either from selected objects
# (block_create_from_entities) or from scratch with attribute
# definitions (block_define); a drafter typing it could mean either.
#
# Every other AutoCAD command must map to exactly one tool.
SHARED_ACAD_COMMANDS: frozenset[str] = frozenset(
{
"ARRAY",
"BLOCK",
"ERASE",
"INSERT",
"LAYER",
@@ -201,6 +205,16 @@ TOOL_ALIASES: dict[str, ToolAliases] = {
"reusable symbol",
),
),
"block_define": ToolAliases(
acad=("BLOCK", "BEDIT", "ATTDEF"),
synonyms=(
"define a block",
"make a symbol",
"block with attributes",
"attribute definition",
"create a block definition from scratch",
),
),
"block_explode": ToolAliases(
acad=("EXPLODE",),
synonyms=(