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

Fix length calculation of geodesic path #261

Merged
merged 1 commit into from Jun 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions pyvista/pointset.py
Expand Up @@ -1410,8 +1410,12 @@ def geodesic_distance(self, start_vertex, end_vertex):
Length of the geodesic segment.

"""
length = self.geodesic(start_vertex, end_vertex).GetLength()
return length
path = self.geodesic(start_vertex, end_vertex)
sizes = path.compute_cell_sizes(length=True, area=False, volume=False)
distance = np.sum(sizes['Length'])
del path
del sizes
return distance

def ray_trace(self, origin, end_point, first_point=False, plot=False,
off_screen=False):
Expand Down