PolygonData#
- class pyedb.dotnet.database.geometry.polygon_data.PolygonData(pedb: pyedb.dotnet.edb.Edb, edb_object: Any | None = None, create_from_points: Any | None = None, create_from_bounding_box: Any | None = None, **kwargs)#
Polygon Data.
Overview#
Create a polygon from a list of points. |
|
Create a polygon from a bounding box defined by two corner points. |
|
Expand the polygon shape by an absolute value in all direction. |
|
Edb Dotnet Api Database Edb.Geometry.CreateFromArcs. |
|
Determines whether a point is inside the polygon. |
|
Determines whether a point is inside the polygon. |
|
Gets the point at the index as a PointData object. |
|
Sets the point at the index from a PointData object. |
Bounding box. |
|
Get the Primitive Arc Data. |
|
Get all points in polygon. |
|
Get all points in polygon without arcs. |
|
Get the area of the polygon. |
Import detail#
from pyedb.dotnet.database.geometry.polygon_data import PolygonData
Property detail#
- property PolygonData.bounding_box: list[float]#
Bounding box.
- Returns:
List[float]List of coordinates for the component’s bounding box, with the list of coordinates in this order: [X lower left corner, Y lower left corner, X upper right corner, Y upper right corner].
- property PolygonData.arcs: list[pyedb.dotnet.database.edb_data.primitives_data.EDBArcs]#
Get the Primitive Arc Data.
Method detail#
- PolygonData.create_from_points(points: list[tuple[float, float]], closed: bool = True) Any#
Create a polygon from a list of points.
- PolygonData.create_from_bounding_box(points: list[Any]) Any#
Create a polygon from a bounding box defined by two corner points.
- PolygonData.expand(offset: float = 0.001, tolerance: float = 1e-12, round_corners: bool = True, maximum_corner_extension: float = 0.001) bool#
Expand the polygon shape by an absolute value in all direction.
Offset can be negative for negative expansion.
- Parameters:
- offset
float,optional Offset value in meters.
- tolerance
float,optional Tolerance in meters.
- round_cornersbool,
optional Whether to round corners or not. If True, use rounded corners in the expansion otherwise use straight edges (can be degenerate).
- maximum_corner_extension
float,optional The maximum corner extension (when round corners are not used) at which point the corner is clipped.
- offset
- PolygonData.create_from_arcs(arcs: list[Any], flag: bool) PolygonData#
Edb Dotnet Api Database Edb.Geometry.CreateFromArcs.
- PolygonData.is_inside(x: str | float | list[Any], y: str | float | None = None) bool#
Determines whether a point is inside the polygon.
- PolygonData.point_in_polygon(x: str | float | list[Any], y: str | float | None = None) bool#
Determines whether a point is inside the polygon.
- ..deprecated:: 0.48.0
Use: func:is_inside instead.
- PolygonData.get_point(index: int) pyedb.dotnet.database.geometry.point_data.PointData#
Gets the point at the index as a PointData object.
- PolygonData.set_point(index: int, point_data: pyedb.dotnet.database.geometry.point_data.PointData) None#
Sets the point at the index from a PointData object.