Fixed .prusa i/o and split to objects

This commit is contained in:
Enrico Turri 2019-01-18 16:01:43 +01:00
parent ce099e91c7
commit 1eb01df0c8
6 changed files with 22 additions and 59 deletions

View file

@ -1456,9 +1456,7 @@ namespace Slic3r {
// splits volume out of imported geometry
unsigned int triangles_count = volume_data.last_triangle_id - volume_data.first_triangle_id + 1;
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
ModelVolume* volume = object.add_volume(TriangleMesh());
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
stl_file& stl = volume->mesh.stl;
stl.stats.type = inmemory;
stl.stats.number_of_facets = (uint32_t)triangles_count;
@ -1479,9 +1477,7 @@ namespace Slic3r {
stl_get_size(&stl);
volume->mesh.repair();
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
volume->center_geometry();
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
volume->calculate_convex_hull();
// apply volume's name and config data