From 6a02b5849f6670cbcde121bb01005c19546f483c Mon Sep 17 00:00:00 2001 From: jrheinlaender Date: Sun, 28 Jul 2013 21:32:25 +0200 Subject: [PATCH] Body: Transformed Features inside a MultiTransform are not considered to be solid features --- src/Mod/PartDesign/App/Body.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Mod/PartDesign/App/Body.cpp b/src/Mod/PartDesign/App/Body.cpp index b09b95158..01f317ab4 100644 --- a/src/Mod/PartDesign/App/Body.cpp +++ b/src/Mod/PartDesign/App/Body.cpp @@ -32,6 +32,7 @@ #include "Body.h" #include "BodyPy.h" #include "FeatureSketchBased.h" +#include "FeatureTransformed.h" #include "DatumPoint.h" #include "DatumLine.h" #include "DatumPlane.h" @@ -191,7 +192,15 @@ const bool Body::isSolidFeature(const App::DocumentObject* f) if (f == NULL) return false; - return (f->getTypeId().isDerivedFrom(PartDesign::Feature::getClassTypeId())); + if (f->getTypeId().isDerivedFrom(PartDesign::Feature::getClassTypeId())) { + // Transformed Features inside a MultiTransform are not solid features + // They can be recognized because the Originals property is empty (it is contained + // in the MultiTransform instead) + if (f->getTypeId().isDerivedFrom(PartDesign::Transformed::getClassTypeId()) && + static_cast(f)->Originals.getValues().empty()) + return false; + return true; + } } const bool Body::isAllowed(const App::DocumentObject* f)