gc-polyscope-project-template
gc-polyscope-project-template copied to clipboard
Default example code breaks for non-triangular meshes
For general polygonal meshes, the default example code terminates with an error
[polyscope] [EXCEPTION] SurfaceMesh sphere_line_quad attempted to count edges, but mesh has non-triangular faces. Edge functions are only implemented on a pure-triangular mesh.
libc++abi: terminating due to uncaught exception of type std::runtime_error
The first culprit is the argument polyscopePermutations(*mesh) to polyscope::registerSurfaceMesh. Even if this option is removed, we get an error
libc++abi: terminating due to uncaught exception of type std::runtime_error: GC_SAFETY_ASSERT FAILURE from deps/geometry-central/src/surface/embedded_geometry_interface.cpp:284 - faces must be triangular
due to the line geometry->requireVertexTangentBasis().
It may be better to use a simpler default example that just loads and displays the mesh, to avoid user confusion.