1 // File: ModelAPI_Tools.cpp
2 // Created: 06 Aug 2014
3 // Author: Vitaly Smetannikov
5 #include "ModelAPI_Tools.h"
6 #include <ModelAPI_ResultBody.h>
7 #include <ModelAPI_ResultConstruction.h>
9 namespace ModelAPI_Tools {
11 boost::shared_ptr<GeomAPI_Shape> shape(const ResultPtr& theResult)
13 ResultBodyPtr aBody = boost::dynamic_pointer_cast<ModelAPI_ResultBody>(theResult);
15 return aBody->shape();
16 ResultConstructionPtr aConstruct = boost::dynamic_pointer_cast<ModelAPI_ResultConstruction>(
19 return aConstruct->shape();
20 return boost::shared_ptr<GeomAPI_Shape>();