change inheritance of Item (again)

This commit is contained in:
jriegel
2012-05-17 17:20:44 +02:00
committed by Stefan Tröger
parent 5f8ebafd7d
commit 0f6f91caec
8 changed files with 36 additions and 18 deletions

View File

@@ -28,6 +28,7 @@
#include <Base/Placement.h>
#include "ItemPart.h"
#include <Mod/Part/App/PartFeature.h>
using namespace Assembly;
@@ -52,14 +53,20 @@ short ItemPart::mustExecute() const
}
App::DocumentObjectExecReturn *ItemPart::execute(void)
{
return App::DocumentObject::StdReturn;
}
TopoDS_Shape ItemPart::getShape(void) const
{
App::DocumentObject* obj = Model.getValue();
if (obj->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) {
this->Shape.setValue(static_cast<Part::Feature*>(obj)->Shape.getValue());
return static_cast<Part::Feature*>(obj)->Shape.getValue();
}
return App::DocumentObject::StdReturn;
return TopoDS_Shape();
}
}