Handy Models geometry improvement. (#10092)

* helper disk by code

Co-Authored-By: Ian Bassi <12130714+ianalexis@users.noreply.github.com>

* Torus

Delete torus.stl

Co-Authored-By: Ian Bassi <12130714+ianalexis@users.noreply.github.com>

* traingle count tunning

Co-Authored-By: Ian Bassi <12130714+ianalexis@users.noreply.github.com>

* Update TriangleMesh.hpp

Co-Authored-By: Ian Bassi <12130714+ianalexis@users.noreply.github.com>

* adjusting disk diameter

---------

Co-authored-by: Ian Bassi <12130714+ianalexis@users.noreply.github.com>
Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
This commit is contained in:
Rodrigo
2025-07-13 11:07:55 -03:00
committed by GitHub
parent 65e3bcc183
commit bf52f5b4bf
5 changed files with 68 additions and 10 deletions

View File

@@ -2147,17 +2147,17 @@ static TriangleMesh create_mesh(const std::string& type_name, const BoundingBoxf
else if (type_name == "Sphere")
// Centered around 0, half the sphere below the print bed, half above.
// The sphere has the same volume as the box above.
mesh = TriangleMesh(its_make_sphere(0.5 * side, PI / 18));
mesh = TriangleMesh(its_make_sphere(0.5 * side, PI / 90));
else if (type_name == "Slab")
// Sitting on the print bed, left front front corner at (0, 0).
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 = TriangleMesh(its_make_cone(0.5 * side, side));
else if (type_name == "Disc")
mesh.ReadSTLFile((Slic3r::resources_dir() + "/handy_models/helper_disk.stl").c_str(), true, nullptr);
mesh = TriangleMesh(its_make_cylinder(0.5 * side, 0.2f));
else if (type_name == "Torus")
mesh.ReadSTLFile((Slic3r::resources_dir() + "/handy_models/torus.stl").c_str(), true, nullptr);
return TriangleMesh(mesh);
mesh = TriangleMesh(its_make_torus(0.5 * side, 0.125 * side,(PI / 60)));
return mesh;
}
void ObjectList::load_generic_subobject(const std::string& type_name, const ModelVolumeType type)