mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-16 18:15:59 +08:00
Fixed crash on AMF loading (#12332, SPE-2175)
This commit is contained in:
parent
3fdd02fff5
commit
1598759400
@ -433,7 +433,11 @@ bool Model::looks_like_multipart_object() const
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
BoundingBoxf3 bb_this = obj->volumes[0]->mesh().bounding_box();
|
BoundingBoxf3 bb_this = obj->volumes[0]->mesh().bounding_box();
|
||||||
BoundingBoxf3 tbb_this = obj->instances[0]->transform_bounding_box(bb_this);
|
|
||||||
|
// FIXME: There is sadly the case when instances are empty (AMF files). The normalization of instances in that
|
||||||
|
// case is performed only after this function is called. For now (shortly before the 2.7.2 release, let's
|
||||||
|
// just do this non-invasive check. Reordering all the functions could break it much more.
|
||||||
|
BoundingBoxf3 tbb_this = (! obj->instances.empty() ? obj->instances[0]->transform_bounding_box(bb_this) : bb_this);
|
||||||
|
|
||||||
if (!tbb.defined)
|
if (!tbb.defined)
|
||||||
tbb = tbb_this;
|
tbb = tbb_this;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user