Add ModelArrange.hpp as extension to Model.hpp, use it for duplicating

Refactored Arrange interface: remove the union based BedShapeHint, replace it with proper function overloads

WARN: this commit is only intermediate, it does not compile.
This commit is contained in:
tamasmeszaros 2020-04-23 18:19:03 +02:00
parent 44ca0a6c3d
commit 1bffc2b99b
13 changed files with 389 additions and 481 deletions

View file

@ -12,6 +12,7 @@
#include <boost/nowide/cstdio.hpp>
#include <boost/filesystem.hpp>
#include <libslic3r/ModelArrange.hpp>
using namespace std;
@ -167,8 +168,7 @@ void init_print(std::vector<TriangleMesh> &&meshes, Slic3r::Print &print, Slic3r
object->add_volume(std::move(t));
object->add_instance();
}
model.arrange_objects(min_object_distance(config));
model.center_instances_around_point(Slic3r::Vec2d(100, 100));
arrange_objects(model, InfiniteBed{}, ArrangeParams{ scaled(min_object_distance(config))});
for (ModelObject *mo : model.objects) {
mo->ensure_on_bed();
print.auto_assign_extruders(mo);