From 2fd84ee5ec18f586e0566f36abb4058217d8f8ad Mon Sep 17 00:00:00 2001 From: Lukas Chrostowski Date: Thu, 8 Jul 2021 00:25:01 -0700 Subject: [PATCH] fix Waveguide* problem #150 - sometimes Waveguides don't show up, and there is a "*" in the cell name. In this case it was when a string was a parameter when expecting a float. --- klayout_dot_config/python/SiEPIC/utils/__init__.py | 1 + klayout_dot_config/python/SiEPIC/utils/layout.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/klayout_dot_config/python/SiEPIC/utils/__init__.py b/klayout_dot_config/python/SiEPIC/utils/__init__.py index 59f7d4a3..365ab71e 100644 --- a/klayout_dot_config/python/SiEPIC/utils/__init__.py +++ b/klayout_dot_config/python/SiEPIC/utils/__init__.py @@ -867,6 +867,7 @@ def arc_bezier(radius, start, stop, bezier, DevRec=None): from math import sin, cos, pi from SiEPIC.utils import points_per_circle N = points_per_circle(radius/1000)/4 + bezier=float(bezier) # in case the input was a string if DevRec: N = int(N / 3) else: diff --git a/klayout_dot_config/python/SiEPIC/utils/layout.py b/klayout_dot_config/python/SiEPIC/utils/layout.py index 2a20fde5..94b0e6ba 100644 --- a/klayout_dot_config/python/SiEPIC/utils/layout.py +++ b/klayout_dot_config/python/SiEPIC/utils/layout.py @@ -77,7 +77,7 @@ def layout_waveguide2(TECHNOLOGY, layout, cell, layers, widths, offsets, pts, ra # waveguide bends: if abs(turn)==1: if(adiab): - wg_pts += Path(arc_bezier(pt_radius, 270, 270 + inner_angle_b_vectors(pts[i-1]-pts[i], pts[i+1]-pts[i]), bezier, DevRec='DevRec' in layers[lr]), 0).transformed(Trans(angle, turn < 0, pts[i])).get_points() + wg_pts += Path(arc_bezier(pt_radius, 270, 270 + inner_angle_b_vectors(pts[i-1]-pts[i], pts[i+1]-pts[i]), float(bezier), DevRec='DevRec' in layers[lr]), 0).transformed(Trans(angle, turn < 0, pts[i])).get_points() else: wg_pts += Path(arc_xy(-pt_radius, pt_radius, pt_radius, 270, 270 + inner_angle_b_vectors(pts[i-1]-pts[i], pts[i+1]-pts[i]),DevRec='DevRec' in layers[lr]), 0).transformed(Trans(angle, turn < 0, pts[i])).get_points()