X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_Gen_i_1.cxx;h=1638083b5869b129580b36225e97542b924cff39;hp=a7567450f5f94174f07ecd5a6e5969494e33b712;hb=1d17e561d72445f7f4f818de637ae0272a204780;hpb=392aa8c6a113d005f43f95b0cbf13d024d05611f diff --git a/src/SMESH_I/SMESH_Gen_i_1.cxx b/src/SMESH_I/SMESH_Gen_i_1.cxx index a7567450f..1638083b5 100644 --- a/src/SMESH_I/SMESH_Gen_i_1.cxx +++ b/src/SMESH_I/SMESH_Gen_i_1.cxx @@ -38,6 +38,7 @@ #include "Utils_ExceptHandlers.hxx" #include +#include #ifdef _DEBUG_ static int MYDEBUG = 0; @@ -140,6 +141,11 @@ long SMESH_Gen_i::Get0DElementsGroupsTag() return SMESH::Tag_0DElementsGroups; } +long SMESH_Gen_i::GetBallElementsGroupsTag() +{ + return SMESH::Tag_BallElementsGroups; +} + //============================================================================= /*! * SMESH_Gen_i::CanPublishInStudy @@ -683,16 +689,18 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishGroup (SALOMEDS::Study_ptr theStudy int aType = (int)theGroup->GetType(); const char* aRootNames[] = { "Compound Groups", "Groups of Nodes", "Groups of Edges", - "Groups of Faces", "Groups of Volumes", "Groups of 0D Elements" }; + "Groups of Faces", "Groups of Volumes", "Groups of 0D Elements", + "Groups of Balls" }; // Currently, groups with heterogenous content are not supported - if ( aType != SMESH::ALL ) { + if ( aType != SMESH::ALL ) + { long aRootTag = GetNodeGroupsTag() + aType - 1; // Find or create groups root SALOMEDS::SObject_var aRootSO = publish (theStudy, CORBA::Object::_nil(), aMeshSO, aRootTag, 0, false ); - if ( aType < 6 ) + if ( aType < sizeof(aRootNames)/sizeof(char*) ) SetName( aRootSO, aRootNames[aType] ); // Add new group to corresponding sub-tree