pyvista.CylinderSource#
- class CylinderSource(*args, **kwargs)[source]#
- Cylinder source algorithm class. - Warning - pyvista.Cylinder()function rotates the- pyvista.CylinderSource‘s- pyvista.PolyDatain its own way. It rotates the- pyvista.CylinderSource.output90 degrees in z-axis, translates and orients the mesh to a new- centerand- direction.- Parameters:
- centersequence[float], default: (0.0, 0.0, 0.0)
- Location of the centroid in - [x, y, z].
- directionsequence[float], default: (1.0, 0.0, 0.0)
- Direction cylinder points to in - [x, y, z].
- radiusfloat, default: 0.5
- Radius of the cylinder. 
- heightfloat, default: 1.0
- Height of the cylinder. 
- cappingbool, default: True
- Cap cylinder ends with polygons. 
- resolutionint, default: 100
- Number of points on the circular face of the cylinder. 
 
- centersequence[
 - Examples - Create a default CylinderSource. - >>> import pyvista as pv >>> source = pv.CylinderSource() >>> source.output.plot(show_edges=True, line_width=5)   - Display a 3D plot of a default - CylinderSource.- >>> import pyvista as pv >>> pl = pv.Plotter() >>> _ = pl.add_mesh(pv.CylinderSource(), show_edges=True, line_width=5) >>> pl.show()   - Visualize the output of - CylinderSourcein a 3D plot.- >>> pl = pv.Plotter() >>> _ = pl.add_mesh(pv.CylinderSource().output, show_edges=True, line_width=5) >>> pl.show()   - The above examples are similar in terms of their behavior. - Methods - Attributes - Get cap cylinder ends with polygons. - Get whether the capping should make the cylinder a capsule. - Get location of the centroid in - [x, y, z].- Get the direction vector in - [x, y, z].- Get the height of the cylinder. - Get the output data object for a port on this algorithm. - Get radius of the cylinder. - Get number of points on the circular face of the cylinder.