rotate#

EdbPolygon.rotate(angle, center=None)[source]#

Rotate polygon around a center point by an angle.

Parameters:
anglefloat

Value of the rotation angle in degree.

centerList of float or str [x,y], optional

If None rotation is done from polygon center.

Returns:
bool

True when successful, False when failed.

Examples

>>> edbapp = ansys.aedt.core.Edb("myproject.aedb")
>>> top_layer_polygon = [poly for poly in edbapp.modeler.polygons if poly.layer_name == "Top Layer"]
>>> for polygon in top_layer_polygon:
>>>     polygon.rotate(angle=45)