Miscellaneous fixes
This commit is contained in:
parent
638cfd2682
commit
c4fe27d093
|
@ -333,16 +333,18 @@ 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 {
|
||||
result = App::Plane::getBoundBox();
|
||||
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();
|
||||
}
|
||||
}
|
||||
if (tipSolid == NULL)
|
||||
result = App::Plane::getBoundBox();
|
||||
|
||||
std::vector<App::DocumentObject*> model = Model.getValues();
|
||||
// TODO: In DatumLine and DatumPlane, recalculate the Base point to be as near as possible to the origin (0,0,0)
|
||||
|
|
|
@ -52,7 +52,7 @@ PROPERTY_SOURCE(PartDesign::Feature,Part::Feature)
|
|||
Feature::Feature()
|
||||
{
|
||||
ADD_PROPERTY(BaseFeature,(0));
|
||||
|
||||
Placement.StatusBits.set(2, true);
|
||||
}
|
||||
|
||||
short Feature::mustExecute() const
|
||||
|
|
|
@ -39,6 +39,7 @@ PROPERTY_SOURCE(PartDesign::DressUp, PartDesign::Feature)
|
|||
DressUp::DressUp()
|
||||
{
|
||||
ADD_PROPERTY(Base,(0));
|
||||
Placement.StatusBits.set(2, true);
|
||||
}
|
||||
|
||||
short DressUp::mustExecute() const
|
||||
|
|
Loading…
Reference in New Issue
Block a user