From: enk Date: Fri, 21 Apr 2006 11:42:52 +0000 (+0000) Subject: Fix for Bug IPAL11962: X-Git-Tag: T3_2_0b1_pre1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=82f759775143d70eded0d75b131bbdf59704ad71;p=modules%2Fvisu.git Fix for Bug IPAL11962: Bad orientation arrow of the CutLines preview --- diff --git a/src/PIPELINE/VISU_CutLinesPL.cxx b/src/PIPELINE/VISU_CutLinesPL.cxx index df37e622..620677f9 100644 --- a/src/PIPELINE/VISU_CutLinesPL.cxx +++ b/src/PIPELINE/VISU_CutLinesPL.cxx @@ -139,9 +139,15 @@ VISU_CutLinesPL anAppendPolyData->Delete(); //Calculate values for building of table vtkMath::Cross(aDir[0],aDir[1],myDirLn); - for (int i=0; i<3 ; 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); + vtkFloatingPointType aTmpDir[3]; + for (int i=0; i<3 ; i++) + if(myDirLn[i]<0) + aTmpDir[i] = (-1)*myDirLn[i]; + else + aTmpDir[i] = myDirLn[i]; + + GetBoundProject(myBoundPrjLn, aBaseBounds, aTmpDir); + VISU::Mul(aTmpDir,myBoundPrjLn[0],myBasePnt); CorrectPnt(myBasePnt,aBaseBounds); VISU_ScalarMapPL::Update(); diff --git a/src/VISUGUI/VisuGUI_CutLinesDlg.cxx b/src/VISUGUI/VisuGUI_CutLinesDlg.cxx index b24e48c2..c1834f3f 100644 --- a/src/VISUGUI/VisuGUI_CutLinesDlg.cxx +++ b/src/VISUGUI/VisuGUI_CutLinesDlg.cxx @@ -347,7 +347,7 @@ void VisuGUI_CutLinesDlg::createPlanes() aPlaneMapper->SetInput(aPolyData->GetOutput()); aPlaneMapper->ScalarVisibilityOff(); - myPreviewActorGlyphs = myPreviewActorGlyphs = SALOME_Actor::New(); + myPreviewActorGlyphs = SALOME_Actor::New(); myPreviewActorGlyphs->PickableOff(); updateGlyphs(false); @@ -570,7 +570,7 @@ void VisuGUI_CutLinesDlg::updateGlyphs(bool update){ source->SetCenter(aBoundCenter); source->SetGlyphTypeToArrow(); - aPoints->InsertNextPoint(aBasePnt); + aPoints->InsertNextPoint(aBoundCenter); profile->SetPoints(aPoints); aFloatArray->SetNumberOfComponents(3);