Fix bug that produced 'cannot update representation' error message on adding a fillet
This commit is contained in:
parent
b18958b3d9
commit
ed2657380c
|
@ -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 {
|
||||
|
|
|
@ -90,6 +90,8 @@ void ViewProviderDatumPlane::updateData(const App::Property* prop)
|
|||
Base::BoundBox3d bbox = body->getBoundBox();
|
||||
bbox = bbox.Transformed(plm.toMatrix());
|
||||
double dlength = bbox.CalcDiagonalLength();
|
||||
if (dlength < Precision::Confusion())
|
||||
return;
|
||||
bbox.Enlarge(0.1 * dlength);
|
||||
|
||||
// Calculate intersection of plane with bounding box edges
|
||||
|
|
Loading…
Reference in New Issue
Block a user