mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Fixed crashes after loading some AMFs.
This commit is contained in:
parent
7e52edb88c
commit
624a6aefb4
1 changed files with 4 additions and 2 deletions
|
@ -1564,7 +1564,9 @@ void ModelVolume::center_geometry_after_creation()
|
||||||
Vec3d shift = this->mesh().bounding_box().center();
|
Vec3d shift = this->mesh().bounding_box().center();
|
||||||
if (!shift.isApprox(Vec3d::Zero()))
|
if (!shift.isApprox(Vec3d::Zero()))
|
||||||
{
|
{
|
||||||
|
if (m_mesh)
|
||||||
m_mesh->translate(-(float)shift(0), -(float)shift(1), -(float)shift(2));
|
m_mesh->translate(-(float)shift(0), -(float)shift(1), -(float)shift(2));
|
||||||
|
if (m_convex_hull)
|
||||||
m_convex_hull->translate(-(float)shift(0), -(float)shift(1), -(float)shift(2));
|
m_convex_hull->translate(-(float)shift(0), -(float)shift(1), -(float)shift(2));
|
||||||
translate(shift);
|
translate(shift);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue