Design: every sketch tool has an address in the offer, not just its family

Mirror of snaporca 0c83f59f13 (DesignPanel.cpp applied as a patch, not copied, so this
fork's 30 permitted divergent lines survive; parity re-checked at 30/16 with the shared
files byte-identical).

The sketch dropdown never registered "fly:<family>#<row>" addresses the way
feat_dropdown does for model verbs, so the offer could name a family but only ever arm
its first tool — Rectangle always gave a corner rectangle. Adds the registration, 14
atlas verbs (including the entire array family, which was absent, and rotate/scale), an
action for the sk_move row that previously did nothing when picked, and a second submenu
level so variants nest under their family instead of flattening 19 create tools.

Built green and verified on the rig: Oblique rectangle arms oblique, not corner.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LyRwbuq6fjn3VV9U9UvhBM
This commit is contained in:
Tommaso Bianchi
2026-08-01 08:20:47 +02:00
co-authored by Claude Opus 5
parent fd1bc092d8
commit d1d61ce997
4 changed files with 424 additions and 74 deletions
+8 -2
View File
@@ -87,6 +87,11 @@ def main():
" int need_sketches;",
" bool need_sheet;",
" bool sketch_mode; // belongs to the sketch-mode vocabulary, not the model one",
" // Second level INSIDE a row, for tools that come in variants: \"Rectangle\" holds corner,",
" // centre, oblique and rounded. nullptr = sits directly in the row. Keeps the row's own",
" // address fixed (L4.1) while the variants hang one level below it, mirroring the toolbar's",
" // grouping instead of flattening 19 create tools into one wall.",
" const char* family;",
"};",
"",
"// Row labels, in ratified order.",
@@ -106,12 +111,13 @@ def main():
mask |= 1 << sels.index(a)
n = v.get("needs") or {}
lines.append(
" {%s, %s, %d, %s, %s, %s, 0x%08xu, %d, %d, %s, %s}," % (
" {%s, %s, %d, %s, %s, %s, 0x%08xu, %d, %d, %s, %s, %s}," % (
cstr(v["id"]), cstr(v["name"]), slots.index(v["slot"]),
cstr(v.get("key")), cstr(v.get("action")), cstr(v.get("refusal")),
mask, n.get("bodies", 0), n.get("sketches", 0),
"true" if n.get("sheet") else "false",
"true" if v.get("mode") == "sketch" else "false"))
"true" if v.get("mode") == "sketch" else "false",
cstr(v.get("family"))))
lines += [
"};",
f"static const int kOfferVerbCount = {len(A['verbs'])};",