From: eap Date: Tue, 18 Jan 2011 12:14:09 +0000 (+0000) Subject: 0020832: EDF 1359 SMESH : Automatic meshing of boundary layers X-Git-Tag: StartingPortingMED3~148 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=db8973dc5c4988ded903317553ce3b1f708ce124;p=modules%2Fsmesh.git 0020832: EDF 1359 SMESH : Automatic meshing of boundary layers - SMESHGUI_EXPORT GEOM::GEOM_Object_var GetShapeOnMeshOrSubMesh( _PTR(SObject) ); + SMESHGUI_EXPORT GEOM::GEOM_Object_var GetShapeOnMeshOrSubMesh( _PTR(SObject), bool* isMesh=0 ); --- diff --git a/src/SMESHGUI/SMESHGUI_GEOMGenUtils.cxx b/src/SMESHGUI/SMESHGUI_GEOMGenUtils.cxx index d1a77e845..805026144 100644 --- a/src/SMESHGUI/SMESHGUI_GEOMGenUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_GEOMGenUtils.cxx @@ -52,7 +52,8 @@ namespace SMESH return aGEOMGen; } - GEOM::GEOM_Object_var GetShapeOnMeshOrSubMesh(_PTR(SObject) theMeshOrSubmesh) + GEOM::GEOM_Object_var GetShapeOnMeshOrSubMesh(_PTR(SObject) theMeshOrSubmesh, + bool* isMesh) { SALOMEDS_SObject* aMeshOrSubmesh = _CAST(SObject,theMeshOrSubmesh); if(aMeshOrSubmesh) { @@ -61,11 +62,17 @@ namespace SMESH SMESH::SMESH_Mesh_var aMesh = SObjectToInterface( theMeshOrSubmesh ); if ( !aMesh->_is_nil() ) + { + if ( isMesh ) *isMesh = true; return aMesh->GetShapeToMesh(); + } SMESH::SMESH_subMesh_var aSubmesh = SObjectToInterface( theMeshOrSubmesh ); if ( !aSubmesh->_is_nil() ) + { + if ( isMesh ) *isMesh = false; return aSubmesh->GetSubShape(); + } } } return GEOM::GEOM_Object::_nil(); diff --git a/src/SMESHGUI/SMESHGUI_GEOMGenUtils.h b/src/SMESHGUI/SMESHGUI_GEOMGenUtils.h index 8539f3a31..e78b2ab73 100644 --- a/src/SMESHGUI/SMESHGUI_GEOMGenUtils.h +++ b/src/SMESHGUI/SMESHGUI_GEOMGenUtils.h @@ -43,7 +43,7 @@ namespace SMESH { SMESHGUI_EXPORT GEOM::GEOM_Gen_var GetGEOMGen(); - SMESHGUI_EXPORT GEOM::GEOM_Object_var GetShapeOnMeshOrSubMesh( _PTR(SObject) ); + SMESHGUI_EXPORT GEOM::GEOM_Object_var GetShapeOnMeshOrSubMesh( _PTR(SObject), bool* isMesh=0 ); SMESHGUI_EXPORT GEOM::GEOM_Object_ptr GetGeom( _PTR(SObject) );