Skip to content

Commit 298c01b

Browse files
authored
Merge pull request #2433 from Julesdevops/cellpicker-ignore-vtk-empty-cell
fix(cellpicker): skip cells that have the VTK_EMPTY_CELL type
2 parents c778884 + 58e5fad commit 298c01b

File tree

1 file changed

+8
-1
lines changed
  • Sources/Rendering/Core/CellPicker

1 file changed

+8
-1
lines changed

Sources/Rendering/Core/CellPicker/index.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,14 +285,20 @@ function vtkCellPicker(publicAPI, model) {
285285

286286
const numberOfCells = data.getNumberOfCells();
287287

288+
/* eslint-disable no-continue */
288289
for (let cellId = 0; cellId < numberOfCells; cellId++) {
289290
const pCoords = [0, 0, 0];
290291

291292
minCellType = data.getCellType(cellId);
293+
294+
// Skip cells that are marked as empty
295+
if (minCellType === CellType.VTK_EMPTY_CELL) {
296+
continue;
297+
}
298+
292299
const cell = tempCellMap[minCellType];
293300

294301
if (cell == null) {
295-
// eslint-disable-next-line no-continue
296302
continue;
297303
}
298304

@@ -344,6 +350,7 @@ function vtkCellPicker(publicAPI, model) {
344350
}
345351
}
346352
}
353+
/* eslint-enable no-continue */
347354
}
348355

349356
if (minCellId >= 0 && tMin < model.globalTMin) {

0 commit comments

Comments
 (0)