:class:`EdbPolygon` =================== .. py:class:: pyedb.dotnet.database.edb_data.primitives_data.EdbPolygon(raw_primitive, core_app) Bases: :py:obj:`pyedb.dotnet.database.cell.primitive.primitive.Primitive` Manages EDB functionalities for a primitives. It inherits EDB Object properties. .. rubric:: 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 .. !! processed by numpydoc !! .. py:currentmodule:: EdbPolygon Overview -------- .. tab-set:: .. tab-item:: Methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~clone` - Clone a primitive object with keeping same definition and location. * - :py:attr:`~fix_self_intersections` - Remove self intersections if they exists. * - :py:attr:`~duplicate_across_layers` - Duplicate across layer a primitive object. * - :py:attr:`~move` - Move polygon along a vector. * - :py:attr:`~rotate` - Rotate polygon around a center point by an angle. * - :py:attr:`~move_layer` - Move polygon to given layer. * - :py:attr:`~in_polygon` - Check if padstack Instance is in given polygon data. * - :py:attr:`~expand` - Expand the polygon shape by an absolute value in all direction. .. tab-item:: Properties .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~has_self_intersections` - Check if Polygon has self intersections. * - :py:attr:`~polygon_data` - :class:`pyedb.dotnet.database.dotnet.database.PolygonDataDotNet`: Outer contour of the Polygon object. Import detail ------------- .. code-block:: python from pyedb.dotnet.database.edb_data.primitives_data import EdbPolygon Property detail --------------- .. py:property:: has_self_intersections Check if Polygon has self intersections. :Returns: :ref:`bool ` .. .. !! processed by numpydoc !! .. py:property:: polygon_data :class:`pyedb.dotnet.database.dotnet.database.PolygonDataDotNet`: Outer contour of the Polygon object. .. !! processed by numpydoc !! Method detail ------------- .. py:method:: clone() Clone a primitive object with keeping same definition and location. :Returns: :ref:`bool ` ``True`` when successful, ``False`` when failed. .. !! processed by numpydoc !! .. py:method:: fix_self_intersections() Remove self intersections if they exists. :Returns: :class:`python:list` All new polygons created from the removal operation. .. !! processed by numpydoc !! .. py:method:: duplicate_across_layers(layers) Duplicate across layer a primitive object. Parameters: layers: list list of str, with layer names :Returns: :ref:`bool ` ``True`` when successful, ``False`` when failed. .. !! processed by numpydoc !! .. py:method:: move(vector) Move polygon along a vector. :Parameters: **vector** : :obj:`List` :obj:`of` :class:`python:float` or :class:`python:str` [x,y]. .. :Returns: :ref:`bool ` ``True`` when successful, ``False`` when failed. .. rubric:: 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"]) .. !! processed by numpydoc !! .. py:method:: rotate(angle, center=None) Rotate polygon around a center point by an angle. :Parameters: **angle** : :class:`python:float` Value of the rotation angle in degree. **center** : :obj:`List` :obj:`of` :class:`python:float` or :class:`python:str` [x,y], :obj:`optional` If None rotation is done from polygon center. :Returns: :ref:`bool ` ``True`` when successful, ``False`` when failed. .. rubric:: 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) .. !! processed by numpydoc !! .. py:method:: move_layer(layer) Move polygon to given layer. :Parameters: **layer** : :class:`python:str` layer name. :Returns: :ref:`bool ` ``True`` when successful, ``False`` when failed. .. !! processed by numpydoc !! .. py:method:: in_polygon(point_data, include_partial=True) Check if padstack Instance is in given polygon data. :Parameters: **point_data** : :obj:`PointData` :obj:`Object` or :class:`python:list` :obj:`of` :class:`python:float` .. **include_partial** : :ref:`bool `, :obj:`optional` Whether to include partial intersecting instances. The default is ``True``. :Returns: :ref:`bool ` ``True`` when successful, ``False`` when failed. .. !! processed by numpydoc !! .. py:method:: 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: **offset** : :class:`python:float`, :obj:`optional` Offset value in meters. **tolerance** : :class:`python:float`, :obj:`optional` Tolerance in meters. **round_corners** : :ref:`bool `, :obj:`optional` Whether to round corners or not. If True, use rounded corners in the expansion otherwise use straight edges (can be degenerate). **maximum_corner_extension** : :class:`python:float`, :obj:`optional` The maximum corner extension (when round corners are not used) at which point the corner is clipped. .. !! processed by numpydoc !!