]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix for Bug IPAL11962:
authorenk <enk@opencascade.com>
Fri, 21 Apr 2006 11:42:52 +0000 (11:42 +0000)
committerenk <enk@opencascade.com>
Fri, 21 Apr 2006 11:42:52 +0000 (11:42 +0000)
Bad orientation arrow of the CutLines preview

src/PIPELINE/VISU_CutLinesPL.cxx
src/VISUGUI/VisuGUI_CutLinesDlg.cxx

index df37e622473476b1cf5db179977dd7dcd7f03f2c..620677f9437134ff5173a6ad67f09548c2db3360 100644 (file)
@@ -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();
index b24e48c29163fa00ec755b63015b578f512ed161..c1834f3f23469b4f814ed99af8260552602ca1bb 100644 (file)
@@ -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);