nmwsharp / potpourri3d

An invigorating blend of 3D geometry tools in Python.
MIT License
414 stars 31 forks source link

RuntimeError: vertices lie on disconnected components of the surface #3

Closed facundolazcano closed 3 years ago

facundolazcano commented 3 years ago

I load a mesh with triangle faces. Then I try to execute these code lines: ` path_solver = pp3d.EdgeFlipGeodesicSolver(V, F) # shares precomputation for repeated solves

path_pts = path_solver.find_geodesic_path(v_start=0, v_end=100)`

But launch "RuntimeError: vertices lie on disconnected components of the surface".

How to solve this problem??

nmwsharp commented 3 years ago

Hi,

This error means what it says. The points lie on two different "islands" of the mesh, so the solver cannot find any path at all between them.

If you think that your points really are on the same component of the mesh, it is possible that your mesh is not really connected in the way you think it is. For instance, when passing the V and F matrices, it is really important that adjacent triangles share the same vertex entries, rather than having their own separate copies of the vertices (which makes the mesh disconnected).

Hope that helps!

facundolazcano commented 3 years ago

Hi,

Thanks for your help.