mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
FIX: prompt when opening 3mf
Change-Id: I645bb675ea060ca3827a597b13a86cd56425735f (cherry picked from commit 743d0bf1757a886784a41cc35c4f13381d27699d)
This commit is contained in:
parent
46a0e67be7
commit
87718e6725
1 changed files with 6 additions and 1 deletions
|
@ -565,8 +565,13 @@ bool Model::looks_like_multipart_object() const
|
|||
for (const ModelObject *obj : this->objects) {
|
||||
if (obj->volumes.size() > 1 || obj->config.keys().size() > 1)
|
||||
return false;
|
||||
Vec3d instance_offset_matrix = obj->instances[0]->m_transformation.get_offset();
|
||||
for (const ModelVolume *vol : obj->volumes) {
|
||||
double zmin_this = vol->mesh().bounding_box().min(2);
|
||||
Vec3d volume_offset_matrix = vol->m_transformation.get_offset();
|
||||
BoundingBoxf3 bounding_box = vol->mesh().bounding_box();
|
||||
bounding_box.translate(instance_offset_matrix);
|
||||
bounding_box.translate(volume_offset_matrix);
|
||||
double zmin_this = bounding_box.min(2);
|
||||
if (zmin == std::numeric_limits<double>::max())
|
||||
zmin = zmin_this;
|
||||
else if (std::abs(zmin - zmin_this) > EPSILON)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue