From 0048d6e3b27c26dfdad50cfc6b818300b57925c2 Mon Sep 17 00:00:00 2001 From: kradchen Date: Thu, 24 Jul 2025 16:29:23 +0800 Subject: [PATCH] fix: fix polygon Perimeter calculate bug( without sqrt pos distance2) --- src/src/Rendering/Measure/OpenPolyAnnotationActor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src/Rendering/Measure/OpenPolyAnnotationActor.cpp b/src/src/Rendering/Measure/OpenPolyAnnotationActor.cpp index af7be06..3cc8631 100644 --- a/src/src/Rendering/Measure/OpenPolyAnnotationActor.cpp +++ b/src/src/Rendering/Measure/OpenPolyAnnotationActor.cpp @@ -196,7 +196,7 @@ void OpenPolyAnnotationActor::UpdatePerimeterAndAreaText() BaseDataPoints->GetPoint(i, p1); BaseDataPoints->GetPoint(i - 1, p2); - distance += vtkMath::Distance2BetweenPoints(p1, p2); + distance += std::sqrt(vtkMath::Distance2BetweenPoints(p1, p2)); } if(!Closed)