NEW: add rounded rectangle model
Rounded rectangle can be used to create some frequently contacted models. Also add icons for some objects. jira: none Change-Id: I59dec8d6d892f8fb975b0723ea2cd85ccfc65d28 (cherry picked from commit 83830b844d3720f99651174daa3b1ac81e64e5d7)
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 1.8 KiB |
|
@ -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<std::string> 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) {
|
||||
|
|
|
@ -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")
|
||||
|
|