From 4cce741e417370cc35a8e91a0993492a20ff3bdc Mon Sep 17 00:00:00 2001 From: Dorad Date: Tue, 3 Dec 2019 17:04:50 +0800 Subject: [PATCH] add height into cylinder_actor. add optional parameter 'height' into cylinder_actor. --- tvtk/pyface/actors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tvtk/pyface/actors.py b/tvtk/pyface/actors.py index 0297aec0e..da2414ff6 100644 --- a/tvtk/pyface/actors.py +++ b/tvtk/pyface/actors.py @@ -65,10 +65,10 @@ def cube_actor(center=(0, 0, 0), color=colors.blue, opacity=1.0): return actor -def cylinder_actor(center=(0, 0, 0), radius=0.5, resolution=64, +def cylinder_actor(center=(0, 0, 0), radius=0.5, height=1, heiresolution=64, color=colors.green, opacity=1.0): """ Creates a cylinder and returns a tvtk.Actor. """ - source = tvtk.CylinderSource(center=center, radius=radius, + source = tvtk.CylinderSource(center=center,height=height, radius=radius, resolution=resolution) mapper = tvtk.PolyDataMapper() configure_input_data(mapper, source.output)