From 53bb742af3179edfaeee8f9fed86680345e45e66 Mon Sep 17 00:00:00 2001 From: Lukas Chrostowski Date: Wed, 3 Jul 2024 00:01:59 -0700 Subject: [PATCH] make_pin: option for layer name --- klayout_dot_config/python/SiEPIC/utils/layout.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/klayout_dot_config/python/SiEPIC/utils/layout.py b/klayout_dot_config/python/SiEPIC/utils/layout.py index 7dac07e6..00dde1d6 100644 --- a/klayout_dot_config/python/SiEPIC/utils/layout.py +++ b/klayout_dot_config/python/SiEPIC/utils/layout.py @@ -1032,17 +1032,19 @@ def make_pin(cell, name, center, w, layer, direction, debug=False): name: text label for the pin center: location, int [x,y] w: pin width - layer: layout.layer() type + layer: layout.layer() integer type, or string direction = 0: right 90: up 180: left 270: down - Units: input can be float for microns, or int for nm + Units: input can be float for microns, or int for database units (typ. nm) ''' - + if type(layer) == str: + layer = cell.layout().layer(cell.layout().TECHNOLOGY[layer]) + from SiEPIC.extend import to_itype from pya import Point, DPoint import numpy