NEW: add double tear romboid cylinder stl

github: #4023

Website platform: Printables
File Source: https://www.printables.com/model/769742-negative-volume-double-tear-romboid-cylinder-for-h
Author: Ro3Deee@Ro3Deee

Change-Id: I118031d5ca6663cca6e92dc33988d63b0ae9cd02
This commit is contained in:
maosheng.wei 2024-09-09 10:22:40 +08:00 committed by Lane.Wei
parent 15ec81745f
commit 4e3893a6e3
4 changed files with 4 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

View File

@ -488,9 +488,9 @@ wxMenu* MenuFactory::append_submenu_add_generic(wxMenu* menu, ModelVolumeType ty
sub_menu->AppendSeparator();
}
std::vector<std::string> icons = { "Cube", "Cylinder", "Sphere", "Cone", "Disc", "Torus", "rounded_rectangle" };
std::vector<std::string> icons = {"Cube", "Cylinder", "Sphere", "Cone", "double_tear_romboid_cylinder", "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") })
for (auto &item : {L("Cube"), L("Cylinder"), L("Sphere"), L("Cone"), L("Double Tear Romboid Cylinder"), 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); }, Slic3r::resources_dir() + "/model/" + icons[i++] + ".png", menu);

View File

@ -2114,6 +2114,8 @@ static TriangleMesh create_mesh(const std::string& type_name, const BoundingBoxf
mesh = TriangleMesh(its_make_cube(bb.size().x() * 1.5, bb.size().y() * 1.5, bb.size().z() * 0.5));
else if (type_name == "Cone")
mesh.ReadSTLFile((Slic3r::resources_dir() + "/model/cone.stl").c_str(), true, nullptr);
else if (type_name == "Double Tear Romboid Cylinder")
mesh.ReadSTLFile((Slic3r::resources_dir() + "/model/double_tear_romboid_cylinder.stl").c_str(), true, nullptr);
else if (type_name == "Disc")
mesh.ReadSTLFile((Slic3r::resources_dir() + "/model/Disc.stl").c_str(), true, nullptr);
else if (type_name == "Torus")