-// 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
SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow( SMESH::SObjectToObject( aSObj ));
if(!CORBA::is_nil(aGroup) && anActor)
{
+ QColor c;int delta;
+ SMESH::GetColor( "SMESH", "fill_color", c, delta, "0,170,255|-100" );
SALOMEDS::Color aColor = aGroup->GetColor();
- if( !( aColor.R > 0 || aColor.G > 0 || aColor.B > 0 ) )
+ if( !( aColor.R > 0 || aColor.G > 0 || aColor.B > 0 ))
{
- int r = 0, g = 0, b = 0;
- SMESH::GetColor( "SMESH", "fill_color", r, g, b, QColor( 0, 170, 255 ) );
- aColor.R = (float)r / 255.0;
- aColor.G = (float)g / 255.0;
- aColor.B = (float)b / 255.0;
+ aColor.R = (float)c.red() / 255.0;
+ aColor.G = (float)c.green() / 255.0;
+ aColor.B = (float)c.blue() / 255.0;
aGroup->SetColor( aColor );
}
if( aGroup->GetType() == SMESH::NODE )
else if( aGroup->GetType() == SMESH::ELEM0D )
anActor->Set0DColor( aColor.R, aColor.G, aColor.B );
else
- anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B );
+ anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B, delta );
}
}
}
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 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;
double SP1 = mgr->doubleValue( "SMESH", "selection_precision_node", 0.025 ),
SP2 = mgr->doubleValue( "SMESH", "selection_precision_element", 0.001 ),
// 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());