PolygonData#

class ansys.edb.core.geometry.polygon_data.PolygonData(points=None, arcs=None, lower_left=None, upper_right=None, holes=None, sense=PolygonSenseType.SENSE_CCW, closed=True)#

Represents a polygon data object.

Methods

PolygonData.alpha_shape(points, alpha)

Compute the outline of a 2D point cloud using alpha shapes.

PolygonData.area()

Compute the area of the polygon.

PolygonData.bbox()

Compute the bounding box.

PolygonData.bbox_of_polygons(polygons)

Compute the bounding box of a list of polygons.

PolygonData.bounding_circle()

Compute the bounding circle of the polygon.

PolygonData.circle_intersect(center, radius)

Determine whether the circle intersects with a polygon.

PolygonData.closest_point(point)

Compute a point on the polygon that is closest to another point.

PolygonData.closest_points(polygon)

Compute points on this and another polygon that are closest to the other polygon.

PolygonData.convex_hull(polygons)

Compute the convex hull of the union of a list of polygons.

PolygonData.defeature([tol])

Defeature a polygon.

PolygonData.expand(offset, round_corner, ...)

Expand the polygon by an offset.

PolygonData.has_arcs()

Determine whether the polygon contains any arcs.

PolygonData.has_holes()

Determine whether the polygon contains any holes.

PolygonData.has_self_intersections([tol])

Determine whether the polygon contains any self-intersections.

PolygonData.intersect(polygons1, polygons2)

Compute the intersection of one or more lists of polygons.

PolygonData.intersection_type(other[, tol])

Get the intersection type with another polygon.

PolygonData.is_box()

Determine whether the outer contour of the polygon is a box.

PolygonData.is_circle()

Determine whether the outer contour of the polygon is a circle.

PolygonData.is_convex()

Determine whether the polygon is a convex hull.

PolygonData.is_hole()

Determine whether the polygon is a hole.

PolygonData.is_inside(point)

Determine whether the point is inside the polygon.

PolygonData.is_parametric()

Determine whether a polygon contains any parametrized points.

PolygonData.mirror_x(x)

Mirror a polygon by x line.

PolygonData.move(vector)

Move the polygon by a vector.

PolygonData.normalized()

Get the normalized points of the polygon.

PolygonData.remove_self_intersections([tol])

Create a polygon with all self-intersections removed.

PolygonData.rotate(angle, center)

Rotate the polygon at a center by an angle.

PolygonData.scale(factor, center)

Scale the polygon by a linear factor from a center.

PolygonData.subtract(polygons1, polygons2)

Subtract a set of polygons from another set of polygons.

PolygonData.unite(polygons)

Compute the union of a list of polygons.

PolygonData.without_arcs([max_chord_error, ...])

Get polygon data with all arcs removed.

PolygonData.xor(polygons1, polygons2)

Compute an exclusive OR between a set of polygons and another set of polygons.

Attributes

PolygonData.arc_data

list: List of segments that represent the arc data of a polygon.

PolygonData.holes

list of PolygonData: List of holes.

PolygonData.is_closed

bool: Flag indicating if a polygon is closed between the first and last points.

PolygonData.points

list of PointData: List of coordinates for the points.

PolygonData.sense

PolygonSenseType: Polygon sense type.