diff --git a/resources/model/Cone.png b/resources/model/Cone.png new file mode 100644 index 000000000..87bc51d46 Binary files /dev/null and b/resources/model/Cone.png differ diff --git a/resources/model/Cube.png b/resources/model/Cube.png new file mode 100644 index 000000000..ef43ba1cf Binary files /dev/null and b/resources/model/Cube.png differ diff --git a/resources/model/Cylinder.png b/resources/model/Cylinder.png new file mode 100644 index 000000000..1b47d67f1 Binary files /dev/null and b/resources/model/Cylinder.png differ diff --git a/resources/model/Disc.png b/resources/model/Disc.png new file mode 100644 index 000000000..91153320d Binary files /dev/null and b/resources/model/Disc.png differ diff --git a/resources/model/Sphere.png b/resources/model/Sphere.png new file mode 100644 index 000000000..3a27636e9 Binary files /dev/null and b/resources/model/Sphere.png differ diff --git a/resources/model/Torus.png b/resources/model/Torus.png new file mode 100644 index 000000000..16e8bac5a Binary files /dev/null and b/resources/model/Torus.png differ diff --git a/resources/model/rounded_rectangle.png b/resources/model/rounded_rectangle.png new file mode 100644 index 000000000..21190f16a Binary files /dev/null and b/resources/model/rounded_rectangle.png differ diff --git a/resources/model/rounded_rectangle.stl b/resources/model/rounded_rectangle.stl new file mode 100644 index 000000000..fc25ab765 Binary files /dev/null and b/resources/model/rounded_rectangle.stl differ diff --git a/src/slic3r/GUI/GUI_Factories.cpp b/src/slic3r/GUI/GUI_Factories.cpp index 5e1804a50..dc842641e 100644 --- a/src/slic3r/GUI/GUI_Factories.cpp +++ b/src/slic3r/GUI/GUI_Factories.cpp @@ -484,10 +484,12 @@ wxMenu* MenuFactory::append_submenu_add_generic(wxMenu* menu, ModelVolumeType ty sub_menu->AppendSeparator(); } - for (auto &item : {L("Cube"), L("Cylinder"), L("Sphere"), L("Cone"), L("Disc"),L("Torus")}) + std::vector icons = { "cube", "Cylinder", "Sphere", "Cone", "Disc", "Torus", "rounded_rectangle" }; + size_t i = 0; + for (auto &item : {L("Cube"), L("Cylinder"), L("Sphere"), L("Cone"), L("Disc"),L("Torus"),L("Rounded Rectangle") }) { append_menu_item(sub_menu, wxID_ANY, _(item), "", - [type, item](wxCommandEvent&) { obj_list()->load_generic_subobject(item, type); }, "", menu); + [type, item](wxCommandEvent&) { obj_list()->load_generic_subobject(item, type); }, Slic3r::resources_dir() + "/model/" + icons[i++] + ".png", menu); } if (type == ModelVolumeType::INVALID) { diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index de0e56a1f..a0ca20de5 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -2104,6 +2104,8 @@ static TriangleMesh create_mesh(const std::string& type_name, const BoundingBoxf mesh.ReadSTLFile((Slic3r::resources_dir() + "/model/Disc.stl").c_str(), true, nullptr); else if (type_name == "Torus") mesh.ReadSTLFile((Slic3r::resources_dir() + "/model/torus.stl").c_str(), true, nullptr); + else if (type_name == "Rounded Rectangle") + mesh.ReadSTLFile((Slic3r::resources_dir() + "/model/rounded_rectangle.stl").c_str(), true, nullptr); else if (type_name == "Bambu Cube") mesh.ReadSTLFile((Slic3r::resources_dir() + "/model/Bambu_Cube.stl").c_str(), true, nullptr); else if (type_name == "Bambu Cube V2")