Salome HOME
Import .dat file
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_VTKUtils.cxx
index 46e7e5c969cfb2efb199a4f076f8e7606fa391c6..baafa985c8de0f04391d5f0606fd94b9437eacae 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -626,6 +626,8 @@ namespace SMESH
             anActor->SetEdgeColor( aColor.R, aColor.G, aColor.B );
           else if( aGroup->GetType() == SMESH::ELEM0D )
             anActor->Set0DColor( aColor.R, aColor.G, aColor.B );
+          else if( aGroup->GetType() == SMESH::BALL )
+            anActor->SetBallColor( aColor.R, aColor.G, aColor.B );
           else
             anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B, delta );
         }
@@ -896,16 +898,13 @@ namespace SMESH
            aSelColor = mgr->colorValue( "SMESH", "selection_element_color", Qt::yellow ),
            aPreColor = mgr->colorValue( "SMESH", "highlight_color", Qt::cyan );
 
-    int SW = mgr->integerValue( "SMESH", "selection_width", 5 ),
-        PW = mgr->integerValue( "SMESH", "highlight_width", 5 );
-
-    // adjust highlight_width to the width of mesh entities
     int aElem0DSize = mgr->integerValue("SMESH", "elem0d_size", 5);
+    int aBallSize   = mgr->integerValue("SMESH", "ball_elem_size", 5);
     int aLineWidth  = mgr->integerValue("SMESH", "element_width", 1);
     int maxSize = aElem0DSize;
     if (aElem0DSize > maxSize) maxSize = aElem0DSize;
     if (aLineWidth > maxSize) maxSize = aLineWidth;
-    if (PW < maxSize + 2) PW = maxSize + 2;
+    if (aBallSize > maxSize) maxSize = aBallSize;
 
     double SP1 = mgr->doubleValue( "SMESH", "selection_precision_node", 0.025 ),
            SP2 = mgr->doubleValue( "SMESH", "selection_precision_element", 0.001 ),
@@ -917,16 +916,14 @@ namespace SMESH
         // mesh element selection
         aVtkView->SetSelectionProp(aSelColor.red()/255.,
                                    aSelColor.green()/255.,
-                                   aSelColor.blue()/255.,
-                                   SW );
+                                   aSelColor.blue()/255.);
         // tolerances
         aVtkView->SetSelectionTolerance(SP1, SP2, SP3);
 
         // pre-selection
         aVtkView->SetPreselectionProp(aPreColor.red()/255.,
                                       aPreColor.green()/255.,
-                                      aPreColor.blue()/255.,
-                                      PW);
+                                      aPreColor.blue()/255.);
         // update actors
         vtkRenderer* aRenderer = aVtkView->getRenderer();
         VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());