Let MCP clients lay an object on a face, set its brim ears, and add text or an SVG to a named object

object_lay_on_face turns an instance so that the face a direction names lies on the bed, as a click in the Lay on Face
gizmo does, and object_set_brim_ears places brim ears at bed positions, or clears them, as the Brim Ears gizmo stores
them; called with only their object, both open their gizmo. object_add_text and object_add_svg can name the object the
part joins and make it a negative part or a modifier. The Brim Ears gizmo shows ears set this way when it next opens,
rather than writing back the ones it held.
This commit is contained in:
SoftFever committed 2026-11-19 22:11:04 +08:00
1 parent 4f6821f059
commit 23a104bc85
16 files changed
+1044 -60

No files matched your search

+10 -9
View File
@@ -143,12 +143,12 @@ std::string first_difference(const std::string& actual, const std::string& expec
}
// The design's command set outside the Design tab, heading by heading in the order tools/list gives them, Driving the
// GUI last, after the Design tab's commands: the 123 commands of the catalog, its typed tools, the commands made from
// GUI last, after the Design tab's commands: the 125 commands of the catalog, its typed tools, the commands made from
// menu items, the seven Parts 4a to 4c add (Printable, Fix Model, Auto Drop, Clone, Reload from disk, Replace 3D file,
// Add Mixed Filament), the three of Part 5a (the Printer Selection dialog's list, install and uninstall), the two of
// Part 5b (the System Filaments dialog's install and uninstall), Part 5c's write of the Preferences dialog's preferences
// and the four of Part 5d (the Plugins window's list, a switch, Delete or Unsubscribe, and Reload), and the five gizmo
// commands (Paint, Measure, Simplify, Mesh Boolean and Cut).
// and the four of Part 5d (the Plugins window's list, a switch, Delete or Unsubscribe, and Reload), and the seven gizmo
// commands (Paint, Measure, Simplify, Mesh Boolean, Cut, Lay on Face and Brim Ears).
// A part that adds a command adds it here.
const std::vector<std::pair<std::string, std::set<std::string>>> kPlaces{
{"Tools and actions", {"tool_search", "tool_call", "action_search", "action_run"}},
@@ -162,7 +162,8 @@ const std::vector<std::pair<std::string, std::set<std::string>>> kPlaces{
"object_delete", "object_rename", "object_set_instances", "object_separate_instances", "object_split", "object_assemble",
"object_order", "object_transform", "object_drop", "object_mirror", "object_center", "object_scale_to_fit", "object_arrange",
"object_auto_orient", "object_set_variable_layer_height", "object_set_height_ranges", "object_set_printable", "object_fix",
"object_set_auto_drop", "object_clone", "object_reload_from_disk", "object_paint", "object_measure", "object_simplify", "object_cut"}},
"object_set_auto_drop", "object_clone", "object_reload_from_disk", "object_paint", "object_measure", "object_simplify", "object_cut",
"object_lay_on_face", "object_set_brim_ears"}},
{"Parts", {"part_add", "part_change_type", "part_replace", "part_boolean"}},
{"Plates",
{"plate_list", "plate_get_settings", "plate_set_settings", "plate_add", "plate_delete", "plate_duplicate", "plate_rename",
@@ -448,8 +449,8 @@ TEST_CASE("outside the Design tab the catalog has its commands and 129 actions",
CHECK(c.action_group == section.at(c.key));
}
// The commands outside the Design tab: the typed tools, the commands made from menu items, the seven Parts 4a to 4c
// add, Part 5a's three, Part 5b's two, Part 5c's one, Part 5d's four and the five gizmo commands.
CHECK(commands == 123);
// add, Part 5a's three, Part 5b's two, Part 5c's one, Part 5d's four and the seven gizmo commands.
CHECK(commands == 125);
// The eight commands named as their menu items keep an action of their own; the other 121 actions are items.
CHECK(own == std::set<std::string>{"plate_add", "plate_delete", "plate_duplicate", "plate_rename", "filament_add", "filament_delete",
"undo", "redo"});
@@ -476,7 +477,7 @@ TEST_CASE("the commands outside the Design tab are the design's, under its headi
commands += keys.size();
}
CHECK(by_heading.size() == kPlaces.size());
CHECK(commands == 123);
CHECK(commands == 125);
// tool_search's group says which there are.
const NativeCommand* search = NativeCommands::find("tool_search");
@@ -517,8 +518,8 @@ TEST_CASE("every command that runs from arguments is in the tool list, by place"
// The three menu items with no argument form, which tool_search finds and tool_call runs.
CHECK(unlisted == std::set<std::string>{"window_save_screenshot", "script_toggle_panel", "settings_toggle_developer_mode"});
// Task 3's 98, the seven Parts 4a to 4c add, Part 5a's three, Part 5b's two, Part 5c's one, Part 5d's four and the
// five gizmo commands.
CHECK(listed.size() == 120);
// seven gizmo commands.
CHECK(listed.size() == 122);
// The search, the generic call and the app's state first; then each heading's commands together, in the
// design's order, Driving the GUI last.