Points¶
- class py123d.geometry.Point2D[source]¶
Class presenting a 2D point.
Example
>>> from py123d.geometry import Point2D >>> point_2d = Point2D(1.0, 2.0) >>> point_2d.x, point_2d.y (1.0, 2.0) >>> point_2d.array array([1., 2.])
Public Data Attributes:
xThe x coordinate of the point.
yThe y coordinate of the point.
arrayThe array representation of shape (2,), indexed by
Point2DIndex.shapely_pointThe shapely point representation of the 2D point.
point_2dReturns the
Point2Dinstance itself.Inherited from
ArrayMixinarrayThe array representation of the geometric entity.
shapeReturn the shape of the array.
Public Methods:
from_array(array[, copy])Creates a
Point2Dfrom a (2,) shaped numpy array, indexed byPoint2DIndex.Inherited from
ArrayMixinfrom_array(array[, copy])Create an instance from a NumPy array.
from_list(values)Create an instance from a list of values.
tolist()Convert the array to a Python list.
to_list()Convert the array to a Python list.
copy()Return a copy of the object with a copied array.
- classmethod from_array(array, copy=True)[source]¶
Creates a
Point2Dfrom a (2,) shaped numpy array, indexed byPoint2DIndex.
- property array: ndarray[tuple[Any, ...], dtype[float64]]¶
The array representation of shape (2,), indexed by
Point2DIndex.
- property shapely_point: Point¶
The shapely point representation of the 2D point.
- copy()¶
Return a copy of the object with a copied array.
- Return type:
ArrayMixin
- class py123d.geometry.Point3D[source]¶
Class presenting a 3D point.
Example
>>> from py123d.geometry import Point3D >>> point_3d = Point3D(1.0, 2.0, 3.0) >>> point_3d.x, point_3d.y, point_3d.z (1.0, 2.0, 3.0) >>> point_3d.array array([1., 2., 3.])
Public Data Attributes:
xThe x coordinate of the point.
yThe y coordinate of the point.
zThe z coordinate of the point.
arrayThe array representation of shape (3,), indexed by
Point3DIndex.point_3dReturns the
Point3Dinstance itself.point_2dThe 2D projection of the 3D point as a
Point2Dinstance.shapely_pointThe shapely point representation of the 3D point.
Inherited from
ArrayMixinarrayThe array representation of the geometric entity.
shapeReturn the shape of the array.
Public Methods:
from_array(array[, copy])Creates a
Point3Dfrom a (3,) shaped numpy array, indexed byPoint3DIndex.Inherited from
ArrayMixinfrom_array(array[, copy])Create an instance from a NumPy array.
from_list(values)Create an instance from a list of values.
tolist()Convert the array to a Python list.
to_list()Convert the array to a Python list.
copy()Return a copy of the object with a copied array.
- classmethod from_array(array, copy=True)[source]¶
Creates a
Point3Dfrom a (3,) shaped numpy array, indexed byPoint3DIndex.
- property array: ndarray[tuple[Any, ...], dtype[float64]]¶
The array representation of shape (3,), indexed by
Point3DIndex.
- property shapely_point: Point¶
The shapely point representation of the 3D point.
- copy()¶
Return a copy of the object with a copied array.
- Return type:
ArrayMixin