[Paraview] Distance of ruler

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Mon Dec 15 09:05:10 EST 2008


Thanks for spotting this. I've committed a fix to the CVS head.

On Thu, Dec 11, 2008 at 11:37 PM, shintaro akiyama <sntaki at gmail.com> wrote:
> Hi.
> In Paraview 3.4.0, distance display of ruler is wrong.
>
>
> Index: Qt/Components/pqDistanceWidget.cxx
> ===================================================================
> RCS file: /cvsroot/ParaView3/ParaView3/Qt/Components/pqDistanceWidget.cxx,v
> retrieving revision 1.2
> diff -u -r1.2 pqDistanceWidget.cxx
> --- Qt/Components/pqDistanceWidget.cxx  16 May 2008 20:38:57 -0000      1.2
> +++ Qt/Components/pqDistanceWidget.cxx  12 Dec 2008 04:24:41 -0000
> @@ -74,6 +74,6 @@
>     wproxy->GetProperty("Point1WorldPosition"));
>   vtkSMDoubleVectorProperty* dvp2 = vtkSMDoubleVectorProperty::SafeDownCast(
>     wproxy->GetProperty("Point2WorldPosition"));
> -  double distance =
> vtkMath::Distance2BetweenPoints(dvp1->GetElements(),
> dvp2->GetElements());
> +  double distance =
> sqrt(vtkMath::Distance2BetweenPoints(dvp1->GetElements(),
> dvp2->GetElements()));
>   this->Label->setText(QString("<b>Distance:</b> <i>%1</i> ").arg(distance));
>  }
>
>
> Best regards
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
>


More information about the ParaView mailing list