Skip to content

Commit

Permalink
make_tube: skip single point branches
Browse files Browse the repository at this point in the history
  • Loading branch information
schlegelp committed Aug 11, 2024
1 parent 73ca674 commit 7dc5011
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions navis/plotting/plot_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ def make_tube(segments, radii=1.0, tube_points=8, use_normals=True):
# Need to make sure points are floats
points = np.array(points).astype(float)

# Skip single points
if len(points) < 2:
continue

if use_normals:
tangents, normals, binormals = _frenet_frames(points)
else:
Expand Down

0 comments on commit 7dc5011

Please sign in to comment.