]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOMGUI/GEOMGUI_Selection.cxx
Salome HOME
Merge from BR_siman_phase1 14/02/2013
[modules/geom.git] / src / GEOMGUI / GEOMGUI_Selection.cxx
1 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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.
10 //
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.
15 //
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
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21
22 // File   : GEOMGUI_Selection.cxx
23 // Author : Alexander SOLOVYOV, Open CASCADE S.A.S. (alexander.solovyov@opencascade.com)
24
25 #include "GEOMGUI_Selection.h"
26
27 #include "GeometryGUI.h"
28 #include "GEOM_Displayer.h"
29
30 #include "Material_Model.h"
31
32 #include <GEOM_Constants.h>
33
34 #include <SalomeApp_Application.h>
35 #include <SalomeApp_Study.h>
36
37 #include "LightApp_DataOwner.h"
38
39 #include <SUIT_Session.h>
40 #include <SUIT_Desktop.h>
41 #include <SUIT_ViewWindow.h>
42 #include <SUIT_ViewManager.h>
43
44 #include <SALOME_Prs.h>
45 #include <SALOME_InteractiveObject.hxx>
46
47 #include <SOCC_Prs.h>
48 #include <SVTK_Prs.h>
49 #include <SALOME_Actor.h>
50 #include <GEOM_Actor.h>
51
52 #include <OCCViewer_ViewModel.h>
53 #include <SVTK_ViewModel.h>
54
55 #include <GEOMImpl_Types.hxx>
56
57 #include <GEOM_AISShape.hxx>
58 #include <GEOM_VTKPropertyMaterial.hxx>
59
60 // OCCT Includes
61 #include <AIS.hxx>
62 #include <AIS_InteractiveObject.hxx>
63 #include <AIS_ListOfInteractive.hxx>
64 #include <AIS_GraphicTool.hxx>
65 #include <AIS_Drawer.hxx>
66 #include <Aspect_TypeOfFacingModel.hxx>
67 #include <Prs3d_ShadingAspect.hxx>
68 #include<Graphic3d_MaterialAspect.hxx>
69
70 // VTK Includes
71 #include <vtkActorCollection.h>
72
73 #define OCC_DISPLAY_MODE_TO_STRING( str, dm ) { \
74     if ( dm == AIS_WireFrame ) \
75       str = QString( "Wireframe" ); \
76     else if ( dm == AIS_Shaded )    \
77       str = QString( "Shading" ); \
78     else if ( dm == GEOM_AISShape::ShadingWithEdges )    \
79       str = QString( "ShadingWithEdges" ); \
80     else if ( dm == GEOM_AISShape::TexturedShape )    \
81       str = QString( "Texture" ); \
82     else \
83       str = QString(); }
84
85 #define VTK_DISPLAY_MODE_TO_STRING( str, dm ) { \
86     if ( dm == 0 ) \
87       str = QString( "Wireframe" ); \
88     else if ( dm == 1 )    \
89       str = QString( "Shading" ); \
90     else if ( dm == 3 )    \
91       str = QString( "ShadingWithEdges" ); \
92     else \
93       str = QString(); }
94
95 #define USE_VISUAL_PROP_MAP
96
97 GEOMGUI_Selection::GEOMGUI_Selection()
98 : LightApp_Selection()
99 {
100 }
101
102 GEOMGUI_Selection::~GEOMGUI_Selection()
103 {
104 }
105
106 void GEOMGUI_Selection::init( const QString& context, LightApp_SelectionMgr* selMgr )
107 {
108   LightApp_Selection::init( context, selMgr );
109
110   myObjects.resize( count() );
111
112   SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( study() );
113   if ( appStudy ) {
114     _PTR(Study) study = appStudy->studyDS();
115     for ( int idx = 0; idx < count(); idx++ ) {
116       QString anEntry = entry( idx );
117       if ( study && !anEntry.isEmpty() ) {
118         _PTR(SObject) aSO( study->FindObjectID( anEntry.toStdString() ) );
119         if ( aSO ) {
120           CORBA::Object_var varObj = GeometryGUI::ClientSObjectToObject( aSO );
121           myObjects[idx] = GEOM::GEOM_Object::_narrow( varObj );
122         }
123       }
124     }
125   }
126 }
127
128 //QVariant GEOMGUI_Selection::contextParameter( const QString& p ) const
129 QVariant GEOMGUI_Selection::parameter( const QString& p ) const
130 {
131   QVariant v;
132   if ( p == "isOCC" )
133     v = activeViewType() == OCCViewer_Viewer::Type();
134   else if ( p == "selectionmode" )
135     v = selectionMode();
136   else if ( p == "hasImported" )
137     v = hasImported();
138   else if ( p == "allImported" )
139     v = allImported();
140   else
141     v = LightApp_Selection::parameter( p );
142   return v;
143 }
144
145 //QVariant GEOMGUI_Selection::objectParameter( const int idx, const QString& p ) const
146 QVariant GEOMGUI_Selection::parameter( const int idx, const QString& p ) const
147 {
148   QVariant v;
149   if ( p == "type" )
150     v = typeName( idx );
151   else if ( p == "typeid" )
152     v = typeId( idx );
153   else if ( p == "displaymode" )
154     v = displayMode( idx );
155   else if ( p == "isAutoColor" )
156     v = isAutoColor( idx );
157   else if ( p == "isVectorsMode" )
158     v = isVectorsMode( idx );
159   else if ( p == "topLevel" )
160     v = topLevel( idx );
161   else if ( p == "hasChildren" )
162     v = hasChildren( idx );
163   else if ( p == "hasConcealedChildren" )
164     v = hasConcealedChildren( idx );
165   else if ( p == "hasDisclosedChildren" )
166     v = hasDisclosedChildren( idx );
167   else if ( p == "compoundOfVertices" )
168     v = compoundOfVertices( idx );
169   else if ( p == "imported" )
170     v = isImported( idx );
171   else if ( p == "isPhysicalMaterial" )
172     v = isPhysicalMaterial(idx);
173   else
174     v = LightApp_Selection::parameter( idx, p );
175
176   return v;
177 }
178
179 // the method to skip temporary objects from selection (called from LightApp)
180 bool GEOMGUI_Selection::processOwner( const LightApp_DataOwner* theOwner )
181 {
182   return !theOwner->entry().contains("_");
183 }
184
185 QString GEOMGUI_Selection::typeName( const int index ) const
186 {
187   if ( isComponent( index ) )
188     return "Component";
189
190   static QString aGroup( "Group" );
191   static QString aShape( "Shape" );
192   static QString anUnknown( "Unknown" );
193
194   GEOM::GEOM_Object_var anObj = getObject( index );
195   if ( !CORBA::is_nil( anObj ) ) {
196     const int aGeomType = anObj->GetType();
197     if ( aGeomType == GEOM_GROUP )
198       return aGroup;
199     else
200       return aShape;
201   }
202   return anUnknown;
203 }
204
205 int GEOMGUI_Selection::typeId( const int index ) const
206 {
207   int aType = -1;
208   GEOM::GEOM_Object_var anObj = getObject( index );
209   if ( !CORBA::is_nil( anObj ) )
210     aType = (int)anObj->GetShapeType();
211   return aType;
212 }
213
214 bool GEOMGUI_Selection::isVisible( const int index ) const
215 {
216 #ifdef USE_VISUAL_PROP_MAP
217   QVariant v = visibleProperty( entry( index ), GEOM::propertyName( GEOM::Visibility ) );
218   if ( v.canConvert( QVariant::Bool ) )
219     return v.toBool();
220 #endif
221
222   bool res = false;
223
224   GEOM::GEOM_Object_var obj = getObject( index );
225   SALOME_View* view = GEOM_Displayer::GetActiveView();
226   if ( !CORBA::is_nil( obj ) && view ) {
227     Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( entry( index ).toLatin1().constData(), "GEOM", "TEMP_IO" );
228     res = view->isVisible( io );
229   }
230
231   return res;
232 }
233
234 bool GEOMGUI_Selection::isAutoColor( const int index ) const
235 {
236   GEOM::GEOM_Object_var obj = getObject( index );
237   if ( !CORBA::is_nil( obj ) )
238     return obj->GetAutoColor();
239   return false;
240 }
241
242 bool GEOMGUI_Selection::isImported( const int index ) const
243 {
244   GEOM::GEOM_Object_var obj = getObject( index );
245   if ( !CORBA::is_nil( obj ) )
246     return obj->GetType() == GEOM_IMPORT;
247   return false;
248 }
249
250 bool GEOMGUI_Selection::hasImported() const
251 {
252   bool res = false;
253   for ( int i = 0; i < count() && !res; i++ )
254     res = isImported( i );
255   return res;
256 }
257
258 bool GEOMGUI_Selection::allImported() const
259 {
260   bool res = true;
261   for ( int i = 0; i < count() && res; i++ )
262     res = isImported( i );
263   return res;
264 }
265
266 QVariant GEOMGUI_Selection::visibleProperty( const QString& entry, const QString& propName ) const
267 {
268   QVariant v;
269   LightApp_Study* aStudy = study();
270   if ( aStudy ) {
271     LightApp_Application* anApp = ::qobject_cast<LightApp_Application*>( aStudy->application() );
272     if ( anApp && anApp->activeViewManager() ) {
273       int id = anApp->activeViewManager()->getGlobalId();
274       v = aStudy->getObjectProperty( id, entry, propName, QVariant() );
275     }
276   }
277   return v;
278 }
279
280 QString GEOMGUI_Selection::displayMode( const int index ) const
281 {
282   QString res;
283   QString viewType = activeViewType();
284   
285 #ifdef USE_VISUAL_PROP_MAP
286   QVariant v = visibleProperty( entry( index ), GEOM::propertyName( GEOM::DisplayMode ) );
287   if ( v.canConvert( QVariant::Int ) ) {
288     int dm = v.toInt();
289     if ( viewType == OCCViewer_Viewer::Type() ) {
290       OCC_DISPLAY_MODE_TO_STRING( res, dm );
291     } else if ( viewType == SVTK_Viewer::Type() ) {
292       VTK_DISPLAY_MODE_TO_STRING( res, dm );
293     }
294     return res;
295   }
296 #endif
297
298   SALOME_View* view = GEOM_Displayer::GetActiveView();
299   if ( view /*fix for 9320==>*/&& ( viewType == OCCViewer_Viewer::Type() || viewType == SVTK_Viewer::Type() ) ) {
300     SALOME_Prs* prs = view->CreatePrs( entry( index ).toLatin1().constData() );
301     if ( prs ) {
302       if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC
303         SOCC_Prs* occPrs = (SOCC_Prs*) prs;
304         AIS_ListOfInteractive lst;
305         occPrs->GetObjects( lst );
306         if ( lst.Extent() ) {
307           Handle(AIS_InteractiveObject) io = lst.First();
308           if ( !io.IsNull() ) {
309             int dm;
310             Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(io);
311             if(!aSh.IsNull()) {
312               dm = aSh->isTopLevel() ? aSh->prevDisplayMode() : aSh->DisplayMode();
313             } else {
314               dm = io->DisplayMode();
315             }
316             OCC_DISPLAY_MODE_TO_STRING( res, dm );
317             if ( res.isEmpty() ) { // return default display mode of AIS_InteractiveContext
318               OCCViewer_Viewer* occViewer = (OCCViewer_Viewer*)SUIT_Session::session()->activeApplication()->
319                 desktop()->activeWindow()->getViewManager()->getViewModel();
320               Handle(AIS_InteractiveContext) ic = occViewer->getAISContext();
321               dm = ic->DisplayMode();
322               OCC_DISPLAY_MODE_TO_STRING( res, dm );
323             }
324           }
325         }
326       }
327       else if ( viewType == SVTK_Viewer::Type() ) { // assuming VTK
328         SVTK_Prs* vtkPrs = dynamic_cast<SVTK_Prs*>( prs );
329         vtkActorCollection* lst = vtkPrs ? vtkPrs->GetObjects() : 0;
330         if ( lst ) {
331           lst->InitTraversal();
332           vtkActor* actor = lst->GetNextActor();
333           if ( actor ) {
334             SALOME_Actor* salActor = dynamic_cast<SALOME_Actor*>( actor );
335             if ( salActor ) {
336               int dm = salActor->getDisplayMode();
337               VTK_DISPLAY_MODE_TO_STRING( res, dm );
338             } // if ( salome actor )
339           } // if ( actor )
340         } // if ( lst == vtkPrs->GetObjects() )
341       } // if VTK
342     }
343   }
344
345   return res;
346 }
347
348 bool GEOMGUI_Selection::isVectorsMode( const int index ) const
349 {
350 #ifdef USE_VISUAL_PROP_MAP
351   QVariant v = visibleProperty( entry( index ), GEOM::propertyName( GEOM::EdgesDirection ) );
352   if ( v.canConvert( QVariant::Bool ) )
353     return v.toBool();
354 #endif
355
356   bool res = false;
357   
358   SALOME_View* view = GEOM_Displayer::GetActiveView();
359   QString viewType = activeViewType();
360   if ( view && ( viewType == OCCViewer_Viewer::Type() || viewType == SVTK_Viewer::Type() ) ) {
361     SALOME_Prs* prs = view->CreatePrs( entry( index ).toLatin1().constData() );
362     if ( prs ) {
363       if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC
364         SOCC_Prs* occPrs = (SOCC_Prs*) prs;
365         AIS_ListOfInteractive lst;
366         occPrs->GetObjects( lst );
367         if ( lst.Extent() ) {
368           Handle(AIS_InteractiveObject) io = lst.First();
369           if ( !io.IsNull() ) {
370             Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(io);
371             if ( !aSh.IsNull() )
372               res = aSh->isShowVectors();
373           }
374         }
375       }
376       else if ( viewType == SVTK_Viewer::Type() ) { // assuming VTK
377         SVTK_Prs* vtkPrs = dynamic_cast<SVTK_Prs*>( prs );
378         vtkActorCollection* lst = vtkPrs ? vtkPrs->GetObjects() : 0;
379         if ( lst ) {
380           lst->InitTraversal();
381           vtkActor* actor = lst->GetNextActor();
382           if ( actor ) {
383             GEOM_Actor* aGeomActor = GEOM_Actor::SafeDownCast(actor);
384             if ( aGeomActor )
385               res = aGeomActor->GetVectorMode();
386             }
387         }
388       }
389     }
390   }
391
392   return res;
393 }
394
395 bool GEOMGUI_Selection::hasChildren( const _PTR(SObject)& obj )
396 {
397   bool ok = false;
398   if ( obj ) {
399     _PTR(ChildIterator) it ( obj->GetStudy()->NewChildIterator( obj ) );
400     for ( ; it->More() && !ok; it->Next() ) {
401       _PTR(SObject) child = it->Value();
402       if ( child ) {
403         _PTR(SObject) refObj;
404         if ( child->ReferencedObject( refObj ) ) continue; // omit references
405         if ( child->GetName() != "" ) ok = true;
406       }
407     }
408   }
409   return ok;
410 }
411
412 bool GEOMGUI_Selection::expandable( const _PTR(SObject)& obj )
413 {
414   bool exp = true;
415   _PTR(GenericAttribute) anAttr;
416   if ( obj && obj->FindAttribute( anAttr, "AttributeExpandable" ) ) {
417     _PTR(AttributeExpandable) aAttrExp = anAttr;
418     exp = aAttrExp->IsExpandable();
419   }
420   return exp;
421 }
422
423 bool GEOMGUI_Selection::isCompoundOfVertices( GEOM::GEOM_Object_ptr obj )
424 {
425   bool ret = false;
426   /*
427   SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>
428   (SUIT_Session::session()->activeApplication()->activeStudy());*/
429   if ( /*appStudy && */!CORBA::is_nil( obj ) )
430     ret = obj->GetShapeType() == GEOM::COMPOUND && obj->GetMaxShapeType() == GEOM::VERTEX;
431   return ret;
432 }
433
434 bool GEOMGUI_Selection::hasChildren( const int index ) const
435 {
436   bool ok = false;
437   SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( study() );
438
439   if ( appStudy ) {
440     QString anEntry = entry( index );
441     _PTR(Study) study = appStudy->studyDS();
442     if ( study && !anEntry.isEmpty() ) {
443       _PTR(SObject) aSO( study->FindObjectID( anEntry.toStdString() ) );
444       ok = hasChildren( aSO );
445     }
446   }
447   return ok;
448 }
449
450 bool GEOMGUI_Selection::hasConcealedChildren( const int index ) const
451 {
452   bool OK = false;
453   SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( study() );
454
455   if ( appStudy ) {
456     QString anEntry = entry( index );
457     _PTR(Study) study = appStudy->studyDS();
458     if ( study && !anEntry.isEmpty() ) {
459       _PTR(SObject) aSO( study->FindObjectID( anEntry.toStdString() ) );
460       OK = !expandable( aSO ) && hasChildren( aSO );
461     }
462   }
463   return OK;
464 }
465
466 bool GEOMGUI_Selection::hasDisclosedChildren( const int index ) const
467 {
468   bool OK = false;
469   SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( study() );
470
471   if ( appStudy )  {
472     QString anEntry = entry( index );
473     _PTR(Study) study = appStudy->studyDS();
474     if ( study && !anEntry.isEmpty() ) {
475       _PTR(SObject) aSO( study->FindObjectID( anEntry.toStdString() ) );
476       OK = expandable( aSO ) && hasChildren( aSO );
477     }
478   }
479   return OK;
480 }
481
482 bool GEOMGUI_Selection::compoundOfVertices( const int index ) const
483 {
484   GEOM::GEOM_Object_var obj = getObject( index );
485   return isCompoundOfVertices( obj );
486 }
487
488 bool GEOMGUI_Selection::isComponent( const int index ) const
489 {
490   SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( study() );
491
492   if ( appStudy ) {
493     QString anEntry = entry( index );
494     _PTR(Study) study = appStudy->studyDS();
495     if ( study && !anEntry.isNull() ) {
496       _PTR(SObject) aSO( study->FindObjectID( anEntry.toStdString() ) );
497       if ( aSO && aSO->GetFatherComponent() )
498         return aSO->GetFatherComponent()->GetIOR() == aSO->GetIOR();
499     }
500   }
501   return false;
502 }
503
504 GEOM::GEOM_Object_ptr GEOMGUI_Selection::getObject( const int index ) const
505 {
506   GEOM::GEOM_Object_var o;
507   if ( 0 <= index && index < myObjects.size() )
508     o = GEOM::GEOM_Object::_duplicate( myObjects[index] );
509   return o._retn();
510 }
511
512 QString GEOMGUI_Selection::selectionMode() const
513 {
514   SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( study()->application() );
515   if ( app ) {
516     GeometryGUI* aGeomGUI = dynamic_cast<GeometryGUI*>( app->module( "Geometry" ) );
517     if ( aGeomGUI ) {
518       switch ( aGeomGUI->getLocalSelectionMode() )
519       {
520         case GEOM_POINT      : return "VERTEX";
521         case GEOM_EDGE       : return "EDGE";
522         case GEOM_WIRE       : return "WIRE";
523         case GEOM_FACE       : return "FACE";
524         case GEOM_SHELL      : return "SHELL";
525         case GEOM_SOLID      : return "SOLID";
526         case GEOM_COMPOUND   : return "COMPOUND";
527         case GEOM_ALLOBJECTS : return "ALL";
528         default: return "";
529       }
530     }
531   }
532   return "";
533 }
534
535 bool GEOMGUI_Selection::topLevel( const int index ) const
536 {
537 #ifdef USE_VISUAL_PROP_MAP
538   QVariant v = visibleProperty( entry( index ), GEOM::propertyName( GEOM::TopLevel ) );
539   if ( v.canConvert<bool>() )
540     return v.toBool();
541 #endif
542
543   bool res = false;
544
545   SALOME_View* view = GEOM_Displayer::GetActiveView();
546   QString viewType = activeViewType();
547   if ( view && viewType == OCCViewer_Viewer::Type() ) {
548     SALOME_Prs* prs = view->CreatePrs( entry( index ).toLatin1().constData() );
549     if ( prs ) {
550       if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC
551         SOCC_Prs* occPrs = (SOCC_Prs*) prs;
552         AIS_ListOfInteractive lst;
553         occPrs->GetObjects( lst );
554         if ( lst.Extent() ) {
555           Handle(AIS_InteractiveObject) io = lst.First();
556           if ( !io.IsNull() ) {
557             Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(io);
558             if ( !aSh.IsNull() )
559               res = (bool)aSh->isTopLevel();
560           }
561         }
562       }
563     }
564   }
565   return res;
566 }
567
568 bool GEOMGUI_Selection::isPhysicalMaterial( const int idx ) const
569 {
570 #ifdef USE_VISUAL_PROP_MAP
571   QVariant v = visibleProperty( entry( idx ), GEOM::propertyName( GEOM::Material ) );
572   if ( v.canConvert<QString>() ) {
573     Material_Model material;
574     material.fromProperties( v.toString() );
575     return material.isPhysical();
576   }
577 #endif
578
579   bool res = false;
580   
581   SALOME_View* view = GEOM_Displayer::GetActiveView();
582   QString viewType = activeViewType();
583   if ( view ) {
584     SALOME_Prs* prs = view->CreatePrs( entry( idx ).toLatin1().constData() );
585     if ( prs ) {
586       if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC
587         SOCC_Prs* occPrs = (SOCC_Prs*) prs;
588         AIS_ListOfInteractive lst;
589         occPrs->GetObjects( lst );
590         if ( lst.Extent() ) {
591           Handle(AIS_InteractiveObject) io = lst.First();
592           if ( !io.IsNull() ) {
593             Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(io);
594             if ( !aSh.IsNull() )
595               res = (bool) aSh->Attributes()->ShadingAspect()->
596                 Material(Aspect_TOFM_BOTH_SIDE).MaterialType( Graphic3d_MATERIAL_PHYSIC );
597           }
598         }
599       }
600       else if ( viewType == SVTK_Viewer::Type() ) { // assuming VTK
601         SVTK_Prs* vtkPrs = dynamic_cast<SVTK_Prs*>( prs );
602         vtkActorCollection* lst = vtkPrs ? vtkPrs->GetObjects() : 0;
603         if ( lst ) {
604           lst->InitTraversal();
605           vtkActor* actor = lst->GetNextActor();
606           if ( actor ) {
607             GEOM_Actor* aGeomGActor = GEOM_Actor::SafeDownCast( actor );
608             if ( aGeomGActor ) {
609               GEOM_VTKPropertyMaterial* mat  = GEOM_VTKPropertyMaterial::SafeDownCast(aGeomGActor->GetProperty());
610               res = mat->GetPhysical();
611             } // if ( salome actor )
612           } // if ( actor )
613         } // if ( lst == vtkPrs->GetObjects() )
614       }
615     }
616   }
617
618   return res;
619 }