mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Automatic placement of instance at bed level
This commit is contained in:
parent
66e97aa4eb
commit
503166a6a4
6 changed files with 193 additions and 6 deletions
|
@ -1151,6 +1151,7 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path> &input_
|
|||
if (type_3mf) {
|
||||
for (ModelObject* model_object : model.objects) {
|
||||
model_object->center_around_origin();
|
||||
model_object->ensure_on_bed();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1235,6 +1236,8 @@ std::vector<size_t> Plater::priv::load_model_objects(const ModelObjectPtrs &mode
|
|||
}
|
||||
}
|
||||
|
||||
object->ensure_on_bed();
|
||||
|
||||
// print.auto_assign_extruders(object);
|
||||
// print.add_model_object(object);
|
||||
}
|
||||
|
@ -1628,6 +1631,7 @@ void Plater::priv::split_object()
|
|||
{
|
||||
m->name = current_model_object->name + "_" + std::to_string(counter++);
|
||||
m->center_around_origin();
|
||||
m->ensure_on_bed();
|
||||
}
|
||||
|
||||
remove(obj_idx);
|
||||
|
@ -2552,6 +2556,7 @@ void Plater::changed_object_settings(int obj_idx)
|
|||
// recenter and re - align to Z = 0
|
||||
auto model_object = p->model.objects[obj_idx];
|
||||
model_object->center_around_origin();
|
||||
model_object->ensure_on_bed();
|
||||
}
|
||||
|
||||
// update print
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue