Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of o3d.t.geometry.TriangleMesh.clip_plane #6855

Open
3 tasks done
1ckendall opened this issue Jul 4, 2024 · 1 comment
Open
3 tasks done

Implementation of o3d.t.geometry.TriangleMesh.clip_plane #6855

1ckendall opened this issue Jul 4, 2024 · 1 comment
Labels

Comments

@1ckendall
Copy link

1ckendall commented Jul 4, 2024

Checklist

My Question

In my code I am sequentially clipping a mesh by a large number of planes, but this operation is very slow relative to the rest of my code and as far as I can tell from checking my performance manager (Windows 11 and Ubuntu, both on CPU), single-threaded. I've looked through the repo and it seems that the clip_plane operation is currently implemented with the vtkClipPolyData class, which appears to be single-threaded. Is there an obvious way to parallelise this operation?

VTK also has a vtkPolyDataPlaneClipper class, which is multithreaded but seems to be implemented on a slightly different set of inputs (apologies for the vagueness -- I am not familiar with C++). Would this be a possible future option for faster plane clipping?

@benjaminum
Copy link
Contributor

Hi @1ckendall, thanks for checking out ways to improve the performance. My understanding of vtkPolyDataPlaneClipper is that it does not actually clip triangles but either keeps or discards the whole triangle.
However, the current clip algorithm vtkClipPolyData seems to support multiple planes, which could make clipping more efficient.
Would you be willing to work on exposing this functionality?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants