From cce300634f2713209bb7e7be1f774b8958afe20a Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 30 Nov 2010 10:37:24 +0000 Subject: [PATCH] 0020945: EDF 1465 SMESH: create a new mesh from a selected group or from selected elements Add a new object type: + IDSOURCE --- src/SMESHFiltersSelection/SMESH_Type.h | 4 ++-- src/SMESHFiltersSelection/SMESH_TypeFilter.cxx | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/SMESHFiltersSelection/SMESH_Type.h b/src/SMESHFiltersSelection/SMESH_Type.h index 89857d89c..ee962f22e 100644 --- a/src/SMESHFiltersSelection/SMESH_Type.h +++ b/src/SMESHFiltersSelection/SMESH_Type.h @@ -25,7 +25,6 @@ // Author : Nicolas REJNERI // Project : SALOME // Module : SMESH -// $Header$ // #ifndef SMESH_TYPE_HEADER #define SMESH_TYPE_HEADER @@ -57,7 +56,8 @@ enum MeshObjectType { GROUP_FACE, GROUP_VOLUME, GROUP_0D, - COMPONENT + COMPONENT, + IDSOURCE }; #endif diff --git a/src/SMESHFiltersSelection/SMESH_TypeFilter.cxx b/src/SMESHFiltersSelection/SMESH_TypeFilter.cxx index 1fbb37516..a684d7023 100644 --- a/src/SMESHFiltersSelection/SMESH_TypeFilter.cxx +++ b/src/SMESHFiltersSelection/SMESH_TypeFilter.cxx @@ -203,6 +203,12 @@ bool SMESH_TypeFilter::isOk (const SUIT_DataOwner* theDataOwner) const Ok = true; break; } + case IDSOURCE: + { + Ok = ( SMESH_TypeFilter(MESHorSUBMESH).isOk( theDataOwner ) || + SMESH_TypeFilter(GROUP) .isOk( theDataOwner )); + break; + } } } return Ok; -- 2.39.2