I've attempted the DRC approach (apologies if I should start another thread for this), but there doesn't appear to be a way to specify the source layout in the DRC script language. What I would like is something like input(1,0,1) to select 1/0@1, bu…
Thank you both for the feedback, that makes a lot of sense - I believe a DRC script is probably the best approach - since I eventually want to do an XOR check between the data sent to the mask manufacturer and the data received it is probably the be…
Your "polygon1" is not a Polygon type, it is an array of 'DPoints'. You must call the constructor for the Polygon, which takes an array of points. Something like the below (untested!) should work:
polygon1 = Polygon([DPoint(length, -w4)…
Actually, I just noticed that the Polygon class has a "size" function, so it is as simple as
for i in range(len(x)): pts.append(Point.from_dpoint(DPoint(x[i], y[i]))) # t = Trans(Trans.R0, x, 0) # polygon = Polygon(pts,t) polygon…
You can cast the polygon into a Region using the constructor for Region which takes a polygon https://www.klayout.de/doc/code/class_Region.html
This would be something like sized_region = Region(polygon). You can then call the "size" func…