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

RemoveDuplicateVertices Implementation for TriangleMesh. #6414

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Commits on Oct 6, 2023

  1. RemoveDuplicateVertices Implementation for TriangleMesh.

    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
    intelshashi committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    4535bb2 View commit details
    Browse the repository at this point in the history
  2. Updated CHANGELOG.md

    intelshashi committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    b56ca5f View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2023

  1. Configuration menu
    Copy the full SHA
    158d965 View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2023

  1. Duplicate vertex attributes shrunk using IndexGet

    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
    intelshashi committed Nov 15, 2023
    Configuration menu
    Copy the full SHA
    a7664c8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9155acf View commit details
    Browse the repository at this point in the history