Points#

class ansys.dpf.core.geometry.Points(coordinates, server=None)#

Collection of DPF points.

This can be a single point or a cloud of points.

Parameters:
  • coordinates (array, list, Field) – Coordinates of the points in a 3D space.

  • server (ansys.dpf.core.server, optional) – Server with the channel connected to the remote or local instance. The default is None, in which case an attempt is made to use the global server.

Examples

Create Points object with two points, print object information and plot.

>>> from ansys.dpf.core.geometry import Points
>>> points = Points([[0, 0, 0], [1, 0, 0]])
>>> print(points)
DPF Points object:
Number of points: 2
Coordinates:
  [0. 0. 0.]
  [1. 0. 0.]
>>> points.plot()

Overview#

plot

Visualize Points object. If provided, mesh will be also plotted.

coordinates

Coordinates of the Points.

n_points

Total number of points.

dimension

Dimension of the Points object space.

__getitem__

Retrieve coordinates data corresponding to a given value.

__len__

Retrieve the number of points.

__str__

Print Points information.

Import detail#

from ansys.dpf.core.geometry import Points

Property detail#

property Points.coordinates#

Coordinates of the Points.

property Points.n_points#

Total number of points.

property Points.dimension#

Dimension of the Points object space.

Method detail#

Points.__getitem__(value)#

Retrieve coordinates data corresponding to a given value.

Points.__len__()#

Retrieve the number of points.

Points.__str__()#

Print Points information.

Points.plot(mesh=None, **kwargs)#

Visualize Points object. If provided, mesh will be also plotted.