Skip to content

Commit

Permalink
Fix length calculation of geodesic path (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
banesullivan committed Jun 14, 2019
1 parent 7909cbe commit 46f99cf
Showing 1 changed file with 6 additions and 2 deletions.
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

0 comments on commit 46f99cf

Please sign in to comment.