Skip to content

Commit

Permalink
ENH: Expose tip_resolution in pyvista.Arrow (pyvista#624)
Browse files Browse the repository at this point in the history
Add omitted tip_resolution parameter to pyvista.Arrow.
Fixes pyvista#623
  • Loading branch information
adeak authored Feb 21, 2020
1 parent a4f46c9 commit 8632c57
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pyvista/utilities/geometric_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ def CylinderStructured(radius=0.5, height=1.0,


def Arrow(start=(0.,0.,0.), direction=(1.,0.,0.), tip_length=0.25,
tip_radius=0.1, shaft_radius=0.05, shaft_resolution=20):
tip_radius=0.1, tip_resolution=20, shaft_radius=0.05,
shaft_resolution=20):
"""Create a vtk Arrow.
Parameters
Expand All @@ -195,11 +196,14 @@ def Arrow(start=(0.,0.,0.), direction=(1.,0.,0.), tip_length=0.25,
tip_radius : float, optional
Radius of the tip.
tip_resolution : int, optional
Number of faces around the tip.
shaft_radius : float, optional
Radius of the shaft.
shaft_resolution : int, optional
Number of faces around the shaft
Number of faces around the shaft.
Return
------
Expand All @@ -211,6 +215,7 @@ def Arrow(start=(0.,0.,0.), direction=(1.,0.,0.), tip_length=0.25,
arrow = vtk.vtkArrowSource()
arrow.SetTipLength(tip_length)
arrow.SetTipRadius(tip_radius)
arrow.SetTipResolution(tip_resolution)
arrow.SetShaftRadius(shaft_radius)
arrow.SetShaftResolution(shaft_resolution)
arrow.Update()
Expand Down

0 comments on commit 8632c57

Please sign in to comment.