CornerData seems to not update correctly during mutation

Open
#47 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp

Research direction

Start at mesh->insertVertexAlongEdge(edge) and trace how CornerData associated with the affected halfedges and corners is transferred during the mutation. Reproduce the two-rectangle case described in the issue, checking which corner loses its UV data; done means the mutation preserves the expected CornerData and the non-manifold question is explicitly addressed.

Written by the indexing model from the issue text.

Description

Hi,

First of all, great work on this library !

I'm trying to do some simple mutation, like adding a vertex along an edge. I have this geometry in the image below which could be seen as 2 rectangles merged together, and I have different CornerData (let's call them UVs) for each corner of the rectangles.

When I try to add a vertex along the shared edge, it seems that some CornerData are lost (showed with the ?).

Is this normal behavior ? How could I change this besides copying the CornerData before the mutation and rewrite them later ?

Right now I do :

//Store UVs
Vector2 previousUVF1 = uvData[edge.halfedge().corner()];

//Insert new vertex, and get the halfedge in the center point, then rewrite UVs
auto newhe = mesh->insertVertexAlongEdge(edge);
uvData[newhe.prevOrbitFace().corner()] = previousUVF1;

(And this is not related to this issue, but will mutation like adding a vertex along an edge be available for non manifold meshes ?)

Thanks again for you work.

-Edit : after further investigation, it seems that only one corner lose his data. Update the image to reflect that

Dominant language
C++
Stars
1.3k
Forks
183
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nmwsharp/geometry-central

All issues in nmwsharp/geometry-central

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.