-// 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" );
+ QColor c;
+ int deltaF, deltaV;
+ SMESH::GetColor( "SMESH", "fill_color", c, deltaF, "0,170,255|-100" );
+ SMESH::GetColor( "SMESH", "volume_color", c, deltaV, "255,0,170|-100" );
+ SMESH::GetColor( "SMESH", "default_grp_color", c );
SALOMEDS::Color aColor = aGroup->GetColor();
if( !( aColor.R > 0 || aColor.G > 0 || aColor.B > 0 ))
{
- aColor.R = (float)c.red() / 255.0;
- aColor.G = (float)c.green() / 255.0;
- aColor.B = (float)c.blue() / 255.0;
+ aColor.R = c.redF();
+ aColor.G = c.greenF();
+ aColor.B = c.blueF();
aGroup->SetColor( aColor );
}
if( aGroup->GetType() == SMESH::NODE )
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 if( aGroup->GetType() == SMESH::VOLUME )
+ anActor->SetVolumeColor( aColor.R, aColor.G, aColor.B, deltaV );
else
- anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B, delta );
+ anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B, deltaF );
}
}
}
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 ),
// 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());
if( !anIsOk )
return false;
-
+
DistanceToPosition( theBounds, theNormal, theDist, theOrigin );
return true;
}