Fixed crash when a part of a multipart object is completely below the printbed
This commit is contained in:
parent
9a4863a14b
commit
145f0489b8
1 changed files with 4 additions and 0 deletions
|
@ -1587,6 +1587,10 @@ unsigned int ModelObject::check_instances_print_volume_state(const Polygon& prin
|
|||
if (vol->is_model_part()) {
|
||||
const Transform3d matrix = model_instance->get_matrix() * vol->get_matrix();
|
||||
const BoundingBoxf3 bb = vol->mesh().transformed_bounding_box(matrix, 0.0);
|
||||
if (!bb.defined) {
|
||||
// this may happen if the part is fully below the printbed, leading to a crash in the following call to its_convex_hull_2d_above()
|
||||
continue;
|
||||
}
|
||||
const Polygon volume_hull_2d = its_convex_hull_2d_above(vol->mesh().its, matrix.cast<float>(), 0.0f);
|
||||
ModelInstanceEPrintVolumeState state = printbed_collision_state(printbed_shape, print_volume_height, volume_hull_2d, bb.min.z(), bb.max.z());
|
||||
if (state == ModelInstancePVS_Inside)
|
||||
|
|
Loading…
Add table
Reference in a new issue