SRef

class ipkiss3.all.SRef

Single reference of a LayoutView

SRef elements are used to place a single reference to a (layout view of an) other PCell on your layout. You can specify a position to tell IPKISS where on your layout the reference should be placed.

For a list of transformations that can be used with SRef / ARef, see also list of transformations.

Parameters:
reference: _LayoutView, required
position: Coord2, optional

Position of the referenced LayoutView

flatten: ( bool, bool_ or int ), optional

if True, it will insert the references elements on export, rather than the reference itself

name: ( String that contains only alphanumeric characters from the ASCII set or contains _$<>. ASCII set is extended on PY3. ), optional, *None allowed*

Unique name of the instance within the scope of the View/Cell

owner: ( _View ), optional, *None allowed*

link to the owner of the instance.In most cases this is automatically added by the _generate_instances method

transformation: GenericNoDistortTransform, optional

Examples

Example using SRef in the instances of a PCell: adding instances.

Using i3.LayoutCell:

# LayoutCell is a simple container to collect elements and instances.
import si_fab.all as pdk  # noqa: F401
from picazzo3.filters.mmi.cell import MMI1x2Tapered
import ipkiss3.all as i3

mmi = MMI1x2Tapered()
mmi_lo = mmi.Layout()

layout = i3.LayoutCell(name="mmi_sref").Layout(elements=[
    i3.SRef(
        reference=mmi_lo,
        position=(10, 30),
        transformation=i3.Rotation(rotation_center=(0.0, 0.0), rotation=90.0)
    )
])
layout.visualize(annotate=True)
../../../../_images/ipkiss3-all-SRef-1.png

Using i3.LayoutCell:

# LayoutCell is a simple container to collect elements and instances.
import si_fab.all as pdk  # noqa: F401
from picazzo3.filters.mmi.cell import MMI1x2Tapered
import ipkiss3.all as i3

mmi = MMI1x2Tapered()
mmi_lo = mmi.Layout()

layout = i3.LayoutCell(name="mmi_sref").Layout(elements=[
    i3.SRef(
        reference=mmi_lo,
        position=(10, 30),
        transformation=i3.Rotation(rotation_center=(0.0, 0.0), rotation=90.0)
    )
])
layout.visualize(annotate=True)
../../../../_images/ipkiss3-all-SRef-2.png
size_info(layers=None)

Returns the SizeInfo object corresponding to the footprint of this element.

Parameters:
layers: list, optional

The layers to be included, default is None (all layers)

Returns:
SizeInfo object
convex_hull()

returns the Shape object corresponding to the complex hull of this Element

Returns:
Shape object

See also

Shape
move(position)

Moves this element over a given vector

Parameters:
positionCoord2 or tuple

Vector (x,y) for the translation

Returns:
This Element object
flat_copy(level=-1)

Returns a flattened copy of the Element. (recursive)

Parameters:
levelHow many levels deep should the element be flattened. -1 means all levels (default)
Returns:
ElementList object
is_empty()

returns True if the content of the Element is empty