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.
Compute the area of the polygon.
Compute the bounding box.
PolygonData.bbox_of_polygons
(polygons)Compute the bounding box of a list of polygons.
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.
Determine whether the polygon contains any arcs.
Determine whether the polygon contains any holes.
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.
Determine whether the outer contour of the polygon is a box.
Determine whether the outer contour of the polygon is a circle.
Determine whether the polygon is a convex hull.
Determine whether the polygon is a hole.
PolygonData.is_inside
(point)Determine whether the point is inside the polygon.
Determine whether a polygon contains any parametrized points.
Mirror a polygon by x line.
PolygonData.move
(vector)Move the polygon by a vector.
Get the normalized points of the polygon.
Remove self-intersections from this polygon.
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
list
: List of segments that represent the arc data of a polygon.list
ofPolygonData
: List of holes.bool
: Flag indicating if a polygon is closed between the first and last points.PolygonSenseType
: Polygon sense type.