Porting from Ipkiss 3.7 to Ipkiss 3.7.1

Porting i3.Structure

In IPKISS 2.4 a fixed/parametric cell was defined by either using the Structure directly or by subclassing from it. This class is removed from the IPKISS 2.4 compatibility layer, where it was kept to simplify transitioning to IPKISS 3.

If Structure was used to (quickly) instantiate fixed cells, the following code:

rect_1 = i3.Rectangle(layer=i3.TECH.PPLAYER.WG.CORE, center=(0.0, 0.0), box_size=(self.width, 1.0))
rect_2 = i3.Rectangle(layer=i3.TECH.PPLAYER.WG.CLADDING, center=(0.0, 0.0), box_size=(self.width * 0.9, 2.0))
i3.Structure(name="MyStructure", elements=[rect_1, rect2])

is equivalent to:

rect_1 = i3.Rectangle(layer=i3.TECH.PPLAYER.WG.CORE, center=(0.0, 0.0), box_size=(self.width, 1.0))
rect_2 = i3.Rectangle(layer=i3.TECH.PPLAYER.WG.CLADDING, center=(0.0, 0.0), box_size=(self.width * 0.9, 2.0))
i3.LayoutCell(name="MyStructure").Layout(elements=[rect_1, rect2])

where the i3.LayoutCell is a design cell with an empty i3.LayoutView. If your code contains classes that inherit from Structure check out the porting guide for more detailed instructions on how to port your code. Briefly:

class MyStructure(i3.Structure):
    width = i3.PositiveNumberProperty(default=1.0, doc="Width of the component")

    def define_elements(self, elems):
        elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.CORE, center=(0.0, 0.0), box_size=(self.width, 1.0))
        elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.CLADDING, center=(0.0, 0.0), box_size=(self.width * 0.9, 2.0))
        return elems


structure = MyStructure()

can be ported to:

class MyStructure(i3.PCell):

    class Layout(i3.LayoutView):
        width = i3.PositiveNumberProperty(default=1.0, doc="Width of the component")

        def _generate_elements(self, elems):
            elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.CORE, center=(0.0, 0.0), box_size=(self.width, 1.0))
            elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.CLADDING, center=(0.0, 0.0), box_size=(self.width * 0.9, 2.0))
            return elems


structure = MyStructure().Layout()

Note that the define_xxx methods should be converted to _generate_xxx methods and moved under the i3.LayoutView.

InOpticalPort, OutOpticalPort removed

Ipkiss 2.4 InOpticalPort` and OutOpticalPort classes have been removed since optical ports are usually bidirectional. If you do need a port with a direction, use the direction property instead:

in_port = i3.OpticalPort(name="in", direction=i3.PORT_DIRECTION.IN)
out_port = i3.OpticalPort(name="out", direction=i3.PORT_DIRECTION.OUT)

Optical and electrical plugins`

The ipkiss 2.4 plugins for optical and electrical ports and connections have been removed: the ipkiss.plugins.photonics and ipkiss.plugins.electronics packages are not available anymore. Their functionality has been available from ipkiss3 since ipkiss 3.0, such as i3.OpticalPort, i3.RouteToLine, i3.ElectricalPort and so forth. The ipkiss 2.4 waveguide definitions and windows are excluded and are not available anymore (see below).

Electrical port list

in_electrical_ports and out_electrical_ports properties of i3.LayoutView, i3.SRef, i3.ARef, i3.MRef and i3.Group have been replaced with electrical_in_ports and electrical_out_ports, respectively. This to be in line with their optical counterparts.

Window waveguide definitions and windows

Ipkiss 2.4 waveguide classes like WindowWaveguideDefinition and WgElDefinition were removed, since they have been superseded since ipkiss3 by new waveguide templates. The window type PathWindow has since long been renamed to PathTraceWindow and is not available under the old name anymore.

For porting, see Waveguide Definition (2.4) → Waveguide Template (3.0).