Plane#

class ansys.dpf.core.geometry.Plane(center, normal, width=1, height=1, n_cells_x=20, n_cells_y=20, server=None)#

Plane object.

Parameters:
  • center (array, list) – 3D coordinates of the center point of the plane.

  • normal (array, list, Line) – Normal direction to the plane.

  • width (int, float) – Width of the discretized plane (default = 1).

  • height (int, float) – Height of the discretized plane (default = 1).

  • n_cells_x (int) – Number of cells in the x direction of the plane.

  • n_cells_y (int) – Number of cells in the y direction of the plane.

  • 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 a plane from its center and normal direction, print object information and plot.

>>> from ansys.dpf.core.geometry import Plane
>>> plane = Plane([0, 0, 0], [1, 0, 0])
>>> print(plane)
DPF Plane object:
Center point: [0, 0, 0]
Normal direction: [1. 0. 0.]
Plane discretizaton using:
  Width (x-dir): 1
  Height (y-dir): 1
  Num cells x-dir: 20
  Num cells y-dir: 20
>>> plane.plot()

Overview#

plot

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

center

Center of the plane.

normal_vect

Normal vector to the plane.

normal_dir

Normal direction to the plane.

mesh

Get discretized mesh for the plane.

width

Get width of the discretized plane.

height

Get height of the discretized plane.

n_cells_x

Get number of cells in the x direction of the plane.

n_cells_y

Get number of cells in the y direction of the plane.

__str__

Print plane information.

Import detail#

from ansys.dpf.core.geometry import Plane

Property detail#

property Plane.center#

Center of the plane.

property Plane.normal_vect#

Normal vector to the plane.

property Plane.normal_dir#

Normal direction to the plane.

property Plane.mesh#

Get discretized mesh for the plane.

property Plane.width#

Get width of the discretized plane.

property Plane.height#

Get height of the discretized plane.

property Plane.n_cells_x#

Get number of cells in the x direction of the plane.

property Plane.n_cells_y#

Get number of cells in the y direction of the plane.

Method detail#

Plane.__str__()#

Print plane information.

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

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