Point#

class planestress.pre.geometry.Point(x: float, y: float, tol: int, mesh_size: float | None = None)[source]#

Bases: object

Class describing a point in 2D space.

Parameters:
  • x (float) – x location of the point.

  • y (float) – y location of the point.

  • tol (int) – Number of digits to round the point to.

Variables:
  • idx (int) – Point index.

  • poly_idxs (list[int]) – Indexes of polygons that contain the point.

  • mesh_size (float | None) – Mesh size at the point.

Methods

round

Rounds the point to tol digits.

to_shapely_point

Converts the point to a shapely Point object.

to_tuple

Converts the point to a tuple.

Attributes

mesh_size

x

y

tol

idx

poly_idxs

round() None[source]#

Rounds the point to tol digits.

to_tuple() tuple[float, float][source]#

Converts the point to a tuple.

Returns:

Point in tuple format (x, y).

Return type:

tuple[float, float]

to_shapely_point() Point[source]#

Converts the point to a shapely Point object.

Returns:

Point as a shapely.Point.

Return type:

Point