FIX: prompt when opening 3mf
Change-Id: Ife452f5b16bdcf3f8eb105aeb58ffccdccb9177f (cherry picked from commit c1e984d0feadef778fd09e61063ac1dacbbf9a64)
This commit is contained in:
parent
0d25141a90
commit
0072e5ec37
|
@ -565,19 +565,13 @@ bool Model::looks_like_multipart_object() const
|
||||||
for (const ModelObject *obj : this->objects) {
|
for (const ModelObject *obj : this->objects) {
|
||||||
if (obj->volumes.size() > 1 || obj->config.keys().size() > 1)
|
if (obj->volumes.size() > 1 || obj->config.keys().size() > 1)
|
||||||
return false;
|
return false;
|
||||||
Vec3d instance_offset_matrix = obj->instances[0]->m_transformation.get_offset();
|
|
||||||
for (const ModelVolume *vol : obj->volumes) {
|
double zmin_this = obj->get_min_z();
|
||||||
Vec3d volume_offset_matrix = vol->m_transformation.get_offset();
|
if (zmin == std::numeric_limits<double>::max())
|
||||||
BoundingBoxf3 bounding_box = vol->mesh().bounding_box();
|
zmin = zmin_this;
|
||||||
bounding_box.translate(instance_offset_matrix);
|
else if (std::abs(zmin - zmin_this) > EPSILON)
|
||||||
bounding_box.translate(volume_offset_matrix);
|
// The Object don't share zmin.
|
||||||
double zmin_this = bounding_box.min(2);
|
return true;
|
||||||
if (zmin == std::numeric_limits<double>::max())
|
|
||||||
zmin = zmin_this;
|
|
||||||
else if (std::abs(zmin - zmin_this) > EPSILON)
|
|
||||||
// The volumes don't share zmin.
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue