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

vtk integration for mesh processing #4957

Merged
merged 29 commits into from
May 3, 2022
Merged

vtk integration for mesh processing #4957

merged 29 commits into from
May 3, 2022

Conversation

benjaminum
Copy link
Contributor

@benjaminum benjaminum commented Mar 31, 2022

This PR adds the VTK library for mesh processing and

  • implements a mesh clipping operation with a plane
  • adds building vtk from source as external project
  • adds a workflow for precompiling vtk for linux/win/mac
  • adds a build path that downloads the precompiled vtk (default)

This change is Reviewable

@update-docs
Copy link

update-docs bot commented Mar 31, 2022

Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes.

@benjaminum benjaminum changed the title [draft] vtk integration test vtk integration for mesh processing Apr 19, 2022
@benjaminum benjaminum marked this pull request as ready for review April 19, 2022 21:12
@benjaminum
Copy link
Contributor Author

benjaminum commented Apr 19, 2022

The following probably should be discussed

  • VtkUtils.h is placed in the kernels subdir and has its own namespace vtkutils
  • arm64 has no precompiled vtk packages (precompiling for arm can be addressed in another PR after changes to the arm CI have been made)

@benjaminum benjaminum requested a review from yxlao April 19, 2022 21:17
cpp/open3d/t/geometry/kernel/VtkUtils.h Outdated Show resolved Hide resolved
cpp/open3d/t/geometry/kernel/VtkUtils.cpp Outdated Show resolved Hide resolved
cpp/open3d/t/geometry/TriangleMesh.cpp Outdated Show resolved Hide resolved
cpp/open3d/t/geometry/TriangleMesh.cpp Outdated Show resolved Hide resolved
pts->SetDataTypeToFloat();
pts->SetNumberOfPoints(num_points);
const float* data = tensor_cpu.GetDataPtr<float>();
for (size_t i = 0; i < num_points; ++i) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there away to create vtk points from a buffer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did some more research on this. It seems possible but we need to use a different array interface.
I think it is better to create a separate PR for this.

cpp/open3d/t/geometry/kernel/VtkUtils.cpp Outdated Show resolved Hide resolved
cpp/open3d/t/geometry/kernel/VtkUtils.cpp Outdated Show resolved Hide resolved
@yxlao yxlao self-requested a review May 2, 2022 09:18
@yxlao yxlao merged commit ec685ce into master May 3, 2022
@yxlao yxlao deleted the benjaminum/vtk branch May 3, 2022 03:36
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