Salome HOME
Fix for crash and invisible bodies on Debian Squeeze SALOME version.
[modules/shaper.git] / src / ModelAPI / ModelAPI_Tools.cpp
1 // File:        ModelAPI_Tools.cpp
2 // Created:     06 Aug 2014
3 // Author:      Vitaly Smetannikov
4
5 #include "ModelAPI_Tools.h"
6 #include <ModelAPI_ResultBody.h>
7 #include <ModelAPI_ResultConstruction.h>
8 #include <ModelAPI_ResultGroup.h>
9
10 namespace ModelAPI_Tools {
11
12   boost::shared_ptr<GeomAPI_Shape> shape(const ResultPtr& theResult)
13   {
14 /*
15     ResultBodyPtr aBody = boost::dynamic_pointer_cast<ModelAPI_ResultBody>(theResult);
16     if (aBody)
17       return aBody->shape();
18
19     ResultConstructionPtr aConstruct = boost::dynamic_pointer_cast<ModelAPI_ResultConstruction>(
20       theResult);
21     if (aConstruct)
22       return aConstruct->shape();
23
24     ResultGroupPtr aGroup = boost::dynamic_pointer_cast<ModelAPI_ResultGroup>(theResult);
25     if (aGroup)
26       return aGroup->shape();
27     return boost::shared_ptr<GeomAPI_Shape>();
28     */
29     return theResult->shape();
30   }
31 }