I am having an issue compiling a code containing an inversed structure that I created, similar to the one in the “Inverted MMI” tutorial.
The structure is very long (about 300 um). If I place the structure alone, it looks as if its working, even though its not completely merged as pretended (lay3 is composed of several polygons instead of just one). I suspect that this may be because of a function called pols=limit_polygon_points(xy) in add_polygons. However, I am able to overcome this issue in Klayout by going to Edit>Layer>Merge. This is not an ideal solution, so I would also like to know if there is a way to overcome this issue in the code… Merging multiple times the layer using the code in the inverted MMI (see below) and then merging the lay3 in the cell doesn’t change anything from only using the first part of code.
Now the problem that I can’t really seem to solve is that when I try to use this structure multiple times (without any connections or anything, just repeating the same bb), with the inverted layout, I get the following error:
But if I run the structures alone (one by one), they work and are compiled!(even if not completely merged…). If I run the exact same circuit with structures that aren’t inverted (inverse=False) I also don’t have any problems.
My main conclusion so far is that because the structures are long, there could be a problem with dividing the polygons so that they can be compiled by Nazca, but I don’t know where to start to solve it. So far the accuracy of the layers are at the standard value and I don’t have any gaps between the different lay3 polygons that Nazca created (otherwise, the solution of merging directly in Klayout wouldn’t work). My parameter values that aren’t integers are all rounded at maximum by 4 decimal cases.
I would appreciate any input in this case, thank you very much!