From: vsv Date: Fri, 5 Sep 2014 13:01:26 +0000 (+0400) Subject: Issue #108: Extrusion for imported shape is provided X-Git-Tag: V_0.4.4~78^2~3^2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=53d3f426b973fccee1dc5e5ea6b041c9981458a2;p=modules%2Fshaper.git Issue #108: Extrusion for imported shape is provided --- diff --git a/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp b/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp index 7c6a0eaeb..1fb6e46d5 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp @@ -33,12 +33,20 @@ void FeaturesPlugin_Extrusion::execute() ModelAPI_AttributeReference>(data()->attribute(FeaturesPlugin_Extrusion::FACE_ID())); if (!aFaceRef) return; + boost::shared_ptr aFace; boost::shared_ptr aConstr = boost::dynamic_pointer_cast< ModelAPI_ResultConstruction>(aFaceRef->value()); - if (!aConstr) - return; - boost::shared_ptr aFace = aConstr->shape(); - if (!aFace) + if (aConstr) { + aFace = aConstr->shape(); + } + if (!aFace) { + // Check for body + boost::shared_ptr aBody = boost::dynamic_pointer_cast< + ModelAPI_ResultBody>(aFaceRef->value()); + if (aBody) + aFace = aBody->shape(); + } + if (!aFace) return; double aSize = data()->real(FeaturesPlugin_Extrusion::SIZE_ID())->value();