It looks like you're new here. If you want to get involved, click one of these buttons!
I'm attempting to create a DRC that calculates the area of all the polygons on a layer, and compares the largest area to the smallest area. Anyone know what functions or methods would work best for this?
there is no built-in function to get the min area, but you can script it:
layer = input(43, 0)
# compute min area
min_area = nil
layer.data.each_merged do |poly|
area_in_dbu = poly.area * dbu * dbu
min_area = [ min_area, area_in_dbu ].min
min_area = area_in_dbu
layer.with_area(min_area * 3, nil).output("Everything with more than 3x the min area")
However, this will be fairly slow.
That worked perfectly thank you!