get_lines#

LegacyGeometry.get_lines(return_as_list=False)#

Obtain line geometry

Obtain the active lines as a pyvista.PolyData object or a list of pyvista.PolyData objects.

Parameters:
return_as_listbool, optional

Whether to return the lines in a list. The default is False.

Returns:
Union[pv.PolyData, List[pv.PolyData]]
Return type:

Union[PolyData, List[PolyData]]

Examples

Return a single merged mesh.

>>> line_mesh = mapdl.geometry.get_lines()
>>> line_mesh
PolyData (0x14917e740)
  N Cells:    45
  N Points:   4500
  N Strips:   0
  X Bounds:   -1.588e-02, 1.588e-02
  Y Bounds:   -7.620e-03, 1.778e-02
  Z Bounds:   -3.180e-03, 1.524e-02
  N Arrays:   1

Return a list of lines as individual grids

>>> lines = mapdl.geometry.get_lines(return_as_list=True)
>>> lines
[PolyData (0x1492ee7a...rrays:   1, PolyData (0x1491a404...rrays:   1, PolyData (0x1491068c...rrays:   1, PolyData (0x14910662...rrays:   1, PolyData (0x14910632...rrays:   1, PolyData (0x1492eeb0...rrays:   1, PolyData (0x1492eec8...rrays:   1, PolyData (0x1492eee0...rrays:   1, PolyData (0x1492eef8...rrays:   1, PolyData (0x1492ef10...rrays:   1, PolyData (0x1492ef28...rrays:   1, PolyData (0x1492ef40...rrays:   1, PolyData (0x1492ef58...rrays:   1, PolyData (0x1492ef70...rrays:   1, ...]