- double firstRadiusSum = 0;
- double secondRadiusSum = 0;
- for(int i = 0; i < lstIndexs[0] && lstIndexs[0] > 9; i+=5){
- if(i+10 < lstIndexs[0]){
- points->GetPoint(i, point1);
- points->GetPoint(i+5, point2);
- points->GetPoint(i+10, point3);
- firstRadiusSum += vtkMath::Solve3PointCircle(point1, point2, point3, center);
- }
+ double firstAngleSum = 0;
+ double secondAngleSum = 0;
+
+ points->GetPoint(0, point1);
+ points->GetPoint((lstIndexs[0]-1), point3);
+ double firstVect[3];
+ double secVect[3];
+ vtkMath::Subtract(point3, point1, firstVect);
+ for(int i = 0; i < lstIndexs[0]; i++){
+ points->GetPoint(i, point2);
+ vtkMath::Subtract(point2, point1, secVect);
+ firstAngleSum += vtkMath::SignedAngleBetweenVectors(firstVect, secVect, firstVect);