Point2D#

class ansys.geometry.core.math.point.Point2D(input: numpy.ndarray | ansys.geometry.core.typing.RealSequence = DEFAULT_POINT2D_VALUES, unit: pint.Unit | None = None)#

Bases: numpy.ndarray, ansys.geometry.core.misc.units.PhysicalQuantity

Provides geometry primitive representation for a 2D point.

Parameters:
inputndarray | RealSequence, default: DEFAULT_POINT2D_VALUES

Direction arguments, either as a numpy.ndarray class or as a RealSequence.

unitUnit | None, default: DEFAULT_UNITS.LENGTH

Units for defining 2D point values. If not specified, the default unit is DEFAULT_UNITS.LENGTH.

Overview#

base_unit

Get the base unit of the object.

x

X plane component value.

y

Y plane component value.

__eq__

Equals operator for the Point2D class.

__ne__

Not equals operator for the Point2D class.

__add__

Add operation for the Point2D class.

__sub__

Subtraction operation for the Point2D class.

Import detail#

from ansys.geometry.core.math.point import Point2D

Property detail#

property Point2D.x: pint.Quantity#

X plane component value.

property Point2D.y: pint.Quantity#

Y plane component value.

Attribute detail#

Point2D.unit#
Point2D.flat#

Method detail#

Point2D.__eq__(other: Point2D) bool#

Equals operator for the Point2D class.

Point2D.__ne__(other: Point2D) bool#

Not equals operator for the Point2D class.

Point2D.__add__(other: Point2D | ansys.geometry.core.math.vector.Vector2D) Point2D#

Add operation for the Point2D class.

Point2D.__sub__(other: Point2D) Point2D#

Subtraction operation for the Point2D class.

Point2D.base_unit() pint.Unit#

Get the base unit of the object.