You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered an issue while drawing my own racetrack resonator using the FlexPath method (I'm aware of the gdstk.racetrack implementation, but please bear with me as this issue is quite peculiar).
Here's what I did: I used FlexPath to draw a closed loop and utilized the bend_radius parameter to generate the arc. It looks good when drawing a single resonator, but when I draw multiple resonators in an array, problems arise.
Here is what I got:
The upper bend of the racetrack didn't generate properly in the 2nd row. If you change the step of j, the issue appears in different rows. I believe the problem lies in how I've defined the racetrack. Here is a drawing to illustrate my definition of racetrack points:
Due to the two continuous bends in my definition, when the y-values of the point set for the racetrack reach certain values, some floating-point number exceptions occur.
I understand that this isn't the optimal way to draw a racetrack, but I believe it highlights a potential area for improving the robustness of FlexPath.
Thank you
The text was updated successfully, but these errors were encountered:
Yes, this is a fundamental limit of floating point math. Unfortunately I cannot take the time to rewrite the whole library to use integer coordinates. On the other hand it should be very easy to change your racetrack functions to use 90° and 180° arcs. I can't see a way around it using the built-in points argument.
Hi,
I encountered an issue while drawing my own racetrack resonator using the FlexPath method (I'm aware of the
gdstk.racetrack
implementation, but please bear with me as this issue is quite peculiar).Here's what I did: I used FlexPath to draw a closed loop and utilized the
bend_radius
parameter to generate the arc. It looks good when drawing a single resonator, but when I draw multiple resonators in an array, problems arise.Here is my code:
Here is what I got:
The upper bend of the racetrack didn't generate properly in the 2nd row. If you change the step of
j
, the issue appears in different rows. I believe the problem lies in how I've defined the racetrack. Here is a drawing to illustrate my definition of racetrack points:Due to the two continuous bends in my definition, when the y-values of the point set for the racetrack reach certain values, some floating-point number exceptions occur.
I understand that this isn't the optimal way to draw a racetrack, but I believe it highlights a potential area for improving the robustness of FlexPath.
Thank you
The text was updated successfully, but these errors were encountered: