From: mpv Date: Tue, 29 Jul 2014 07:35:20 +0000 (+0400) Subject: Make circle and arc participate in results construction X-Git-Tag: V_0.4.4~136^2~1^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3a4a6951efb780d3e1318881692cb233a9a8af3e;p=modules%2Fshaper.git Make circle and arc participate in results construction --- diff --git a/src/SketchPlugin/SketchPlugin_Sketch.cpp b/src/SketchPlugin/SketchPlugin_Sketch.cpp index 76e48e076..288e4e529 100644 --- a/src/SketchPlugin/SketchPlugin_Sketch.cpp +++ b/src/SketchPlugin/SketchPlugin_Sketch.cpp @@ -61,12 +61,19 @@ void SketchPlugin_Sketch::execute() std::list< boost::shared_ptr > aFeaturesPreview; for (; anIt != aLast; anIt++) { aFeature = boost::dynamic_pointer_cast(*anIt); - boost::shared_ptr aRes = - boost::dynamic_pointer_cast(aFeature->firstResult()); - if (aRes) { - boost::shared_ptr aShape = aRes->shape(); - if (aShape) - aFeaturesPreview.push_back(aShape); + if (aFeature) { + + const std::list >& aRes = aFeature->results(); + std::list >::const_iterator aResIter = aRes.cbegin(); + for(; aResIter != aRes.cend(); aResIter++) { + boost::shared_ptr aConstr = + boost::dynamic_pointer_cast(*aResIter); + if (aConstr) { + boost::shared_ptr aShape = aConstr->shape(); + if (aShape) + aFeaturesPreview.push_back(aShape); + } + } } }