mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-27 07:00:33 +05:00
[bos #32736][CEA] Threshold of criteria. Added Wireframe Off checkbox to hide edges' lines.
This commit is contained in:
parent
26cb19a6fe
commit
0b4adba6a7
@ -842,6 +842,7 @@ void SMESH_ActorDef::SetControlMode( eControl theMode, bool theCheckEntityMode )
|
||||
myBallActor->GetMapper()->SetScalarVisibility(false);
|
||||
myScalarBarActor->SetVisibility(false);
|
||||
ClipThreshold(false);
|
||||
SetWireframeOff(false);
|
||||
|
||||
bool anIsScalarVisible = theMode > eNone;
|
||||
|
||||
@ -1825,6 +1826,8 @@ void SMESH_ActorDef::UpdateHighlight()
|
||||
case SMESH_DeviceActor::eSurface:
|
||||
case SMESH_DeviceActor::eWireframe:
|
||||
{
|
||||
anIsVisible = !IsWireframeOff();
|
||||
|
||||
if(myIsHighlighted) {
|
||||
myHighlitableActor->SetProperty(myHighlightProp);
|
||||
}else if(myIsPreselected){
|
||||
@ -2526,6 +2529,14 @@ void SMESH_ActorDef::ClipThreshold(bool isThresholdOn, double min /*= 0.0*/, dou
|
||||
}
|
||||
}
|
||||
|
||||
// Hides the wireframe if isWireframeOff == true.
|
||||
void SMESH_ActorDef::SetWireframeOff(bool isWireframeOff)
|
||||
{
|
||||
myIsWireframeOff = isWireframeOff;
|
||||
|
||||
UpdateHighlight();
|
||||
}
|
||||
|
||||
void SMESH_ActorDef::UpdateDistribution()
|
||||
{
|
||||
if(SMESH::Controls::NumericalFunctor* fun =
|
||||
|
@ -168,6 +168,8 @@ class SMESHOBJECT_EXPORT SMESH_Actor: public SALOME_Actor
|
||||
virtual void UpdateDistribution() = 0;
|
||||
virtual void ClipThreshold(bool isThresholdOn, double min = 0.0, double max = 0.0) = 0;
|
||||
virtual bool IsClipThresholdOn() const = 0;
|
||||
virtual void SetWireframeOff(bool isWireframeOff) = 0;
|
||||
virtual bool IsWireframeOff() const = 0;
|
||||
|
||||
virtual void SetPointsFontProperties( SMESH::LabelFont family, int size,
|
||||
bool bold, bool italic, bool shadow,
|
||||
|
@ -228,6 +228,8 @@ class SMESH_ActorDef : public SMESH_Actor
|
||||
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; }
|
||||
@ -303,6 +305,7 @@ class SMESH_ActorDef : public SMESH_Actor
|
||||
bool myIsEntityModeCache;
|
||||
bool myIsPointsVisible;
|
||||
bool myIsClipThresholdOn = false;
|
||||
bool myIsWireframeOff = false;
|
||||
|
||||
bool myIsShrinkable;
|
||||
bool myIsShrunk;
|
||||
|
@ -152,12 +152,17 @@ SMESHGUI_Preferences_ScalarBarDlg::SMESHGUI_Preferences_ScalarBarDlg( SMESHGUI*
|
||||
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 );
|
||||
|
||||
@ -573,6 +578,8 @@ bool SMESHGUI_Preferences_ScalarBarDlg::onApply()
|
||||
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);
|
||||
@ -667,8 +674,12 @@ void SMESHGUI_Preferences_ScalarBarDlg::onSelectionChanged()
|
||||
|
||||
myThresholdCheck->setChecked(myActor->IsClipThresholdOn());
|
||||
applyThreshold(range[0], range[1]);
|
||||
|
||||
myWireframeOffCheck->setChecked(myActor->IsWireframeOff());
|
||||
}
|
||||
|
||||
applyWireframeOff();
|
||||
|
||||
vtkTextProperty* aTitleTextPrp = myScalarBarActor->GetTitleTextProperty();
|
||||
double aTColor[3];
|
||||
aTitleTextPrp->GetColor( aTColor );
|
||||
@ -897,12 +908,22 @@ void SMESHGUI_Preferences_ScalarBarDlg::initScalarBarFromResources()
|
||||
/*!
|
||||
* 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());
|
||||
}
|
||||
|
@ -74,6 +74,7 @@ public:
|
||||
|
||||
protected:
|
||||
void applyThreshold(double min, double max);
|
||||
void applyWireframeOff();
|
||||
|
||||
protected slots:
|
||||
virtual void reject();
|
||||
@ -103,6 +104,7 @@ private:
|
||||
QLineEdit* myMaxEdit;
|
||||
QCheckBox* myLogarithmicCheck;
|
||||
QCheckBox* myThresholdCheck;
|
||||
QCheckBox* myWireframeOffCheck;
|
||||
|
||||
QGroupBox* myFontGrp;
|
||||
QtxColorButton* myTitleColorBtn;
|
||||
|
@ -2228,6 +2228,10 @@ Check algorithm documentation for supported geometry</translation>
|
||||
<source>SMESH_TRESHOLD_SCALARBAR</source>
|
||||
<translation>Threshold</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>SMESH_WIREFRAME_OFF_SCALARBAR</source>
|
||||
<translation>Wireframe Off</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>SMESH_MAKE_GROUPS</source>
|
||||
<translation>Generate groups</translation>
|
||||
|
@ -2226,6 +2226,10 @@ Référez-vous à la documentation sur l'algorithme et la géométrie supportée
|
||||
<source>SMESH_TRESHOLD_SCALARBAR</source>
|
||||
<translation>Seuil</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>SMESH_WIREFRAME_OFF_SCALARBAR</source>
|
||||
<translation>Filaire désactivé</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>SMESH_MAKE_GROUPS</source>
|
||||
<translation>Générer les groupes</translation>
|
||||
|
@ -1983,6 +1983,10 @@
|
||||
<source>SMESH_TRESHOLD_SCALARBAR</source>
|
||||
<translation>しきい値</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>SMESH_WIREFRAME_OFF_SCALARBAR</source>
|
||||
<translation>ワイヤーフレーム オフ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>SMESH_MAKE_GROUPS</source>
|
||||
<translation>グループを生成します。</translation>
|
||||
|
Loading…
Reference in New Issue
Block a user