mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 09:50:34 +05:00
Fix on - Bug PAL7606
Controls operation aren't work during Clipping
This commit is contained in:
parent
fe2a7b95ba
commit
959198f20f
@ -63,6 +63,11 @@
|
|||||||
#include "SALOME_InteractiveObject.hxx"
|
#include "SALOME_InteractiveObject.hxx"
|
||||||
#include "SMESH_ActorUtils.h"
|
#include "SMESH_ActorUtils.h"
|
||||||
|
|
||||||
|
#include "VTKViewer_ViewFrame.h"
|
||||||
|
#include "VTKViewer_RenderWindow.h"
|
||||||
|
|
||||||
|
#include <vtkRenderer.h>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
|
||||||
@ -151,8 +156,6 @@ protected:
|
|||||||
myActor->SetInfinitive(true);
|
myActor->SetInfinitive(true);
|
||||||
myActor->SetMapper( myMapper );
|
myActor->SetMapper( myMapper );
|
||||||
|
|
||||||
static float anOpacity = 0.75;
|
|
||||||
|
|
||||||
vtkProperty* aProp = vtkProperty::New();
|
vtkProperty* aProp = vtkProperty::New();
|
||||||
float anRGB[3];
|
float anRGB[3];
|
||||||
anRGB[0] = SMESH::GetFloat("SMESH:SettingsFillColorRed", 0)/255.;
|
anRGB[0] = SMESH::GetFloat("SMESH:SettingsFillColorRed", 0)/255.;
|
||||||
@ -375,9 +378,8 @@ SMESHGUI_ClippingDlg::SMESHGUI_ClippingDlg( QWidget* parent,
|
|||||||
SMESHGUI_ClippingDlg::~SMESHGUI_ClippingDlg()
|
SMESHGUI_ClippingDlg::~SMESHGUI_ClippingDlg()
|
||||||
{
|
{
|
||||||
// no need to delete child widgets, Qt does it all for us
|
// no need to delete child widgets, Qt does it all for us
|
||||||
//cout<<"SMESHGUI_ClippingDlg::~SMESHGUI_ClippingDlg\n";
|
|
||||||
std::for_each(myPlanes.begin(),myPlanes.end(),TSetVisiblity(false));
|
std::for_each(myPlanes.begin(),myPlanes.end(),TSetVisiblity(false));
|
||||||
SMESH::GetCurrentVtkView()->Repaint();
|
SMESH::RenderViewFrame(SMESH::GetCurrentVtkView());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -407,9 +409,7 @@ void SMESHGUI_ClippingDlg::ClickOnApply()
|
|||||||
anOrientedPlane->Delete();
|
anOrientedPlane->Delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
myActor->SetVisibility(myActor->GetVisibility());
|
SMESH::RenderViewFrame(SMESH::GetCurrentVtkView());
|
||||||
|
|
||||||
SMESH::GetCurrentVtkView()->Repaint();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -466,7 +466,7 @@ void SMESHGUI_ClippingDlg::onSelectionChanged()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Sinchronize();
|
Sinchronize();
|
||||||
SMESH::GetCurrentVtkView()->Repaint();
|
SMESH::RenderViewFrame(SMESH::GetCurrentVtkView());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -484,8 +484,7 @@ void SMESHGUI_ClippingDlg::onSelectPlane(int theIndex)
|
|||||||
// Orientation
|
// Orientation
|
||||||
SMESH::Orientation anOrientation = aPlane->GetOrientation();
|
SMESH::Orientation anOrientation = aPlane->GetOrientation();
|
||||||
|
|
||||||
// Distance and Rotations
|
// Rotations
|
||||||
float aDistance;
|
|
||||||
double aRot[2] = {aPlane->myAngle[0], aPlane->myAngle[1]};
|
double aRot[2] = {aPlane->myAngle[0], aPlane->myAngle[1]};
|
||||||
|
|
||||||
// Set plane parameters in the dialog
|
// Set plane parameters in the dialog
|
||||||
@ -550,7 +549,7 @@ void SMESHGUI_ClippingDlg::ClickOnDelete()
|
|||||||
ClickOnApply();
|
ClickOnApply();
|
||||||
|
|
||||||
Sinchronize();
|
Sinchronize();
|
||||||
SMESH::GetCurrentVtkView()->Repaint();
|
SMESH::RenderViewFrame(SMESH::GetCurrentVtkView());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -702,7 +701,6 @@ void SMESHGUI_ClippingDlg::SetCurrentPlaneParam()
|
|||||||
|
|
||||||
myActor->SetPlaneParam(aNormal, getDistance(), aPlane);
|
myActor->SetPlaneParam(aNormal, getDistance(), aPlane);
|
||||||
|
|
||||||
float* anOrig = aPlane->GetOrigin();
|
|
||||||
vtkDataSet* aDataSet = myActor->GetInput();
|
vtkDataSet* aDataSet = myActor->GetInput();
|
||||||
float *aPnt = aDataSet->GetCenter();
|
float *aPnt = aDataSet->GetCenter();
|
||||||
|
|
||||||
@ -746,11 +744,11 @@ void SMESHGUI_ClippingDlg::SetCurrentPlaneParam()
|
|||||||
if(AutoApplyCheckBox->isChecked())
|
if(AutoApplyCheckBox->isChecked())
|
||||||
ClickOnApply();
|
ClickOnApply();
|
||||||
|
|
||||||
SMESH::GetCurrentVtkView()->Repaint();
|
SMESH::RenderViewFrame(SMESH::GetCurrentVtkView());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SMESHGUI_ClippingDlg::OnPreviewToggle(bool theIsToggled){
|
void SMESHGUI_ClippingDlg::OnPreviewToggle(bool theIsToggled){
|
||||||
std::for_each(myPlanes.begin(),myPlanes.end(),TSetVisiblity(theIsToggled));
|
std::for_each(myPlanes.begin(),myPlanes.end(),TSetVisiblity(theIsToggled));
|
||||||
SMESH::GetCurrentVtkView()->Repaint();
|
SMESH::RenderViewFrame(SMESH::GetCurrentVtkView());
|
||||||
}
|
}
|
||||||
|
@ -156,6 +156,19 @@ namespace SMESH{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void RepaintViewFrame(VTKViewer_ViewFrame* theFrame)
|
||||||
|
{
|
||||||
|
theFrame->Repaint();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void RenderViewFrame(VTKViewer_ViewFrame* theFrame)
|
||||||
|
{
|
||||||
|
theFrame->getRW()->getRenderWindow()->Render();
|
||||||
|
theFrame->Repaint();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
SMESH_Actor* FindActorByEntry(QAD_StudyFrame *theStudyFrame,
|
SMESH_Actor* FindActorByEntry(QAD_StudyFrame *theStudyFrame,
|
||||||
const char* theEntry)
|
const char* theEntry)
|
||||||
{
|
{
|
||||||
@ -507,7 +520,7 @@ namespace SMESH{
|
|||||||
{
|
{
|
||||||
theName = "";
|
theName = "";
|
||||||
if(theIO->hasEntry()){
|
if(theIO->hasEntry()){
|
||||||
if(SMESH_Actor *anActor = FindActorByEntry(theIO->getEntry())){
|
if(FindActorByEntry(theIO->getEntry())){
|
||||||
TColStd_IndexedMapOfInteger aMapIndex;
|
TColStd_IndexedMapOfInteger aMapIndex;
|
||||||
theSel->GetIndex(theIO,aMapIndex);
|
theSel->GetIndex(theIO,aMapIndex);
|
||||||
for(int i = 1; i <= aMapIndex.Extent(); i++){
|
for(int i = 1; i <= aMapIndex.Extent(); i++){
|
||||||
@ -536,7 +549,7 @@ namespace SMESH{
|
|||||||
{
|
{
|
||||||
theName = "";
|
theName = "";
|
||||||
if(theIO->hasEntry()){
|
if(theIO->hasEntry()){
|
||||||
if(SMESH_Actor *anActor = FindActorByEntry(theIO->getEntry())){
|
if(FindActorByEntry(theIO->getEntry())){
|
||||||
TColStd_IndexedMapOfInteger aMapIndex;
|
TColStd_IndexedMapOfInteger aMapIndex;
|
||||||
theSel->GetIndex(theIO,aMapIndex);
|
theSel->GetIndex(theIO,aMapIndex);
|
||||||
typedef std::set<int> TIdContainer;
|
typedef std::set<int> TIdContainer;
|
||||||
|
@ -63,6 +63,9 @@ namespace SMESH{
|
|||||||
|
|
||||||
VTKViewer_ViewFrame* GetCurrentVtkView();
|
VTKViewer_ViewFrame* GetCurrentVtkView();
|
||||||
|
|
||||||
|
void RepaintViewFrame(VTKViewer_ViewFrame* theFrame);
|
||||||
|
|
||||||
|
void RenderViewFrame(VTKViewer_ViewFrame* theFrame);
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
SMESH_Actor* FindActorByEntry(QAD_StudyFrame *theStudyFrame,
|
SMESH_Actor* FindActorByEntry(QAD_StudyFrame *theStudyFrame,
|
||||||
|
Loading…
Reference in New Issue
Block a user