From 330b5970e31ffc5c66b1d0ec4c7d5fd8cdce9e6a Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 11 Apr 2012 13:08:52 +0000 Subject: [PATCH] 0021530: EDF 2176 SMESH: Projection 1D-2D with compounds + static std::string GeomObjectToEntry(GEOM::GEOM_Object_ptr& theGeomObject); --- src/StdMeshers_I/StdMeshers_ObjRefUlils.cxx | 14 ++++++++++++++ src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx | 8 +++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/StdMeshers_I/StdMeshers_ObjRefUlils.cxx b/src/StdMeshers_I/StdMeshers_ObjRefUlils.cxx index 3667a852a..bca540fc8 100644 --- a/src/StdMeshers_I/StdMeshers_ObjRefUlils.cxx +++ b/src/StdMeshers_I/StdMeshers_ObjRefUlils.cxx @@ -31,6 +31,20 @@ using namespace std; +//======================================================================= +//function : GeomObjectToEntry +//purpose : Return study entry of GEOM Object +//======================================================================= + +std::string StdMeshers_ObjRefUlils::GeomObjectToEntry(GEOM::GEOM_Object_ptr& theGeomObject) +{ + if ( CORBA::is_nil( theGeomObject )) + return "NULL_OBJECT"; + + CORBA::String_var entry = theGeomObject->GetStudyEntry(); + return entry.in(); +} + //======================================================================= //function : EntryOrShapeToGeomObject //purpose : Return GEOM Object by its sytudy entry or TopoDS_Shape diff --git a/src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx b/src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx index 8ab879d60..913224364 100644 --- a/src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx +++ b/src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx @@ -66,11 +66,17 @@ public: } /*! - * \brief Return GEOM Object by its sytudy entry or TopoDS_Shape + * \brief Return study entry of GEOM Object + */ + static std::string GeomObjectToEntry(GEOM::GEOM_Object_ptr& theGeomObject); + + /*! + * \brief Return GEOM Object by its study entry or TopoDS_Shape */ static GEOM::GEOM_Object_ptr EntryOrShapeToGeomObject (const std::string& theEntry, const TopoDS_Shape& theShape); + /*! * \brief Store the shape in the stream * \param theShape - shape to store -- 2.39.2