Fix bug that produced 'cannot update representation' error message on adding a fillet

This commit is contained in:
jrheinlaender
2013-05-18 08:47:20 +04:30
committed by Stefan Tröger
parent 2732f44b42
commit 245486b382
2 changed files with 7 additions and 0 deletions

View File

@@ -333,6 +333,11 @@ Base::BoundBox3d Body::getBoundBox()
Base::BoundBox3d result;
Part::Feature* tipSolid = static_cast<Part::Feature*>(getPrevSolidFeature());
TopoDS_Shape sh = tipSolid->Shape.getValue();
if (sh.IsNull())
// This can happen when a new feature is added without having its Shape property set yet
tipSolid = static_cast<Part::Feature*>(getPrevSolidFeature(NULL, false));
if (tipSolid != NULL) {
result = tipSolid->Shape.getShape().getBoundBox();
} else {