Closed mhr closed 3 years ago
Hi!
The issue here is meshes which contain degenerate faces, or have nonmanifold connectivity. The error you're seeing is the underlying library detecting bad connectivity in the mesh.
For instance, if I'm reading your code correctly, the line faces.append([i, 0, 0])
generates a degenerate "face" where two vertices are actually the same vertex. I think this also happens on the first loop iteration. Generally we would expect no repeat vertices in a face; I suspect if you remove those lines the mesh will work fine.
Similarly, the genreate_faces()
function, which just creates a bunch of random faces, ensures there are no duplicate face indices like that, but can still create nonmanifold meshes (imagine an hourglass configuration with a single vertex at the center). This is why it's not used in the unit tests for MeshVectorHeatSolver
, which requires a manifold triangle mesh.
Since Polyscope just does visualization, it don't check any of these conditions and just happily renders the mesh. A face which contains a duplicate vertex will just be an invisible sliver which you can't even see.
Hope that helps!
Skipping the first and last vertex in my faces loop was the answer, thank you so much!
Hello!
I've been trying to figure out how to generate a 2D circle mesh for use with
potpourri3d
, but I keep getting this error:self-edge in face list [x] -- [x]
. While investigating, I came across your test functions,generate_verts()
andgenerate_faces()
. When I tried to load a mesh using those two, I also gotself-edge in face list
. However, puzzlingly, I could use the bunny mesh without any errors.Other errors I got while trying to make my circle mesh work include
vertex [x] appears in more than one boundary loop
andduplicate edge in list [i] -- [j]
.I'm confused because
polyscope
renders the meshes correctly, butpotpourri3d
has a hard time with the same meshes.Thank you!