Skip to content

feat(FillHolesFilter): add vtkFillHolesFilter#3434

Open
daker wants to merge 1 commit intoKitware:masterfrom
daker:feat-fillholesfilter
Open

feat(FillHolesFilter): add vtkFillHolesFilter#3434
daker wants to merge 1 commit intoKitware:masterfrom
daker:feat-fillholesfilter

Conversation

@daker
Copy link
Collaborator

@daker daker commented Feb 27, 2026

Context

PR #3433 needs to be merged first

Results

add vtkFillHolesFilter

image

Changes

  • Documentation and TypeScript definitions were updated to match those changes

PR and Code Checklist

  • semantic-release commit messages
  • Run npm run reformat to have correctly formatted code

Testing

  • This change adds or fixes unit tests
  • Tested environment:
    • vtk.js:
    • OS:
    • Browser:

@daker daker force-pushed the feat-fillholesfilter branch from aecceaa to b59565f Compare February 27, 2026 16:07
Copy link
Member

@finetjul finetjul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would have been great to keep the comments from the C++ file.
Maybe it should be mentioned somewhere that it is the same algorithm than the C++.

let cellId = 0;
while (polyOffset < polyValues.length) {
const npts = polyValues[polyOffset];
const pts = [];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to move outside while loop to lower the number of new allocations

for (let i = 0; i < npts; i++) {
const p1 = pts[i];
const p2 = pts[(i + 1) % npts];
const neighbors = mesh.getCellEdgeNeighbors(cellId, p1, p2);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PolyData/index.d.ts indicates that getCellEdgeNeighbors returns void. Can you please fix it ?

linesPolyData.setLines(newLines);
linesPolyData.buildLinks();

const visited = new Array(numLines).fill(false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if a typedarray is not "faster" in this situation... (it would be better memory-wise)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants