feat(mcp): grips, grip_drag and click

grips lists the selection's grips; grip_drag moves one to a world point
through the viewport's own grip gesture with snaps, ortho and polar off;
click presses the left button where a world point shows, optionally with
Ctrl and/or Shift held.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 5.5 committed 2026-10-07 12:51:32 +03:00
1 parent d3033caf24
commit 43bd5aa427
4 files changed
+150 -1

No files matched your search

+4
View File
@@ -460,6 +460,7 @@ impl OpenCADStudio {
| "properties"
| "measure"
| "snap"
| "grips"
| "query"
| "records"
| "record_schema"
@@ -742,6 +743,7 @@ impl OpenCADStudio {
None => json!({"ok":true,"snap":null}),
}
}
"grips" => self.control_grips(),
"xdata_get" => self.xdata_read(&req),
"get_selection" => self.control_get_selection(),
"text_search" => self.control_text_search(&req).unwrap_or_else(|e| e),
@@ -980,6 +982,8 @@ impl OpenCADStudio {
Task::none()
}
"property" => self.control_set_property(req)?,
"grip_drag" => self.control_grip_drag(req)?,
"click" => self.control_click(req)?,
"set_properties" => self.control_set_record_properties(req)?,
"action" => self.control_ui_action(req)?,
#[cfg(not(target_arch = "wasm32"))]