lines#
- property Geometry.lines: MultiBlock#
Geometry of the lines.
Obtain the selected lines as a
pyvista.MultiBlock
object.- Returns:
pv.MultiBlock
Examples
>>> mapdl.geometry.lines MultiBlock (0x147b77e20) N Blocks 45 X Bounds -0.016, 0.016 Y Bounds -0.008, 0.018 Z Bounds -0.003, 0.015
You can plot the entities:
>>> mapdl.geometry.lines.plot()
You can access the individual lines using indexing:
>>> line0 = mapdl.geometry.lines[0] >>> line0 PolyData (0x147d5b220) N Cells: 1 N Points: 100 N Strips: 0 X Bounds: 0.000e+00, 0.000e+00 Y Bounds: -7.620e-03, 1.778e-02 Z Bounds: -3.180e-03, -3.180e-03 N Arrays: 1
You can use the entity name:
>>> line1 = mapdl.geometry.lines["line 1"] >>> line1 PolyData (0x147d5b220) N Cells: 1 N Points: 100 N Strips: 0 X Bounds: 0.000e+00, 0.000e+00 Y Bounds: -7.620e-03, 1.778e-02 Z Bounds: -3.180e-03, -3.180e-03 N Arrays: 1
You can iterate the different elements:
>>> points = mapdl.geometry.lines >>> for each_line in points: print(each_line) PolyData (0x147d5b220) N Cells: 1 N Points: 100 N Strips: 0 X Bounds: 0.000e+00, 0.000e+00 Y Bounds: -7.620e-03, 1.778e-02 Z Bounds: -3.180e-03, -3.180e-03 N Arrays: 1 ...