<parameter name="selection_precision_element" value="0.005"/>
<parameter name="selection_precision_node" value="0.005"/>
<parameter name="selection_precision_object" value="0.005"/>
- <parameter name="selection_width" value="5"/>
- <parameter name="highlight_width" value="5"/>
<parameter name="controls_precision" value="0"/>
<parameter name="equal_nodes_tolerance" value="1e-7"/>
<parameter name="scalar_bar_horizontal_height" value="0.08"/>
myBaseActor->SetStoreGemetryMapping(true);
myBaseActor->GetProperty()->SetOpacity(0.0);
myPickableActor = myBaseActor;
-
+
myHighlightProp = vtkProperty::New();
myHighlightProp->SetAmbient(1.0);
myHighlightProp->SetDiffuse(0.0);
SMESH::GetColor( "SMESH", "selection_object_color", anRGB[0], anRGB[1], anRGB[2], QColor( 255, 255, 255 ) );
myHighlightProp->SetColor(anRGB[0],anRGB[1],anRGB[2]);
myHighlightProp->SetPointSize(aElem0DSize); // ??
+ myHighlightProp->SetLineWidth(aLineWidth);
myHighlightProp->SetRepresentation(1);
myOutLineProp = vtkProperty::New();
SMESH::GetColor( "SMESH", "outline_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 70, 0 ) );
myOutLineProp->SetColor(anRGB[0],anRGB[1],anRGB[2]);
myOutLineProp->SetPointSize(aElem0DSize); // ??
+ myOutLineProp->SetLineWidth(aLineWidth);
myOutLineProp->SetRepresentation(1);
myPreselectProp = vtkProperty::New();
SMESH::GetColor( "SMESH", "highlight_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 255, 255 ) );
myPreselectProp->SetColor(anRGB[0],anRGB[1],anRGB[2]);
myPreselectProp->SetPointSize(aElem0DSize); // ??
+ myPreselectProp->SetLineWidth(aLineWidth);
myPreselectProp->SetRepresentation(1);
myHighlitableActor = SMESH_DeviceActor::New();
myEdgeProp->SetLineWidth(theVal);
my1DProp->SetLineWidth(theVal + aLineWidthInc);
- my1DExtProp->SetLineWidth(theVal + aLineWidthInc);
-
+ my1DExtProp->SetLineWidth(theVal + aLineWidthInc);
+ my2DExtProp->SetLineWidth(theVal + aLineWidthInc);
+ myOutLineProp->SetLineWidth(theVal);
+ myHighlightProp->SetLineWidth(theVal);
+ myPreselectProp->SetLineWidth(theVal);
Modified();
}
addPreference( tr( "PREF_OBJECT_COLOR" ), selGroup, LightApp_Preferences::Color, "SMESH", "selection_object_color" );
addPreference( tr( "PREF_ELEMENT_COLOR" ), selGroup, LightApp_Preferences::Color, "SMESH", "selection_element_color" );
- int selW = addPreference( tr( "PREF_WIDTH" ), selGroup, LightApp_Preferences::IntSpin, "SMESH", "selection_width" );
-
- setPreferenceProperty( selW, "min", 1 );
- setPreferenceProperty( selW, "max", 5 );
int preGroup = addPreference( tr( "PREF_GROUP_PRESELECTION" ), selTab );
setPreferenceProperty( preGroup, "columns", 2 );
addPreference( tr( "PREF_HIGHLIGHT_COLOR" ), preGroup, LightApp_Preferences::Color, "SMESH", "highlight_color" );
- int preW = addPreference( tr( "PREF_WIDTH" ), preGroup, LightApp_Preferences::IntSpin, "SMESH", "highlight_width" );
-
- setPreferenceProperty( preW, "min", 1 );
- setPreferenceProperty( preW, "max", 5 );
int precSelGroup = addPreference( tr( "PREF_GROUP_PRECISION" ), selTab );
setPreferenceProperty( precSelGroup, "columns", 2 );
std::string aWarning;
SUIT_ResourceMgr* aResourceMgr = SMESH::GetResourceMgr(this);
if( name=="selection_object_color" || name=="selection_element_color" ||
- name=="selection_width" || name=="highlight_color" || name=="highlight_width" ||
+ name=="highlight_color" ||
name=="selection_precision_node" || name=="selection_precision_element" ||
name=="selection_precision_object")
SMESH::UpdateSelectionProp( this );
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());