myBallActor->GetMapper()->SetScalarVisibility(false);
myScalarBarActor->SetVisibility(false);
ClipThreshold(false);
+ SetWireframeOff(false);
bool anIsScalarVisible = theMode > eNone;
case SMESH_DeviceActor::eSurface:
case SMESH_DeviceActor::eWireframe:
{
+ anIsVisible = !IsWireframeOff();
+
if(myIsHighlighted) {
myHighlitableActor->SetProperty(myHighlightProp);
}else if(myIsPreselected){
}
}
+// Hides the wireframe if isWireframeOff == true.
+void SMESH_ActorDef::SetWireframeOff(bool isWireframeOff)
+{
+ myIsWireframeOff = isWireframeOff;
+
+ UpdateHighlight();
+}
+
void SMESH_ActorDef::UpdateDistribution()
{
if(SMESH::Controls::NumericalFunctor* fun =
virtual void UpdateDistribution();
virtual void ClipThreshold(bool isThresholdOn, double min = 0.0, double max = 0.0);
virtual bool IsClipThresholdOn() const { return myIsClipThresholdOn; }
+ virtual void SetWireframeOff(bool isWireframeOff);
+ virtual bool IsWireframeOff() const { return myIsWireframeOff; }
#ifndef DISABLE_PLOT2DVIEWER
virtual SPlot2d_Histogram* GetPlot2Histogram() { return my2dHistogram; }
bool myIsEntityModeCache;
bool myIsPointsVisible;
bool myIsClipThresholdOn = false;
+ bool myIsWireframeOff = false;
bool myIsShrinkable;
bool myIsShrunk;
myThresholdCheck->setText(tr("SMESH_TRESHOLD_SCALARBAR"));
myThresholdCheck->setChecked(false);
+ myWireframeOffCheck = new QCheckBox (myRangeGrp);
+ myWireframeOffCheck->setText(tr("SMESH_WIREFRAME_OFF_SCALARBAR"));
+ myWireframeOffCheck->setChecked(false);
+
myRangeGrpLayout->addWidget( new QLabel( tr( "SMESH_RANGE_MIN" ), myRangeGrp ), 0, 0, 1, 1 );
myRangeGrpLayout->addWidget( myMinEdit, 0, 1, 1, 1 );
myRangeGrpLayout->addWidget( new QLabel( tr( "SMESH_RANGE_MAX" ), myRangeGrp ), 0, 2, 1, 1 );
myRangeGrpLayout->addWidget( myMaxEdit, 0, 3, 1, 1 );
myRangeGrpLayout->addWidget( myLogarithmicCheck, 1, 0, 1, 1 );
myRangeGrpLayout->addWidget( myThresholdCheck, 1, 1, 1, 1 );
+ myRangeGrpLayout->addWidget( myWireframeOffCheck, 1, 2, 1, 1 );
aTopLayout->addWidget( myRangeGrp );
myLookupTable->SetNumberOfTableValues(myColorsSpin->value());
applyThreshold(aMin, aMax);
+ applyWireframeOff();
+
bool scaleChanged = (myLogarithmicCheck->isChecked() != (myLookupTable->GetScale() == VTK_SCALE_LOG10));
if (scaleChanged)
myLookupTable->SetScale(myLogarithmicCheck->isChecked() ? VTK_SCALE_LOG10 : VTK_SCALE_LINEAR);
myThresholdCheck->setChecked(myActor->IsClipThresholdOn());
applyThreshold(range[0], range[1]);
+
+ myWireframeOffCheck->setChecked(myActor->IsWireframeOff());
}
+ applyWireframeOff();
+
vtkTextProperty* aTitleTextPrp = myScalarBarActor->GetTitleTextProperty();
double aTColor[3];
aTitleTextPrp->GetColor( aTColor );
/*!
* SMESHGUI_Preferences_ScalarBarDlg::applyThreshold()
*
- * Switch on and off using of special color for values beyond the min-max range.
- * Now this color is completely transparent - RGBA(0,0,0,0).
+ * Hides and shows elements beyond the given min - max range by threshold filter inside the actor.
*/
//=================================================================================================
-//void SMESHGUI_Preferences_ScalarBarDlg::applyThreshold(vtkLookupTable* aLookupTable)
void SMESHGUI_Preferences_ScalarBarDlg::applyThreshold(double min, double max)
{
myActor->ClipThreshold(myThresholdCheck->isChecked(), min, max);
}
+
+//=================================================================================================
+/*!
+ * SMESHGUI_Preferences_ScalarBarDlg::applyWireframeOff()
+ *
+ * Hides and shows edges' lines.
+ */
+//=================================================================================================
+void SMESHGUI_Preferences_ScalarBarDlg::applyWireframeOff()
+{
+ myActor->SetWireframeOff(myWireframeOffCheck->isChecked());
+}