New selection set as default

This commit is contained in:
Enrico Turri 2018-11-01 10:06:55 +01:00
parent 0d282896d0
commit a15bf7cc25
16 changed files with 20 additions and 2149 deletions
src/libslic3r

View file

@ -693,23 +693,12 @@ void ModelObject::center_around_origin()
if (v->is_model_part())
bb.merge(v->mesh.bounding_box());
#if ENABLE_EXTENDED_SELECTION
// Shift is the vector from the center of the bounding box to the origin
Vec3d shift = -bb.center();
#else
// Shift is the vector from the center of the bottom face of the bounding box to the origin
Vec3d shift = -bb.center();
shift(2) = -bb.min(2);
#endif // ENABLE_EXTENDED_SELECTION
this->translate(shift);
this->origin_translation += shift;
#if !ENABLE_EXTENDED_SELECTION
// set z to zero, translation in z has already been done within the mesh
shift(2) = 0.0;
#endif // !ENABLE_EXTENDED_SELECTION
if (!this->instances.empty()) {
for (ModelInstance *i : this->instances) {
i->set_offset(i->get_offset() - shift);