Skip to content

Extract polygon points from a polygon #211

@Ikechi12

Description

@Ikechi12

I simulated a directional coupler in Lumerical and exported it as a GDS file from Lumerical. I figured that it's easier to export it than to design the bends in Phidl.
I want to extract this device structure from the GDS into phidl and then extract the polygons so that I can do the following:

  1. Vary the coupling length for fabrication variance testing.
  2. Add ports to the DC outputs and inputs so that I can connect the DC to other devices in my design.

To extract the polygons, I am thinking of extracting the points from the polygons and extruding them, but I have been unsuccessful. Is there a way to do this or a better way? Here is my script.

`

import phidl.geometry as pg
from phidl import quickplot as qp
from phidl import Device

D = Device('MyGDSImport')

A = pg.import_gds(filename = 'Rui_DC.gds', cellname = 'TOP' , flatten = True)
qp(A) # quickplot the geometry
z = pg.extract(A, layers = [0,1])
D.add_ref(z)
qp(z) #This gives a blank plot, so I can't manipulate the geometries like I would like

`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions