-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kfactory snapping issues #17
Comments
@joamatab , i think your source code for the sample is mismatched with the sample shown in the image |
Hm, yes this can cause issues. Can you check whether port and box of the waveguide and the port have the gap? I assume that's the prblem here. You can dynamically toggle ports (created with kfactory) of the current top cell with this small klayout package here: Alsp, stop using nm :D . You have |
yes, see the code here
|
I recall we had a similar issue in kfactoiry and gdsafctiry before, disccussed here: snapping · Issue #150 · gdsfactory/kfactory (github.com)<gdsfactory/kfactory#150>.
[https://opengraph.githubassets.com/203bf5177669561431eb933ee2d9163df316fe81afd806eaff064cdb7166e12d/gdsfactory/kfactory/issues/150]<https://github.com/gdsfactory/kfactory/issues/150>
snapping · Issue #150 · gdsfactory/kfactory<gdsfactory/kfactory#150>
Im trying to see if we can solve some of the issues here in kfactory gdsfactory/gdsfactory#1722 import kfactory as kf import numpy as np import kgeneric as kg import kgeneric.cells as kc @kf.cell(c...
github.com
Kf is still prone to snappong errors for non-manhattan connections, so ig the simole thing would just be to compute Paths and then extrude them.
…________________________________
From: Joaquin Matres ***@***.***>
Sent: Wednesday, August 16, 2023 1:52 AM
To: gdsfactory/kgeneric ***@***.***>
Cc: Skandan Chandrasekar ***@***.***>; Mention ***@***.***>
Subject: Re: [gdsfactory/kgeneric] kfactory snapping issues (Issue #17)
yes,
see the code here
import kfactory as kf
from kgeneric import gpdk as pdk
if __name__ == "__main__":
c = kf.KCell("bend_chain")
b1 = c << pdk.bend_euler_sc(angle=37)
b2 = c << pdk.bend_euler_sc(angle=37)
b2.connect("o1", b1.ports["o2"])
# b1.flatten()
# b2.flatten()
c.flatten()
c.show()
—
Reply to this email directly, view it on GitHub<#17 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AX72Z2556QRUYLC7YJ7XRWTXVRN2BANCNFSM6AAAAAA3R6ZOVY>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Yes, if you use non-manhattan devices, well, you can connect them, but you'll have to do flattening & fixing & smoothing anyway. Because there are two problems: a) I cannot guarantee you that the origin of your second cell will land on a grid point (which it must) and b) I cannot guarantee that your port of the 37° side is truly on the intersection of the two points from the sides of the waveguide (it most certainly isn't). There are tricks I could play to solve this with a dofferent transformation, but it could have (severe) drawbacks:
|
The solution I would propose is exactly what Skandan said. If you want non-manhattan devices, use a path instead of devices, it will be the path of least resistance ;). Or with the new pdk implementation, you could make a euler bend on e.g a 0.1nm grid, connect and flatten there, snap to a 1nm grid and hope you fixed it ;). |
Sounds great!
I'm curious how 1. would work, how would using polygons before they're in the cells work?
…________________________________
From: sebastian-goeldi ***@***.***>
Sent: Wednesday, August 16, 2023 2:14 AM
To: gdsfactory/kgeneric ***@***.***>
Cc: Skandan Chandrasekar ***@***.***>; Mention ***@***.***>
Subject: Re: [gdsfactory/kgeneric] kfactory snapping issues (Issue #17)
The solution I would propose is exactly what Skandan said. If you want non-manhattan devices, use a path instead of devices, it will be the path of least resistance ;).
—
Reply to this email directly, view it on GitHub<#17 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AX72Z23NPKZCCRDVEEQNPNLXVRQN3ANCNFSM6AAAAAA3R6ZOVY>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
If you have the extruded Eulerpath, it's a But, for eulerbends this would be quite backwards, because at that point you have information about the backbone, which allows you to just use that for extruding a new bend with no snapping involved anywhere. |
it often gets talked about as a weakness that gdstk uses floating point numbers for polygon points, but here I think it is a strength... floating point precision will be kept until GDS export, which allows something like the https://gdsfactory.github.io/gdsfactory/notebooks/04_routing_non_manhattan.html |
This creates 1nm issues
@sebastian-goeldi
@tvt173
@SkandanC
The text was updated successfully, but these errors were encountered: