PartDesign: Adopt pattern to face based features

This commit is contained in:
Stefan Tröger
2016-01-21 08:43:37 +01:00
parent ae9dac71d7
commit 12e793bde8
3 changed files with 53 additions and 24 deletions

View File

@@ -104,7 +104,7 @@ App::DocumentObject* Transformed::getSketchObject() const
{
std::vector<DocumentObject*> originals = Originals.getValues();
if (!originals.empty() && originals.front()->getTypeId().isDerivedFrom(PartDesign::ProfileBased::getClassTypeId())) {
return (static_cast<PartDesign::ProfileBased*>(originals.front()))->getVerifiedSketch();
return (static_cast<PartDesign::ProfileBased*>(originals.front()))->getVerifiedSketch(true);
}
else if (!originals.empty() && originals.front()->getTypeId().isDerivedFrom(PartDesign::FeatureAddSub::getClassTypeId())) {
return NULL;
@@ -211,7 +211,7 @@ App::DocumentObjectExecReturn *Transformed::execute(void)
return App::DocumentObject::StdReturn; // No transformations defined, exit silently
// Get the support
Part::Feature* supportFeature = getBaseObject();
Part::Feature* supportFeature;
try {
supportFeature = getBaseObject();