]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModelHighAPI/ModelHighAPI_Services.cpp
Salome HOME
Issue #1648: Dump Python in the High Level Parameterized Geometry API. Debug of unit...
[modules/shaper.git] / src / ModelHighAPI / ModelHighAPI_Services.cpp
index 80f466e5e4568f11685293587b84eef39aed9382..c1c6e64b3a1d1f5f4df34ccf2f12bf2f40c0a0ee 100644 (file)
@@ -10,6 +10,8 @@
 #include <GeomAPI_Ax3.h>
 #include <GeomAPI_Pnt.h>
 #include <ModelAPI_Session.h>
+#include <ModelAPI_Document.h>
+#include <ModelAPI_ResultConstruction.h>
 
 #include <cmath>
 
@@ -70,6 +72,13 @@ std::string defaultPlane(const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
   return std::string();
 }
 
+std::shared_ptr<ModelAPI_Result> standardPlane(const std::string & theName){
+  DocumentPtr aPartSet = ModelAPI_Session::get()->moduleDocument();
+  // searching for the construction element
+  return std::dynamic_pointer_cast<ModelAPI_Result>(
+    aPartSet->objectByName(ModelAPI_ResultConstruction::group(), theName));
+}
+
 //--------------------------------------------------------------------------------------
 void begin()
 {