It looks like you're new here. If you want to get involved, click one of these buttons!
Is it possible to check if L1 with 2 polygon on L2 ?
such as "shape=mesh_line_a.pull_interacting(Layer2)" , but I want to add more condition as below figure.
DRC for at least 2 contacts/vias : https://www.klayout.de/forum/discussion/408/drc-via-spacing-within-a-array-of-vias-number-of-gate-contacts
Thanks for your code... but may I know that how to using that code?
I am a new user for Klayout and Ruby...
I got the way to running that code..
but it can't working cause that is not a array shape.(it is just some of polygon)
you can check with picture to find what the pattern do I have...
Here is an exemple of contact over Poly
# DRC scripts
# Define a new custom function that selects polygons by their number of holes:
# It will return a new layer containing those polygons with min to max holes.
# max can be nil to omit the upper limit.
def with_holes(min, max)
new_data = RBA::Region::new
self.data.each do |p|
if p.holes >= (min || 0) && (!max || p.holes <= max)
# This is a sample:
poly = input(1)
metal = input(2)
poly.and(metal).not(contact).with_holes(1,1).output("2_PL_CT", "Min. 2 Contacts on Poly is recommended")
could you please help it....
(when I run this DRC function , I get a message ..".No layout loaded. , no default layout..."
then , even I just input a layer or run another DRC code , I still get same message..
I find answer !!! Thanks very much for your help~