diff --git a/src/Mod/Part/App/TopoShape.cpp b/src/Mod/Part/App/TopoShape.cpp index 98a6428d0b..36ce36688a 100644 --- a/src/Mod/Part/App/TopoShape.cpp +++ b/src/Mod/Part/App/TopoShape.cpp @@ -1223,6 +1223,9 @@ bool TopoShape::getCenterOfGravity(Base::Vector3d& center) const // Computing of CentreOfMass GProp_GProps prop; if (getShapeProperties(_Shape, prop)) { + if (prop.Mass() > Precision::Infinite()) { + return false; + } gp_Pnt pnt = prop.CentreOfMass(); center.Set(pnt.X(), pnt.Y(), pnt.Z()); return true;