From 07abe8e19f69a879376f1cf118f9fdb135d478f8 Mon Sep 17 00:00:00 2001 From: Julien Finet Date: Fri, 19 Jan 2024 22:43:03 +0100 Subject: [PATCH] fix(contourtriangulator): fix vtkContourTriangulator when points are ordered in odd way An integer number was additioned to an array. fix #2990 --- Sources/Filters/General/ContourTriangulator/helper.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Filters/General/ContourTriangulator/helper.js b/Sources/Filters/General/ContourTriangulator/helper.js index 87d23489ccf..89aa0326947 100644 --- a/Sources/Filters/General/ContourTriangulator/helper.js +++ b/Sources/Filters/General/ContourTriangulator/helper.js @@ -523,8 +523,8 @@ export function vtkCCSMakePolysFromLines( let ptsEnd = npts - 1; if (endIdx === 1) { pit = npts - 1 - (completePoly ? 1 : 0); - ptsIt = pts + 1; - ptsEnd = pts + npts - (completePoly ? 1 : 0); + ptsIt = 1; + ptsEnd = npts - (completePoly ? 1 : 0); } while (ptsIt !== ptsEnd) { poly[--pit] = poly[ptsIt++];