EdbPolygon#

class pyedb.dotnet.database.edb_data.primitives_data.EdbPolygon(raw_primitive, core_app)#

Bases: pyedb.dotnet.database.cell.primitive.primitive.Primitive

Manages EDB functionalities for a primitives. It inherits EDB Object properties.

Examples

>>> from pyedb import Edb
>>> edb = Edb(myedb, edbversion="2021.2")
>>> edb_prim = edb.modeler.primitives[0]
>>> edb_prim.is_void  # Class Property
>>> edb_prim.IsVoid()  # EDB Object Property

Overview#

clone

Clone a primitive object with keeping same definition and location.

fix_self_intersections

Remove self intersections if they exists.

duplicate_across_layers

Duplicate across layer a primitive object.

move

Move polygon along a vector.

rotate

Rotate polygon around a center point by an angle.

move_layer

Move polygon to given layer.

in_polygon

Check if padstack Instance is in given polygon data.

expand

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

has_self_intersections

Check if Polygon has self intersections.

polygon_data

pyedb.dotnet.database.dotnet.database.PolygonDataDotNet: Outer contour of the Polygon object.

Import detail#

from pyedb.dotnet.database.edb_data.primitives_data import EdbPolygon

Property detail#

property EdbPolygon.has_self_intersections#

Check if Polygon has self intersections.

Returns:
bool
property EdbPolygon.polygon_data#

pyedb.dotnet.database.dotnet.database.PolygonDataDotNet: Outer contour of the Polygon object.

Method detail#

EdbPolygon.clone()#

Clone a primitive object with keeping same definition and location.

Returns:
bool

True when successful, False when failed.

EdbPolygon.fix_self_intersections()#

Remove self intersections if they exists.

Returns:
list

All new polygons created from the removal operation.

EdbPolygon.duplicate_across_layers(layers)#

Duplicate across layer a primitive object.

Parameters:

layers: list

list of str, with layer names

Returns:
bool

True when successful, False when failed.

EdbPolygon.move(vector)#

Move polygon along a vector.

Parameters:
vectorList of float or str [x,y].
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.move(vector=["2mm", "100um"])
EdbPolygon.rotate(angle, center=None)#

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)
EdbPolygon.move_layer(layer)#

Move polygon to given layer.

Parameters:
layerstr

layer name.

Returns:
bool

True when successful, False when failed.

EdbPolygon.in_polygon(point_data, include_partial=True)#

Check if padstack Instance is in given polygon data.

Parameters:
point_dataPointData Object or list of float
include_partialbool, optional

Whether to include partial intersecting instances. The default is True.

Returns:
bool

True when successful, False when failed.

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