[Paraview] Distance of ruler
shintaro akiyama
sntaki at gmail.com
Thu Dec 11 23:37:18 EST 2008
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
More information about the ParaView
mailing list