feat: ATTEDIT — edit block attribute values interactively

- attedit.rs: AtteditCommand picks an INSERT entity then iterates through
  each attribute tag prompting for a new value (Enter keeps existing)
- attedit_pending_handle() / attedit_set_attrs() trait methods inject
  attribute data into the command after entity-pick (avoids document access
  in the command itself)
- cmd_result.rs: NeedPoint handler injects attr data; ReplaceEntity detects
  the __ATTEDIT__ sentinel and calls apply_attedit() on the document
- apply_attedit() encodes tag/value pairs as __ATTEDIT__tag\x01val\x02...
- ROADMAP.md: ATTEDIT marked ✅

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Sonnet 4.6 committed 2026-04-08 00:19:43 +03:00
1 parent 0fc3766da7
commit 6f741a92e0
6 files changed
+229 -1

No files matched your search

+10
View File
@@ -233,6 +233,16 @@ pub trait CadCommand: Send {
None
}
/// If this command needs attribute data injected (ATTEDIT), returns the
/// INSERT handle awaiting attr initialization; else None.
fn attedit_pending_handle(&self) -> Option<acadrust::Handle> {
None
}
/// Inject attribute (tag, value) pairs into the command after entity pick.
fn attedit_set_attrs(&mut self, _attrs: Vec<(String, String)>) {}
/// Called instead of `on_point` when the command needs a tangent pick
/// and the snap system found a tangent object.
fn on_tangent_point(&mut self, obj: TangentObject, hit: Vec3) -> CmdResult {