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

Polyscope and Geometry central disagree on the number of halfedges in a mesh ? #295

Open
MathNewBalance opened this issue Sep 11, 2024 · 1 comment

Comments

@MathNewBalance
Copy link

MathNewBalance commented Sep 11, 2024

Not sure if anyone else has found this or if I am doing this wrong but I have found that when loading a mesh in with geometry central and then trying to add a halfedge scalar value to the mesh in polyscope I get an error as polyscope thinks there is fewer halfedges than geometry central does. Incase I am doing something stupid I have added a snipped below.

polyscope::init();
//Load Mesh 
std::tie(mesh, geometry) = readManifoldSurfaceMesh("QuadMesh.obj");
//Register Mesh
sm = polyscope::registerSurfaceMesh("my mesh", geometry->vertexPositions, mesh->getFaceVertexList());
//Object to store halfedge values
HalfedgeData<int> visitedHE(*mesh, 0);


// Filling data (This is not the way I am actually doing it, but its essentially the same )
for(Halfedge he : mesh->halfedges()){
visitedHE[he] =1;
}

sm->addHalfedgeScalarQuantity("HEvisit", visitedHE)->setEnabled(true);

polyscope::show();

From the mesh I have Geometry Central thinks that I have 10974 halfedges but polyscope thinks I have 10928 halfedges??

If I am missing something obvious then please let me know.

@MathNewBalance MathNewBalance changed the title Polyscope and Geometry central dissagree on the number of halfedges in a mesh ? Polyscope and Geometry central disagree on the number of halfedges in a mesh ? Sep 11, 2024
@MathNewBalance
Copy link
Author

I found out a bit more.

This seems to be a difference in how Polyscope and Geometry central treat meshes with a boundary curve. When the mesh is a closed surface they have the same number of halfedges however when there is a boundary curve the difference in halfedge count matches the number of edges in the boundary loop.

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

No branches or pull requests

1 participant