Salome HOME
Fix for stable processing of mirror constraint (eliminating SolveSpace problems)
[modules/shaper.git] / src / SketcherPrs / SketcherPrs_Tools.cpp
index 5f109ca4d4236923ce24f2d4f97f25e0834c8157..9f845f57fc0d2ff8b160fb1174206ca0bf5662c0 100644 (file)
 
 namespace SketcherPrs_Tools {
 
-
-std::shared_ptr<GeomAPI_Shape> getLine(SketchPlugin_Constraint* theFeature,
-                                      const std::string& theAttrName)
+ObjectPtr getResult(SketchPlugin_Constraint* theFeature, const std::string& theAttrName)
 {
   std::shared_ptr<ModelAPI_Data> aData = theFeature->data();
   std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr = 
     std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(aData->attribute(theAttrName));
 
-  ObjectPtr aObject = anAttr->object();
-  ResultConstructionPtr aRes = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aObject);
+  return anAttr->object();
+}
+
+
+std::shared_ptr<GeomAPI_Shape> getShape(ObjectPtr theObject)
+{
+  ResultConstructionPtr aRes = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(theObject);
   if (aRes.get() != NULL) {
     return aRes->shape();
   }