- PolyData.extrude_rotate(resolution=30, inplace=False, translation=0.0, dradius=0.0, angle=360.0, capping=False, progress_bar=False)¶
Sweep polygonal data creating “skirt” from free edges and lines, and lines from vertices.
This takes polygonal data as input and generates polygonal data on output. The input dataset is swept around the z-axis to create new polygonal primitives. These primitives form a “skirt” or swept surface. For example, sweeping a line results in a cylindrical shell, and sweeping a circle creates a torus.
There are a number of control parameters for this filter. You can control whether the sweep of a 2D object (i.e., polygon or triangle strip) is capped with the generating geometry via the
cappingparameter. Also, you can control the angle of rotation, and whether translation along the z-axis is performed along with the rotation. (Translation is useful for creating “springs”.) You also can adjust the radius of the generating geometry with the
The skirt is generated by locating certain topological features. Free edges (edges of polygons or triangle strips only used by one polygon or triangle strips) generate surfaces. This is true also of lines or polylines. Vertices generate lines.
This filter can be used to model axisymmetric objects like cylinders, bottles, and wine glasses; or translational rotational symmetric objects like springs or corkscrews.
Number of pieces to divide line into.
Overwrites the original mesh inplace.
Total amount of translation along the z-axis.
Change in radius during sweep process.
The angle of rotation in degrees.
Control if the sweep of a 2D object is capped.
Display a progress bar to indicate progress.
Rotationally extruded mesh.
Create a “spring” using the rotational extrusion filter.
>>> import pyvista >>> profile = pyvista.Polygon(center=[1.25, 0.0, 0.0], radius=0.2, ... normal=(0, 1, 0), n_sides=30) >>> extruded = profile.extrude_rotate(resolution=360, translation=4.0, ... dradius=.5, angle=1500.0) >>> extruded.plot(smooth_shading=True)
Create a “wine glass” using the rotational extrusion filter.
>>> import numpy as np >>> points = np.array([[-0.18, 0, 0], ... [-0.18, 0, 0.01], ... [-0.18, 0, 0.02], ... [-0.01, 0, 0.03], ... [-0.01, 0, 0.04], ... [-0.02, 0, 0.5], ... [-0.05, 0, 0.75], ... [-0.1, 0, 0.8], ... [-0.2, 0, 1.0]]) >>> spline = pyvista.Spline(points, 30) >>> extruded = spline.extrude_rotate(resolution=20) >>> extruded.plot(color='tan')