Skip to content

Default example code breaks for non-triangular meshes #7

@keenancrane

Description

@keenancrane

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions