Skip to content

Computing geodesic on Intrinsic Triangulation triggers an assert #212

@spookyGh0st

Description

@spookyGh0st

The following code will trigger this message:

bug_report: geometry-central/src/surface/exact_geodesics.cpp:1045: void geometrycentral::surface::GeodesicAlgorithmExact::construct_propagated_intervals(bool, Halfedge, IntervalWithStop *, unsigned int &, interval_pointer): Assertion `p->start() < p->stop()' failed.

I have set up a small repository to reproduce this issue here. Note that the source vertex is a boundary vertex, so it might be connected to #119 or #133 . (@MarkGillespie )

int main() {
    using namespace geometrycentral::surface;
    std::unique_ptr<ManifoldSurfaceMesh> mesh;
    std::unique_ptr<VertexPositionGeometry> geometry;
    std::filesystem::path dir = std::filesystem::path(__FILE__).parent_path();
    std::tie(mesh, geometry) = readManifoldSurfaceMesh((dir / "grid.obj").string());

    // Compute geodesic on normal mesh, that works without problem
    geometry->requireVertexDualAreas();
    SurfacePoint c = findCenter(*mesh,*geometry,geometry->vertexDualAreas);
    GeodesicAlgorithmExact mmp(*mesh,*geometry);
    mmp.propagate(mesh->vertex(5));
    auto geod = mmp.traceBack(c);


    // Compute geodesic on intrinsic mesh, fails
    auto T = SignpostIntrinsicTriangulation(*mesh,*geometry);
    T.requireVertexDualAreas();
    SurfacePoint T_c = T.equivalentPointOnIntrinsic(c);
    GeodesicAlgorithmExact T_mmp(*T.intrinsicMesh,T);
    T_mmp.propagate(T.intrinsicMesh->vertex(5)); // breaks here
    auto T_geod = T_mmp.traceBack(T_c);
    return 0;
}

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