]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0020832: EDF 1359 SMESH : Automatic meshing of boundary layers
authoreap <eap@opencascade.com>
Wed, 15 Dec 2010 10:44:44 +0000 (10:44 +0000)
committereap <eap@opencascade.com>
Wed, 15 Dec 2010 10:44:44 +0000 (10:44 +0000)
-  SMESHGUI_EXPORT GEOM::GEOM_Object_var GetShapeOnMeshOrSubMesh( _PTR(SObject) );
+  SMESHGUI_EXPORT GEOM::GEOM_Object_var GetShapeOnMeshOrSubMesh( _PTR(SObject), bool* isMesh=0 );

src/SMESHGUI/SMESHGUI_GEOMGenUtils.cxx
src/SMESHGUI/SMESHGUI_GEOMGenUtils.h

index d1a77e845df3b0b75552124727a34ea005d458cb..805026144d62b4078a3892bdfda33e4b79a5421c 100644 (file)
@@ -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<SMESH::SMESH_Mesh>( theMeshOrSubmesh );
         if ( !aMesh->_is_nil() )
+        {
+          if ( isMesh ) *isMesh = true;
           return aMesh->GetShapeToMesh();
+        }
         SMESH::SMESH_subMesh_var aSubmesh =
           SObjectToInterface<SMESH::SMESH_subMesh>( theMeshOrSubmesh );
         if ( !aSubmesh->_is_nil() )
+        {
+          if ( isMesh ) *isMesh = false;
           return aSubmesh->GetSubShape();
+        }
       }
     }
     return GEOM::GEOM_Object::_nil();
index 8539f3a313309f867bc5acde1cc4f8e2f0a1d941..e78b2ab73c1d35d7ee9edb8f4347ac9f00e58f1f 100644 (file)
@@ -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) );