Point2D#

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

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

Provides geometry primitive representation for a 2D point.

Parameters:
inputUnion[ndarray, RealSequence], default: DEFAULT_POINT2D_VALUES

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

unitUnit, default: DEFAULT_UNITS.LENGTH

Units for defining 2D point values.

Overview#

unit

Get the unit of the object.

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.

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: beartype.typing.Union[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.unit() pint.Unit#

Get the unit of the object.

Point2D.base_unit() pint.Unit#

Get the base unit of the object.