-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add GetSurfaceArea() for t::TriangleMesh #6248
Conversation
Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes. |
Hi @shanagr thanks for adding this! Please add a C++ unit test and Python bindings. See the corresponding unit test and python bindings for the Eigen based TriangleMesh class for inspiration. |
Direct problem in this - You can't iterate on tensor ptr as you have done for non-contiguous tensor, so making them contiguous by adding However we want to avoid using custom kernels as much as we can, as it creates future maintenance issues. Ideally we want to use Tensor operations for everything and the Tensor implementation handles all the contiguous, device, etc. I agree adding kernels offers faster implementation, but it disconnects it benefiting from improvements in tensor implementation. If you use Tensor operations, the improvement in tensor ops over the time will translate to overall lib. improvement. For this particular case such as this PR, where one needs to iterate over each element and apply operation, we need to think if we can add a Tensor operation like |
@reyanshsolis thanks for the comment. I will try to digest it and make changes accordingly. @ssheroy I haven't had the time the past few weeks to look at the Python bindings. Hopefully I will have more time going forward. I will look into this over the weekend. |
Looking at this PR, it seems only Python bindings are missing and it must be ensured that the data is contiguous. @reyanshsolis Do you think it makes sense to merge the current implementation? It brings one more function to the new Tensor API. Besides, we don't have an @shanagr Do you think you could add the missing parts and let us know if you need help? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 7 files reviewed, all discussions resolved (waiting on @reyanshsolis)
@benjaminum Thanks for filling in the missing pieces. I have not been as consistent as I hoped, but I'm giving a second shot to being a regular contributor. |
@shanagr No worries, thanks for your contribution |
Type
Motivation and Context
This is my first/test PR. I am just getting familiar with Open3D and was told by maintainers that
t::TriangleMesh
doesn't have a lot of the functionality provided in legacyTriangleMesh
, and Open3D is in the process of porting these. I found the oldTriangleMesh
had aGetSurfaceArea()
function and tried to implement it int::TriangleMesh
. I'm looking for feedback mostly.Checklist:
python util/check_style.py --apply
to apply Open3D code styleto my code.
updated accordingly.
results (e.g. screenshots or numbers) here.
Description
This change is