From 2e9f9ddeb0003e10886676486b3e43a4de997602 Mon Sep 17 00:00:00 2001 From: enk Date: Wed, 3 May 2006 13:41:24 +0000 Subject: [PATCH] Fix for Bug IPAL12328: TC: Incorrect visualization of data table --- src/PIPELINE/VISU_CutLinesPL.cxx | 14 ++++++-------- src/PIPELINE/VISU_CutLinesPL.hxx | 7 +++++++ src/VISUGUI/VisuGUI_CutLinesDlg.cxx | 2 +- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/PIPELINE/VISU_CutLinesPL.cxx b/src/PIPELINE/VISU_CutLinesPL.cxx index 620677f9..f3849887 100644 --- a/src/PIPELINE/VISU_CutLinesPL.cxx +++ b/src/PIPELINE/VISU_CutLinesPL.cxx @@ -139,15 +139,13 @@ VISU_CutLinesPL anAppendPolyData->Delete(); //Calculate values for building of table vtkMath::Cross(aDir[0],aDir[1],myDirLn); - vtkFloatingPointType aTmpDir[3]; - for (int i=0; i<3 ; i++) - if(myDirLn[i]<0) - aTmpDir[i] = (-1)*myDirLn[i]; - else - aTmpDir[i] = myDirLn[i]; + for (int i=0; i<3 ; i++) { + myRealDirLn[i] = myDirLn[i]; + if(myDirLn[i]<0) myDirLn[i] = (-1)*myDirLn[i];//enk:: correction of bug Bug PAL10401 + } + GetBoundProject(myBoundPrjLn, aBaseBounds, myDirLn); + VISU::Mul(myDirLn,myBoundPrjLn[0],myBasePnt); - GetBoundProject(myBoundPrjLn, aBaseBounds, aTmpDir); - VISU::Mul(aTmpDir,myBoundPrjLn[0],myBasePnt); CorrectPnt(myBasePnt,aBaseBounds); VISU_ScalarMapPL::Update(); diff --git a/src/PIPELINE/VISU_CutLinesPL.hxx b/src/PIPELINE/VISU_CutLinesPL.hxx index e41cdc65..05fb29a0 100644 --- a/src/PIPELINE/VISU_CutLinesPL.hxx +++ b/src/PIPELINE/VISU_CutLinesPL.hxx @@ -88,6 +88,12 @@ public: return myDirLn; } + const vtkFloatingPointType* + GetRealDirLn() + { + return myRealDirLn; + } + const vtkFloatingPointType* GetBoundPrjLn() { @@ -102,6 +108,7 @@ public: protected: vtkFloatingPointType myDirLn[3]; + vtkFloatingPointType myRealDirLn[3]; vtkFloatingPointType myBoundPrjLn[3]; vtkFloatingPointType myBasePnt[3]; vtkFloatingPointType myPosition; diff --git a/src/VISUGUI/VisuGUI_CutLinesDlg.cxx b/src/VISUGUI/VisuGUI_CutLinesDlg.cxx index 1cf84340..7b6c49a7 100644 --- a/src/VISUGUI/VisuGUI_CutLinesDlg.cxx +++ b/src/VISUGUI/VisuGUI_CutLinesDlg.cxx @@ -546,7 +546,7 @@ void VisuGUI_CutLinesDlg::DrawTable() void VisuGUI_CutLinesDlg::updateGlyphs(bool update){ if (myPreviewActorGlyphs == 0 ) return; - const vtkFloatingPointType *aDirLn = myCutLines->GetCutLinesPL()->GetDirLn(); + const vtkFloatingPointType *aDirLn = myCutLines->GetCutLinesPL()->GetRealDirLn(); const vtkFloatingPointType *aBasePnt = myCutLines->GetCutLinesPL()->GetBasePnt(); vtkFloatingPointType aSecondPnt[3]; vtkFloatingPointType aBoundCenter[3]; -- 2.39.2