Public Member Functions | |
| Polygon | create_from_points (cls, Union[PointArray, np.ndarray] points) |
| Creates an instance of Polygon using an array of Points or floats ( [[x,y],...] ). | |
| None | __init__ (self, *Any args, **Any kwargs) |
| In order to create an empty Polygon create it with no arguments, in all other cases please refer to the classmethods. | |
| Point | __getitem__ (self, int index) |
| Return a point at index. | |
| PointArray | points (self) |
| Get the points of the polygon. | |
| bool | is_closed (self) |
| Checks if a polygon is closed. | |
| None | __del__ (self) |
Protected Attributes | |
| PointArray|None | _points = None |
| _handle = peak_icv_polygon_handle(None) | |
| _point_type = None | |
A polygon is a two-dimensional geometric shape that is made up of a finite number of straight line segments connected end-to-end to form an open or closed figure.
A polygon is represented by the points where the line segments meet.
| None __init__ | ( | self, | |
| *Any | args, | ||
| **Any | kwargs ) |
In order to create an empty Polygon create it with no arguments, in all other cases please refer to the classmethods.
| None __del__ | ( | self | ) |
| Point __getitem__ | ( | self, | |
| int | index ) |
Return a point at index.
| Polygon create_from_points | ( | cls, | |
| Union[PointArray, np.ndarray] | points ) |
Creates an instance of Polygon using an array of Points or floats ( [[x,y],...] ).
| points | Array of Points or floats |
| NotPossibleException | If the given points is not a numpy array of Points or floats. |
| MismatchException | If one of the coordinates in the numpy array is not a float. |
| OutOfRangeException | If one or more points in the numpy array are not two-dimensional. |
| bool is_closed | ( | self | ) |
Checks if a polygon is closed.
A closed polygon contains the same point as first and last point.
| PointArray points | ( | self | ) |
Get the points of the polygon.
|
protected |
|
protected |
|
protected |