+ fix bug in mesh bounding box, fix clang warning

This commit is contained in:
wmayer
2014-11-23 10:55:36 +01:00
parent 425c5dc0fd
commit 48e7e61b6d
2 changed files with 7 additions and 5 deletions

View File

@@ -148,11 +148,13 @@ Base::BoundBox3d MeshObject::getBoundBox(void)const
{
const_cast<MeshCore::MeshKernel&>(_kernel).RecalcBoundBox();
Base::BoundBox3f Bnd = _kernel.GetBoundBox();
Base::BoundBox3d Bnd2;
for(int i =0 ;i<=7;i++)
Bnd2.Add(transformToOutside(Bnd.CalcPoint(i)));
if (Bnd.IsValid()) {
for (int i =0 ;i<=7;i++)
Bnd2.Add(transformToOutside(Bnd.CalcPoint(i)));
}
return Bnd2;
}