Open3D
Open3D copied to clipboard
Implementation of o3d.t.geometry.TriangleMesh.clip_plane
Checklist
- [X] I have searched for similar issues.
- [X] For Python issues, I have tested with the latest development wheel.
- [X] I have checked the release documentation and the latest documentation (for
mainbranch).
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?
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?