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

New feature: remove center vertex #82

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

Conversation

PJK136
Copy link
Contributor

@PJK136 PJK136 commented Aug 11, 2021

Description

Add a new topological operation to remove a vertex and its incident halfedges by merging all incident faces.

In other words, it's the reverse operation of void split(Face f, Vertex v);

Motivation

Share the implementation with the upstream.

Benefits

To have void split(Face f, Vertex v); and its reverse operation.

Drawbacks

None.

Applicable Issues

None.

PJK136 and others added 2 commits August 11, 2021 11:04
Signed-off-by: Paul Du <du.paul136@gmail.com>
Signed-off-by: João Baptista de Paula e Silva <jbaptistapsilva@yahoo.com.br>
@dsieger
Copy link
Member

dsieger commented Nov 20, 2021

Hi Paul, thanks for your submission. Just gave it a try, and observed two issues:

  1. The function seems to only work on triangle meshes. It crashes on quad / polygon meshes. You can try with the fandisk_quad.off model from the pmp-data repository or any triangle mesh converted into a polygon mesh using the dual() function.
  2. The function does not handle boundary vertices, which makes sense I guess. However, it should be documented as a pre-condition of the function. A corresponding assert() or even an InvalidInputException would be helpful as well.

Thanks,
Daniel

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

3 participants