Salome HOME
Merge branch 'Dev_0.6' of newgeom:newgeom into Dev_0.6
[modules/shaper.git] / src / ModelAPI / ModelAPI_Tools.cpp
index 1c49c67799d045d685966049f14e095b5bdc1f65..8f91a914a817017d52e46bd453eba7a8627e1d47 100644 (file)
@@ -5,17 +5,27 @@
 #include "ModelAPI_Tools.h"
 #include <ModelAPI_ResultBody.h>
 #include <ModelAPI_ResultConstruction.h>
-
+#include <ModelAPI_ResultGroup.h>
 
 namespace ModelAPI_Tools {
 
-boost::shared_ptr<GeomAPI_Shape> shape(const ResultPtr& theResult)
-{
-  ResultBodyPtr aBody = boost::dynamic_pointer_cast<ModelAPI_ResultBody>(theResult);
-  if (aBody) return aBody->shape();
-  ResultConstructionPtr aConstruct = boost::dynamic_pointer_cast<ModelAPI_ResultConstruction>(theResult);
-  if (aConstruct) return aConstruct->shape();
-  return boost::shared_ptr<GeomAPI_Shape>();
-}
+  std::shared_ptr<GeomAPI_Shape> shape(const ResultPtr& theResult)
+  {
+/*
+    ResultBodyPtr aBody = std::dynamic_pointer_cast<ModelAPI_ResultBody>(theResult);
+    if (aBody)
+      return aBody->shape();
 
-}
\ No newline at end of file
+    ResultConstructionPtr aConstruct = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(
+      theResult);
+    if (aConstruct)
+      return aConstruct->shape();
+
+    ResultGroupPtr aGroup = std::dynamic_pointer_cast<ModelAPI_ResultGroup>(theResult);
+    if (aGroup)
+      return aGroup->shape();
+    return std::shared_ptr<GeomAPI_Shape>();
+    */
+    return theResult->shape();
+  }
+}