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

find_geodesic_path_poly fails when there’s overlap in the dijkstraPath #17

Open
Petingo opened this issue Apr 4, 2024 · 1 comment

Comments

@Petingo
Copy link

Petingo commented Apr 4, 2024

Screenshot 2024-04-04 at 15 25 54

As the diagram shows, find_geodesic_path_poly will generate something unsatisfactory when there's overlap in the dijkstraPath. I remember the original author of the papar said that there's some problem when overlap / knot / loop presents in the initial path.

My workaround is to find the edge path by myself, making sure there's no overlapped vertices before calling the function.

@nmwsharp
Copy link
Owner

Hi! You're correct in your understanding.

The underlying algorithm does support this case, but the API exposed in these python bindings does not. The problem is that you need to communicate the input path in a richer way: that in the overlapping region, the paths sit on top of each other but do not strictly cross.

In the underlying C++ implementation (from geometry-central), we represent paths which are coincident along an edge as a stacked sequence (see Fig 11 in the paper). However passing the polyline does not give the "stacking".

This limitation is not easily fixed. We could give an "advanced" API to communicate the stacking. Or we could write some heuristic functions to infer it in cases like this, where it's pretty obvious what the desired topology of paths are... I don't have plans to immediately implement either of those things, but would gladly accept a PR if anyone wants to try it.

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

2 participants