NEW: add a new generic object torus

torus.stl is borrowed from Prusa by YuSanka <yusanka@gmail.com>. We
are thankful for that.

Jira: none
Change-Id: I45ee3fa7c1390fb48ecdc6a679ee5525526461d6
(cherry picked from commit 8ef4c9d9d44b1f66cb05259bb2135bd2e703f64a)
This commit is contained in:
Arthur 2023-10-14 12:51:19 +08:00 committed by Lane.Wei
parent 700c574224
commit 39af8072ba
3 changed files with 3 additions and 1 deletions

BIN
resources/model/torus.stl Normal file

Binary file not shown.

View File

@ -484,7 +484,7 @@ 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")})
for (auto &item : {L("Cube"), L("Cylinder"), L("Sphere"), L("Cone"), L("Disc"),L("Torus")})
{
append_menu_item(sub_menu, wxID_ANY, _(item), "",
[type, item](wxCommandEvent&) { obj_list()->load_generic_subobject(item, type); }, "", menu);

View File

@ -2127,6 +2127,8 @@ static TriangleMesh create_mesh(const std::string& type_name, const BoundingBoxf
mesh = TriangleMesh(its_make_cone(0.5 * side, side));
else if (type_name == "Disc")
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 == "Bambu Cube")
mesh.ReadSTLFile((Slic3r::resources_dir() + "/model/Bambu_Cube.stl").c_str(), true, nullptr);
else if (type_name == "Bambu Cube V2")