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