From 28a6c368eb8cf1918d46b8e300b7106e2445a814 Mon Sep 17 00:00:00 2001 From: Lukas Chrostowski Date: Mon, 12 Feb 2024 01:13:43 -0800 Subject: [PATCH] Update ebeam_PWB_surface_taper.py fix rounding error in path, for 0.35 --- .../pymacros/pcells_EBeam_Beta/ebeam_PWB_surface_taper.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_PWB_surface_taper.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_PWB_surface_taper.py index 72e1c59c..9b6c9876 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_PWB_surface_taper.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_PWB_surface_taper.py @@ -11,6 +11,8 @@ class ebeam_PWB_surface_taper(pya.PCellDeclarationHelper): V2: Sept 8, 2020 V3: Dec 4, 2020 blin@ece.ubc.ca + + Lukas, 2024/02/12: rounding error on width conversion to integer, fixed using to_itype. """ def __init__(self): @@ -54,6 +56,7 @@ def produce(self, layout, layers, parameters, cell): # import neccessary libraries from math import pi, sin, cos, tan from SiEPIC._globals import PIN_LENGTH as pin_length + from SiEPIC.extend import to_itype import ctypes # fetch the parameters @@ -71,8 +74,8 @@ def produce(self, layout, layers, parameters, cell): Layer31SiN = ly.layer(self.ZEP_invert) Layer63N = ly.layer(self.Grouse_Si_Keepout) - w1 = self.Wtip/dbu - w2 = self.Wwaveguide/dbu + w1 = to_itype(self.Wtip, dbu) + w2 = to_itype(self.Wwaveguide, dbu) offset = self.edge_offset angle = self.OxOp_angle * (pi/180) excl = 750