add primitive preview visualization

This commit is contained in:
Stefan Tröger
2016-04-12 18:12:08 +02:00
parent 0a82185b66
commit c5ae4530ab
4 changed files with 11 additions and 18 deletions
+5 -3
View File
@@ -100,12 +100,14 @@ App::DocumentObjectExecReturn* FeaturePrimitive::execute(const TopoDS_Shape& pri
}
catch(const Base::Exception&) {
//as we use this for preview we can add it even if useless for subtractive
AddSubShape.setValue(primitiveShape);
if(getAddSubType() == FeatureAddSub::Additive)
Shape.setValue(primitiveShape);
else
return new App::DocumentObjectExecReturn("Cannot subtract primitive feature without base feature");
AddSubShape.setValue(base);
return new App::DocumentObjectExecReturn("Cannot subtract primitive feature without base feature");
return App::DocumentObject::StdReturn;
}