diff --git a/src/Mod/PartDesign/App/Feature.cpp b/src/Mod/PartDesign/App/Feature.cpp
index 3c08112d5a..dfb1d050cd 100644
--- a/src/Mod/PartDesign/App/Feature.cpp
+++ b/src/Mod/PartDesign/App/Feature.cpp
@@ -37,6 +37,7 @@
#include "Body.h"
#include "Feature.h"
+#include
namespace PartDesign {
@@ -61,17 +62,6 @@ TopoDS_Shape Feature::getSolid(const TopoDS_Shape& shape)
return TopoDS_Shape();
}
-PartDesign::Body* Feature::getBody()
-{
- std::vector bodies = this->getDocument()->getObjectsOfType(PartDesign::Body::getClassTypeId());
- for (std::vector::const_iterator b = bodies.begin(); b != bodies.end(); b++) {
- PartDesign::Body* body = static_cast(*b);
- if (body->hasFeature(this))
- return body;
- }
- return NULL;
-}
-
const gp_Pnt Feature::getPointFromFace(const TopoDS_Face& f)
{
if (!f.Infinite()) {
diff --git a/src/Mod/PartDesign/App/Feature.h b/src/Mod/PartDesign/App/Feature.h
index 43e1be04c5..41125fb64c 100644
--- a/src/Mod/PartDesign/App/Feature.h
+++ b/src/Mod/PartDesign/App/Feature.h
@@ -45,12 +45,9 @@ class PartDesignExport Feature : public Part::Feature
PROPERTY_HEADER(PartDesign::Feature);
public:
- Feature();
-
-protected:
- /// Get the body feature which this feature belongs to
- Body* getBody();
+ Feature();
+protected:
/**
* Get a solid of the given shape. If no solid is found an exception is raised.
*/
diff --git a/src/Mod/PartDesign/App/FeatureSketchBased.cpp b/src/Mod/PartDesign/App/FeatureSketchBased.cpp
index 52b58c0840..2d7c2db953 100644
--- a/src/Mod/PartDesign/App/FeatureSketchBased.cpp
+++ b/src/Mod/PartDesign/App/FeatureSketchBased.cpp
@@ -98,7 +98,7 @@ PROPERTY_SOURCE(PartDesign::SketchBased, PartDesign::Feature)
SketchBased::SketchBased()
{
- ADD_PROPERTY(Base,(0));
+ ADD_PROPERTY(BaseFeature,(0));
ADD_PROPERTY_TYPE(Sketch,(0),"SketchBased", App::Prop_None, "Reference to sketch");
ADD_PROPERTY_TYPE(Midplane,(0),"SketchBased", App::Prop_None, "Extrude symmetric to sketch face");
ADD_PROPERTY_TYPE(Reversed, (0),"SketchBased", App::Prop_None, "Reverse extrusion direction");
@@ -106,7 +106,8 @@ SketchBased::SketchBased()
short SketchBased::mustExecute() const
{
- if (Sketch.isTouched() ||
+ if (BaseFeature.isTouched() ||
+ Sketch.isTouched() ||
Midplane.isTouched() ||
Reversed.isTouched())
return 1;
@@ -233,7 +234,7 @@ const TopoDS_Shape& SketchBased::getSupportShape() const {
}
const TopoDS_Shape& SketchBased::getBaseShape() const {
- App::DocumentObject* BaseLink = Base.getValue();
+ App::DocumentObject* BaseLink = BaseFeature.getValue();
if (BaseLink == NULL) throw Base::Exception("Base property not set");
Part::Feature* BaseObject = NULL;
if (BaseLink->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId()))
diff --git a/src/Mod/PartDesign/App/FeatureSketchBased.h b/src/Mod/PartDesign/App/FeatureSketchBased.h
index 84269ef9fb..b663fb1259 100644
--- a/src/Mod/PartDesign/App/FeatureSketchBased.h
+++ b/src/Mod/PartDesign/App/FeatureSketchBased.h
@@ -46,7 +46,7 @@ public:
// Common properties for all sketch based features
/// Base feature which this feature will be fused into or cut out of
- App::PropertyLink Base;
+ App::PropertyLink BaseFeature;
/// Sketch used to create this feature
App::PropertyLink Sketch;
/// Reverse extrusion direction