mahautils.shapes.Point#

class mahautils.shapes.Point(units: str | None = None, **kwargs)#

Bases: Geometry

Base class representing an arbitrary point in a space of an arbitrary number of dimensions

This is a generic class that represents an arbitrary point in any coordinate system. In general, this class should be inherited by other classes and customizations added (for instance, checking that the number of point coordinates match the dimension of the coordinate system).

Notes

The equality operator (==) is defined for points. Points are considered equal if they are of the same type (Point, CartesianPoint2D, etc.) and if the points’ have coordinates attributes of the same shape and values.

Attributes

coordinates

The coordinates of the point

Methods

__init__([units])

Creates an instance of a Point class and sets the point coordinates to an empty tuple

Inherited Attributes

units

The units in which the geometry is defined

__init__(units: str | None = None, **kwargs)#

Creates an instance of a Point class and sets the point coordinates to an empty tuple

Parameters:

units (str, optional) – The units in which the geometry is defined, or None to indicate dimensionless geometry or that units are to be ignored (default is None)

property units: str | None#

The units in which the geometry is defined

property coordinates: Tuple[float, ...]#

The coordinates of the point