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

Stubs for FlyingObjects implementation #6507

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

intelshashi
Copy link

Type

  • Bug fix (non-breaking change which fixes an issue): Fixes #
  • New feature (non-breaking change which adds functionality). Resolves #
  • Breaking change (fix or feature that would cause existing functionality to not work as expected) Resolves #

Motivation and Context

Checklist:

  • I have run python util/check_style.py --apply to apply Open3D code style
    to my code.
  • This PR changes Open3D behavior or adds new functionality.
    • Both C++ (Doxygen) and Python (Sphinx / Google style) documentation is
      updated accordingly.
    • I have added or updated C++ and / or Python unit tests OR included test
      results
      (e.g. screenshots or numbers) here.
  • I will follow up and update the code if CI fails.
  • For fork PRs, I have selected Allow edits from maintainers.

Description

intelshashi and others added 6 commits October 5, 2023 22:57
Functionality to remove duplicate vertices and update
other vertex attributes and triangle indices is implemented.
The C++ and python tests are also written to test the code.

On branch sganjugu/remdup2
Changes to be committed:
modified:   cpp/open3d/t/geometry/TriangleMesh.cpp
modified:   cpp/open3d/t/geometry/TriangleMesh.h
modified:   cpp/pybind/t/geometry/trianglemesh.cpp
modified:   cpp/tests/t/geometry/TriangleMesh.cpp
modified:   python/test/t/geometry/test_trianglemesh.py
Previously, I was doing a manual copy and shrinking the vertices.
Instead in this checkin all vertex attributes, including the
coordinates are shrunk using IndexGet method using a vertex mask.

Further, the triangle index remapping is similar to what was done
earlier, with some simplications. One thing to note, is that
we cannot use utility::InclusivePrefixSum to remap vertex indices
because the duplicates can occur in any position and may be duplicates
of any earlier vertex.

For e.g., suppose there were 9 vertices to start with, and 8th (index 7, starting from 0),
was a duplicate of 2nd (index 1, starting from 0).

So, the vertex mask would look like this:
Vertex indices: [0, 1, 2, 3, 4, 5, 6, 7, 8]
Vertex mask:    [1, 1, 1, 1, 1, 1, 1, 0, 1]
Prefix sum:   [0, 1, 2, 3, 4, 5, 6, 7, 7, 8]
This gives an incorrect index map for 8th vertex, which is mapped to
index 7 instead of 1.

On branch sganjugu/remdup2
Your branch is up to date with 'origin/sganjugu/remdup2'.
Changes to be committed:
modified:   ../cpp/open3d/t/geometry/TriangleMesh.cpp
modified:   ../python/test/t/geometry/test_trianglemesh.py
Copy link

update-docs bot commented Nov 24, 2023

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

@cwreynolds
Copy link

@intelshashi: could you provide some narrative explanation, or perhaps a link, to define your usage of the term “FlyingObjects”? It obviously does not mean that that phrase suggests to me. (I do a lot of work with objects that fly around in 3d space.) Apparently something to do with a class called vtkFlyingEdges3D?

@intelshashi
Copy link
Author

@intelshashi: could you provide some narrative explanation, or perhaps a link, to define your usage of the term “FlyingObjects”? It obviously does not mean that that phrase suggests to me. (I do a lot of work with objects that fly around in 3d space.) Apparently something to do with a class called vtkFlyingEdges3D?

I am exploring an alternative isocontour algorithm, see link below for details.
https://www.kitware.com/really-fast-isocontouring/

Please note this pull request is work in progress, I was running out of disk space and wanted to make sure my changes were not lost. It will take sometime to be ready.

intelshashi and others added 12 commits January 9, 2024 06:45
* Fix .desktop entry when installing in a UNIX system

* Fix the path to the default Open3D application when installing to a custom path.

* Update CHANGELOG.md for PR#6599

---------

Co-authored-by: Ewing Kang <[email protected]>
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](pallets/jinja@3.1.2...3.1.3)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Made vertex mask type bool.
- Check if mesh has triangle indices before getting them.
- Modified some errors to warnings.

On branch sganjugu/remdup2
Your branch is up to date with 'origin/sganjugu/remdup2'.
Changes to be committed:
modified:   cpp/open3d/t/geometry/TriangleMesh.cpp
Instead of using if statements explicitly, used DISPATCH_FLOAT_INT_DTYPE_TO_TEMPLATE
to dispatch to RemoveDuplicateVerticesWorker function appropriately.

On branch sganjugu/remdup2
Your branch is up to date with 'origin/sganjugu/remdup2'.
Changes to be committed:
modified:   ../cpp/open3d/t/geometry/TriangleMesh.cpp
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.

None yet

5 participants