PolygonData#
- class pyedb.dotnet.database.geometry.polygon_data.PolygonData(pedb, edb_object=None, create_from_points=None, create_from_circle=None, create_from_rectangle=None, create_from_bounding_box=None, **kwargs)#
Polygon Data.
Overview#
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 the area of the polygon. |
Import detail#
from pyedb.dotnet.database.geometry.polygon_data import PolygonData
Property detail#
- property PolygonData.bounding_box#
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#
Get the Primitive Arc Data.
- property PolygonData.points_without_arcs#
- property PolygonData.area#
Get the area of the polygon.
Method detail#
- PolygonData.create_from_points(points, closed=True)#
- PolygonData.create_from_bounding_box(points)#
- PolygonData.expand(offset=0.001, tolerance=1e-12, round_corners=True, maximum_corner_extension=0.001)#
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, flag)#
Edb Dotnet Api Database Edb.Geometry.CreateFromArcs.
- PolygonData.is_inside(x: str | float, y: str | float = None) bool#
Determines whether a point is inside the polygon.
- PolygonData.point_in_polygon(x: str | float, y: str | float = None) bool#
Determines whether a point is inside the polygon.
- ..deprecated:: 0.48.0
Use: func:is_inside instead.
- PolygonData.get_point(index)#
Gets the point at the index as a PointData object.
- PolygonData.set_point(index, point_data)#
Sets the point at the index from a PointData object.