Skip to content

Commit

Permalink
fix Waveguide* problem #150
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
lukasc-ubc committed Jul 8, 2021
1 parent 63d9a09 commit 2fd84ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions klayout_dot_config/python/SiEPIC/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion klayout_dot_config/python/SiEPIC/utils/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 2fd84ee

Please sign in to comment.