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#

create_from_points

create_from_bounding_box

expand

Expand the polygon shape by an absolute value in all direction.

create_from_arcs

Edb Dotnet Api Database Edb.Geometry.CreateFromArcs.

is_inside

Determines whether a point is inside the polygon.

point_in_polygon

Determines whether a point is inside the polygon.

get_point

Gets the point at the index as a PointData object.

set_point

Sets the point at the index from a PointData object.

bounding_box

Bounding box.

arcs

Get the Primitive Arc Data.

points

Get all points in polygon.

points_without_arcs

area

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#

Get all points in polygon.

Returns:
list[list[float]]
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:
offsetfloat, optional

Offset value in meters.

tolerancefloat, 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_extensionfloat, optional

The maximum corner extension (when round corners are not used) at which point the corner is clipped.

PolygonData.create_from_arcs(arcs, flag)#

Edb Dotnet Api Database Edb.Geometry.CreateFromArcs.

Parameters:
arcslist or Edb.Geometry.ArcData

List of ArcData.

flagbool
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.