-
Notifications
You must be signed in to change notification settings - Fork 482
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
Geodesic Path Issues: Computing length of 1D mesh and finding shortest path doesn't always work #260
Comments
Also note that the shortest path is not always found: import pyvista as pv
from pyvista import examples
sphere = examples.load_globe()
geodesic = sphere.geodesic(10, sphere.n_points-40)
p = pv.Plotter(notebook=0)
p.add_mesh(geodesic, line_width=10, color='red', label='Geodesic Path')
p.add_mesh(sphere, show_edges=True, )
p.camera_position = [-1,-1,1]
p.add_legend()
p.show() |
The length issue should be resolved by #261 but I'm still concerned that the path is not always the shortest path as shown in #260 (comment) |
Huh, that's confusing. Thanks for raising the issue, @banesullivan. It does indeed affect my computations. Also very strange that path isn't always the shortest one. |
I suppose the shortest path issue is on the VTK side with the |
Closing issue as I don't think there is anything we can do on the PyVista side |
So this is actually just an artifact of how I created this Globe mesh - it’s split on the 0 degree meridian so the path has to go to the poles to get around it |
The length calculation for the geodesic path is not correctly implemented:
pyvista/pyvista/pointset.py
Line 1413 in 7909cbe
The
GetLength()
method of a VTK mesh actually returns the length of the diagonal of that mesh's bounding box:Note that this is relevant to #252
Pinging @supersubscript - are you using this feature? If so you may be getting incorrect results...
The text was updated successfully, but these errors were encountered: