1 // Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // SMESH SMESHGUI_Selection
24 // File : SMESHGUI_Selection.cxx
25 // Author : Alexander SOLOVYOV, Open CASCADE S.A.S.
29 #include "SMESHGUI_Selection.h"
31 #include "SMESHGUI_Utils.h"
32 #include "SMESHGUI_VTKUtils.h"
33 #include "SMESHGUI_GEOMGenUtils.h"
34 #include "SMESHGUI_ComputeDlg.h"
36 #include <SMESH_Type.h>
37 #include <SMESH_Actor.h>
38 #include <SMESH_ScalarBarActor.h>
40 // SALOME GUI includes
41 #include <SalomeApp_Study.h>
42 #include <LightApp_VTKSelector.h>
43 #include <SVTK_ViewWindow.h>
46 #include <SALOMEconfig.h>
47 #include CORBA_CLIENT_HEADER(SMESH_Gen)
48 #include CORBA_CLIENT_HEADER(SMESH_Mesh)
49 #include CORBA_CLIENT_HEADER(SMESH_Group)
51 //=======================================================================
52 //function : SMESHGUI_Selection
54 //=======================================================================
55 SMESHGUI_Selection::SMESHGUI_Selection()
56 : LightApp_Selection()
60 //=======================================================================
61 //function : ~SMESHGUI_Selection
63 //=======================================================================
64 SMESHGUI_Selection::~SMESHGUI_Selection()
68 //=======================================================================
71 //=======================================================================
72 void SMESHGUI_Selection::init( const QString& client, LightApp_SelectionMgr* mgr )
74 LightApp_Selection::init( client, mgr );
78 SalomeApp_Study* aSStudy = dynamic_cast<SalomeApp_Study*>(study());
81 _PTR(Study) aStudy = aSStudy->studyDS();
83 for( int i=0, n=count(); i<n; i++ )
84 myTypes.append( typeName( type( entry( i ), aStudy ) ) );
88 //=======================================================================
89 //function : processOwner
91 //=======================================================================
92 bool SMESHGUI_Selection::processOwner( const LightApp_DataOwner* ow )
94 const LightApp_SVTKDataOwner* owner =
95 dynamic_cast<const LightApp_SVTKDataOwner*> ( ow );
97 myActors.append( dynamic_cast<SMESH_Actor*>( owner->GetActor() ) );
99 else if ( ow ) { // SVTK selection disabled
100 QString entry = ow->entry();
101 myActors.append( SMESH::FindActorByEntry( entry.toStdString().c_str() ));
104 myActors.append( 0 );
109 //=======================================================================
110 //function : parameter
112 //=======================================================================
113 QVariant SMESHGUI_Selection::parameter( const int ind, const QString& p ) const
116 if ( p=="client" ) val = QVariant( LightApp_Selection::parameter( p ) );
117 else if ( p=="type" ) val = QVariant( myTypes[ind] );
118 else if ( p=="elemTypes" ) val = QVariant( elemTypes( ind ) );
119 else if ( p=="isAutoColor" ) val = QVariant( isAutoColor( ind ) );
120 else if ( p=="numberOfNodes" ) val = QVariant( numberOfNodes( ind ) );
121 else if ( p=="dim" ) val = QVariant( dim( ind ) );
122 else if ( p=="labeledTypes" ) val = QVariant( labeledTypes( ind ) );
123 else if ( p=="shrinkMode" ) val = QVariant( shrinkMode( ind ) );
124 else if ( p=="entityMode" ) val = QVariant( entityMode( ind ) );
125 else if ( p=="controlMode" ) val = QVariant( controlMode( ind ) );
126 else if ( p=="isNumFunctor" ) val = QVariant( isNumFunctor( ind ) );
127 else if ( p=="displayMode" ) val = QVariant( displayMode( ind ) );
128 else if ( p=="isComputable" ) val = QVariant( isComputable( ind ) );
129 else if ( p=="isPreComputable" ) val = QVariant( isPreComputable( ind ) );
130 else if ( p=="hasReference" ) val = QVariant( hasReference( ind ) );
131 else if ( p=="isImported" ) val = QVariant( isImported( ind ) );
132 else if ( p=="facesOrientationMode" ) val = QVariant( facesOrientationMode( ind ) );
133 else if ( p=="groupType" ) val = QVariant( groupType( ind ) );
134 else if ( p=="quadratic2DMode") val = QVariant( quadratic2DMode( ind ) );
135 else if ( p=="isDistributionVisible") val = QVariant( isDistributionVisible( ind ) );
136 else if ( p=="hasChildren") val = QVariant( hasChildren( ind ) );
137 else if ( p=="nbChildren") val = QVariant( nbChildren( ind ) );
138 else if ( p=="isContainer") val = QVariant( isContainer( ind ) );
143 return LightApp_Selection::parameter( ind, p );
146 //=======================================================================
147 //function : getVtkOwner
149 //=======================================================================
151 SMESH_Actor* SMESHGUI_Selection::getActor( int ind ) const
153 if( ind >= 0 && ind < count() )
154 return myActors.isEmpty() ? 0 : myActors.at( ind );
159 //=======================================================================
160 //function : elemTypes
161 //purpose : may return {'Elem0d' 'Edge' 'Face' 'Volume' 'BallElem'} at most
162 //=======================================================================
164 QList<QVariant> SMESHGUI_Selection::elemTypes( int ind ) const
166 QList<QVariant> types;
167 SMESH_Actor* actor = getActor( ind );
169 TVisualObjPtr object = actor->GetObject();
171 if ( object->GetNbEntities( SMDSAbs_0DElement )) types.append( "Elem0d" );
172 if ( object->GetNbEntities( SMDSAbs_Ball )) types.append( "BallElem" );
173 if ( object->GetNbEntities( SMDSAbs_Edge )) types.append( "Edge" );
174 if ( object->GetNbEntities( SMDSAbs_Face )) types.append( "Face" );
175 if ( object->GetNbEntities( SMDSAbs_Volume )) types.append( "Volume" );
181 //=======================================================================
182 //function : labeledTypes
183 //purpose : may return {'Point' 'Cell'} at most
184 //=======================================================================
186 QList<QVariant> SMESHGUI_Selection::labeledTypes( int ind ) const
188 QList<QVariant> types;
189 SMESH_Actor* actor = getActor( ind );
191 if ( actor->GetPointsLabeled()) types.append( "Point" );
192 if ( actor->GetCellsLabeled()) types.append( "Cell" );
197 //=======================================================================
198 //function : displayMode
199 //purpose : return SMESH_Actor::EReperesent
200 //=======================================================================
202 QString SMESHGUI_Selection::displayMode( int ind ) const
204 SMESH_Actor* actor = getActor( ind );
206 switch( actor->GetRepresentation() ) {
207 case SMESH_Actor::eEdge: return "eEdge";
208 case SMESH_Actor::eSurface: return "eSurface";
209 case SMESH_Actor::ePoint: return "ePoint";
217 //=======================================================================
218 //function : quadratic2DMode
219 //purpose : return SMESH_Actor::EQuadratic2DRepresentation
220 //=======================================================================
221 QString SMESHGUI_Selection::quadratic2DMode( int ind ) const
223 SMESH_Actor* actor = getActor( ind );
225 switch( actor->GetQuadratic2DRepresentation() ) {
226 case SMESH_Actor::eLines: return "eLines";
227 case SMESH_Actor::eArcs: return "eArcs";
234 //=======================================================================
235 //function : isDistributionVisible
236 //purpose : Visible/Invisible distribution of the ScalarBar Actor
237 //=======================================================================
239 bool SMESHGUI_Selection::isDistributionVisible(int ind) const {
240 SMESH_Actor* actor = getActor( ind );
241 return (actor && actor->GetScalarBarActor() && actor->GetScalarBarActor()->GetDistributionVisibility());
244 //=======================================================================
245 //function : shrinkMode
246 //purpose : return either 'IsSrunk', 'IsNotShrunk' or 'IsNotShrinkable'
247 //=======================================================================
249 QString SMESHGUI_Selection::shrinkMode( int ind ) const
251 SMESH_Actor* actor = getActor( ind );
252 if ( actor && actor->IsShrunkable() ) {
253 return actor->IsShrunk() ? "IsShrunk" : "IsNotShrunk";
255 return "IsNotShrinkable";
258 //=======================================================================
259 //function : entityMode
260 //purpose : may return {'Elem0d' 'Edge' 'Face' 'Volume' 'BallElem' } at most
261 //=======================================================================
263 QList<QVariant> SMESHGUI_Selection::entityMode( int ind ) const
265 QList<QVariant> types;
266 SMESH_Actor* actor = getActor( ind );
268 unsigned int aMode = actor->GetEntityMode();
269 if ( aMode & SMESH_Actor::eVolumes ) types.append( "Volume" );
270 if ( aMode & SMESH_Actor::eFaces ) types.append( "Face" );
271 if ( aMode & SMESH_Actor::eEdges ) types.append( "Edge" );
272 if ( aMode & SMESH_Actor::e0DElements ) types.append( "Elem0d" );
273 if ( aMode & SMESH_Actor::eBallElem ) types.append( "BallElem" );
278 //=======================================================================
279 //function : controlMode
280 //purpose : return SMESH_Actor::eControl
281 //=======================================================================
283 QString SMESHGUI_Selection::controlMode( int ind ) const
285 SMESH_Actor* actor = getActor( ind );
286 QString mode = "eNone";
288 switch( actor->GetControlMode() ) {
289 case SMESH_Actor::eLength: mode = "eLength"; break;
290 case SMESH_Actor::eLength2D: mode = "eLength2D"; break;
291 case SMESH_Actor::eFreeEdges: mode = "eFreeEdges"; break;
292 case SMESH_Actor::eFreeNodes: mode = "eFreeNodes"; break;
293 case SMESH_Actor::eFreeBorders: mode = "eFreeBorders"; break;
294 case SMESH_Actor::eFreeFaces: mode = "eFreeFaces"; break;
295 case SMESH_Actor::eMultiConnection: mode = "eMultiConnection"; break;
296 case SMESH_Actor::eMultiConnection2D: mode = "eMultiConnection2D"; break;
297 case SMESH_Actor::eArea: mode = "eArea"; break;
298 case SMESH_Actor::eVolume3D: mode = "eVolume3D"; break;
299 case SMESH_Actor::eMaxElementLength2D: mode = "eMaxElementLength2D"; break;
300 case SMESH_Actor::eMaxElementLength3D: mode = "eMaxElementLength3D"; break;
301 case SMESH_Actor::eTaper: mode = "eTaper"; break;
302 case SMESH_Actor::eAspectRatio: mode = "eAspectRatio"; break;
303 case SMESH_Actor::eAspectRatio3D: mode = "eAspectRatio3D"; break;
304 case SMESH_Actor::eMinimumAngle: mode = "eMinimumAngle"; break;
305 case SMESH_Actor::eWarping: mode = "eWarping"; break;
306 case SMESH_Actor::eSkew: mode = "eSkew"; break;
307 case SMESH_Actor::eBareBorderFace: mode = "eBareBorderFace"; break;
308 case SMESH_Actor::eBareBorderVolume: mode = "eBareBorderVolume"; break;
309 case SMESH_Actor::eOverConstrainedFace: mode = "eOverConstrainedFace"; break;
310 case SMESH_Actor::eOverConstrainedVolume: mode = "eOverConstrainedVolume"; break;
311 case SMESH_Actor::eCoincidentNodes: mode = "eCoincidentNodes"; break;
312 case SMESH_Actor::eCoincidentElems1D: mode = "eCoincidentElems1D"; break;
313 case SMESH_Actor::eCoincidentElems2D: mode = "eCoincidentElems2D"; break;
314 case SMESH_Actor::eCoincidentElems3D: mode = "eCoincidentElems3D"; break;
321 bool SMESHGUI_Selection::isNumFunctor( int ind ) const
324 SMESH_Actor* actor = getActor( ind );
326 switch( actor->GetControlMode() ) {
327 case SMESH_Actor::eLength:
328 case SMESH_Actor::eLength2D:
329 case SMESH_Actor::eMultiConnection:
330 case SMESH_Actor::eMultiConnection2D:
331 case SMESH_Actor::eArea:
332 case SMESH_Actor::eVolume3D:
333 case SMESH_Actor::eMaxElementLength2D:
334 case SMESH_Actor::eMaxElementLength3D:
335 case SMESH_Actor::eTaper:
336 case SMESH_Actor::eAspectRatio:
337 case SMESH_Actor::eAspectRatio3D:
338 case SMESH_Actor::eMinimumAngle:
339 case SMESH_Actor::eWarping:
340 case SMESH_Actor::eSkew:
350 //=======================================================================
351 //function : facesOrientationMode
353 //=======================================================================
355 QString SMESHGUI_Selection::facesOrientationMode( int ind ) const
357 SMESH_Actor* actor = getActor( ind );
359 return actor->GetFacesOriented() ? "IsOriented" : "IsNotOriented";
364 //=======================================================================
365 //function : isAutoColor
367 //=======================================================================
369 bool SMESHGUI_Selection::isAutoColor( int ind ) const
371 if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
373 _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
374 CORBA::Object_var obj = SMESH::SObjectToObject( sobj, SMESH::GetActiveStudyDocument() );
376 if ( !CORBA::is_nil( obj ) ) {
377 SMESH::SMESH_Mesh_var mesh = SMESH::SMESH_Mesh::_narrow( obj );
378 if ( !CORBA::is_nil( mesh ) )
379 return mesh->GetAutoColor();
385 //=======================================================================
386 //function : numberOfNodes
387 //purpose : this method is actually used to check if an object is empty or not
388 //=======================================================================
390 int SMESHGUI_Selection::numberOfNodes( int ind ) const
392 if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
394 _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
395 CORBA::Object_var obj = SMESH::SObjectToObject( sobj, SMESH::GetActiveStudyDocument() );
397 if ( !CORBA::is_nil( obj ) ) {
398 SMESH::SMESH_Mesh_var mesh = SMESH::SMESH_Mesh::_narrow( obj );
399 if ( !CORBA::is_nil( mesh ) )
400 return mesh->NbNodes();
401 SMESH::SMESH_subMesh_var aSubMeshObj = SMESH::SMESH_subMesh::_narrow( obj );
402 if ( !CORBA::is_nil( aSubMeshObj ) )
403 return aSubMeshObj->GetNumberOfNodes(true);
404 SMESH::SMESH_GroupBase_var aGroupObj = SMESH::SMESH_GroupBase::_narrow( obj );
405 if ( !CORBA::is_nil( aGroupObj ) )
406 return aGroupObj->IsEmpty() ? 0 : 1; // aGroupObj->Size();
412 //================================================================================
414 * \brief return dimension of elements of the selected object
416 * \retval int - 0 for 0D elements, -1 for an empty object (the rest as usual)
418 //================================================================================
420 int SMESHGUI_Selection::dim( int ind ) const
423 if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
425 _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
426 CORBA::Object_var obj = SMESH::SObjectToObject( sobj, SMESH::GetActiveStudyDocument() );
428 if ( !CORBA::is_nil( obj ) ) {
429 SMESH::SMESH_IDSource_var idSrc = SMESH::SMESH_IDSource::_narrow( obj );
430 if ( !CORBA::is_nil( idSrc ) )
432 SMESH::array_of_ElementType_var types = idSrc->GetTypes();
433 for ( int i = 0; i < types->length(); ++ i) {
434 switch ( types[i] ) {
435 case SMESH::EDGE : dim = std::max( dim, 1 ); break;
436 case SMESH::FACE : dim = std::max( dim, 2 ); break;
437 case SMESH::VOLUME: dim = std::max( dim, 3 ); break;
438 case SMESH::ELEM0D: dim = std::max( dim, 0 ); break;
439 case SMESH::BALL : dim = std::max( dim, 0 ); break;
449 //=======================================================================
450 //function : isComputable
452 //=======================================================================
454 QVariant SMESHGUI_Selection::isComputable( int ind ) const
456 if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
458 _PTR(SObject) so = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
459 CORBA::Object_var obj = SMESH::SObjectToObject( so, SMESH::GetActiveStudyDocument() );
460 if( !CORBA::is_nil( obj ) ) {
461 SMESH::SMESH_Mesh_var mesh = SMESH::SMESH_Mesh::_narrow( obj );
462 if ( !CORBA::is_nil( mesh ) ) {
463 if ( mesh->HasShapeToMesh() ) {
464 GEOM::GEOM_Object_var shape = SMESH::GetShapeOnMeshOrSubMesh( so );
465 return QVariant( !shape->_is_nil() );
469 return QVariant( mesh->NbFaces() !=0 );
474 GEOM::GEOM_Object_var shape = SMESH::GetShapeOnMeshOrSubMesh( so );
475 return QVariant( !shape->_is_nil() );
479 return QVariant( false );
482 //=======================================================================
483 //function : isPreComputable
485 //=======================================================================
487 QVariant SMESHGUI_Selection::isPreComputable( int ind ) const
489 if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
491 QMap<int,int> modeMap;
492 _PTR(SObject) pMesh = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
493 SMESHGUI_PrecomputeOp::getAssignedAlgos( pMesh, modeMap );
494 return QVariant( modeMap.size() > 1 );
496 return QVariant( false );
499 //=======================================================================
500 //function : hasReference
502 //=======================================================================
504 QVariant SMESHGUI_Selection::hasReference( int ind ) const
506 return QVariant( isReference( ind ) );
509 //=======================================================================
510 //function : isVisible
512 //=======================================================================
514 QVariant SMESHGUI_Selection::isVisible( int ind ) const
516 if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
518 SMESH_Actor* actor = SMESH::FindActorByEntry( entry( ind ).toLatin1().data() );
519 if ( actor && actor->hasIO() ) {
520 if ( SVTK_ViewWindow* aViewWindow = SMESH::GetCurrentVtkView() )
521 return QVariant( aViewWindow->isVisible( actor->getIO() ) );
524 return QVariant( false );
527 //=======================================================================
528 //function : hasChildren
530 //=======================================================================
532 bool SMESHGUI_Selection::hasChildren( int ind ) const
536 _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
538 return SMESH::GetActiveStudyDocument()->GetUseCaseBuilder()->HasChildren( sobj );
543 //=======================================================================
544 //function : hasChildren
546 //=======================================================================
548 int SMESHGUI_Selection::nbChildren( int ind ) const
553 _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
554 if ( sobj && sobj->GetStudy()->GetUseCaseBuilder()->IsUseCaseNode( sobj ) ) {
555 _PTR(UseCaseIterator) it = sobj->GetStudy()->GetUseCaseBuilder()->GetUseCaseIterator( sobj );
556 for ( it->Init( false ); it->More(); it->Next() ) nb++;
562 //=======================================================================
563 //function : isContainer
565 //=======================================================================
567 bool SMESHGUI_Selection::isContainer( int ind ) const
569 return ind >= 0 && ind < myTypes.count() && myTypes[ind] == "Unknown";
572 //=======================================================================
575 //=======================================================================
577 int SMESHGUI_Selection::type( const QString& entry, _PTR(Study) study )
580 _PTR(SObject) obj = study->FindObjectID( entry.toLatin1().data() );
583 if ( obj->ReferencedObject( ref ) )
586 _PTR(SObject) objFather = obj->GetFather();
587 _PTR(SComponent) objComponent = obj->GetFatherComponent();
589 if ( objComponent->ComponentDataType() == "SMESH" ) {
590 if ( objComponent->GetIOR() == obj->GetIOR() ) {
591 res = SMESH::COMPONENT;
594 int aLevel = obj->Depth() - objComponent->Depth(),
595 aFTag = objFather->Tag(),
601 if ( anOTag >= SMESH::Tag_FirstMeshRoot )
607 case SMESH::Tag_HypothesisRoot: res = SMESH::HYPOTHESIS; break;
608 case SMESH::Tag_AlgorithmsRoot: res = SMESH::ALGORITHM; break;
615 case SMESH::Tag_SubMeshOnVertex: res = SMESH::SUBMESH_VERTEX; break;
616 case SMESH::Tag_SubMeshOnEdge: res = SMESH::SUBMESH_EDGE; break;
617 case SMESH::Tag_SubMeshOnFace: res = SMESH::SUBMESH_FACE; break;
618 case SMESH::Tag_SubMeshOnSolid: res = SMESH::SUBMESH_SOLID; break;
619 case SMESH::Tag_SubMeshOnCompound: res = SMESH::SUBMESH_COMPOUND; break;
621 if ( aFTag >= SMESH::Tag_FirstGroup) res = SMESH::GROUP;
622 else res = SMESH::SUBMESH;
633 //=======================================================================
634 //function : typeName
636 //=======================================================================
638 QString SMESHGUI_Selection::typeName( const int t )
640 QString res = "Unknown";
643 case SMESH::HYPOTHESIS:
644 res = "Hypothesis"; break;
645 case SMESH::ALGORITHM:
646 res = "Algorithm"; break;
650 res = "SubMesh"; break;
651 case SMESH::MESHorSUBMESH:
652 res = "Mesh or submesh"; break;
653 case SMESH::SUBMESH_VERTEX:
654 res = "Mesh vertex"; break;
655 case SMESH::SUBMESH_EDGE:
656 res = "Mesh edge"; break;
657 case SMESH::SUBMESH_FACE:
658 res = "Mesh face"; break;
659 case SMESH::SUBMESH_SOLID:
660 res = "Mesh solid"; break;
661 case SMESH::SUBMESH_COMPOUND:
662 res = "Mesh compound"; break;
664 res = "Group"; break;
665 case SMESH::COMPONENT:
666 res = "Component"; break;
673 bool SMESHGUI_Selection::isImported( const int ind ) const
676 _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().constData() );
679 SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_narrow( SMESH::SObjectToObject( sobj ) );
680 if( !aMesh->_is_nil() )
682 SMESH::MedFileInfo_var inf = aMesh->GetMEDFileInfo();
683 res = strlen( (char*)inf->fileName ) > 0;
689 //=======================================================================
690 //function : groupType
692 //=======================================================================
694 QString SMESHGUI_Selection::groupType( int ind ) const
696 _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().constData() );
699 SMESH::SMESH_Group_var g = SMESH::SObjectToInterface<SMESH::SMESH_Group>( sobj );
700 if ( !CORBA::is_nil( g ) )
702 SMESH::SMESH_GroupOnGeom_var gog = SMESH::SObjectToInterface<SMESH::SMESH_GroupOnGeom>( sobj );
703 if( !CORBA::is_nil( gog ) )
704 return "GroupOnGeom";
705 SMESH::SMESH_GroupOnFilter_var gof = SMESH::SObjectToInterface<SMESH::SMESH_GroupOnFilter>( sobj );
706 if ( !CORBA::is_nil( gof ) )
707 return "GroupOnFilter";