Folded Polygons

I'm running into an issue when subtracting one layer from another, the result ends up with a polygon that represents two separate areas connected by their corners. I need to grab the smaller areas, (which are artifacts to eliminate), but the two areas are treated as one. I tried using '.raw' in the subtraction, but it still comes out as a single polygon. Any suggestions to break apart the polygons at their touching corners, or how to stop the subtraction from merging at touching corners?

Comments

  • Hello IanD,

    I did a quick test in the DRC environment, and indeed I get the same result, both when marked as clean and raw... (bug???)

    1) when doing layer operations via the menu Edit > Layer > Boolean Operations make sure the "Minimum Coherence" box is checked and it should work

    2) if you would like to stick to a DRC script, you could do an additional undersize/oversize, for instance with -1dbu/+1dbu as a workaround, but this might lead to sizing side effects

    Cheers,

    Tomas

  • Thanks Tomas,
    Not sure what you mean by an additional undersize/oversize, but I'm going to try 'min_coherence = true' in my DRC script

  • Hello,

    You first size by -1 dbu which will separate the "connected" polygons, then size by +1 dbu to go back to original dimensions, now they should be still separated. be cautious for sizing effects though.

    Cheers,

    Tomas

  • edited January 25

    I tried the min_coherence = true approach. It works, but it is slightly inconvenient.

    First, it's not a DRC feature, but available as a somewhat cryptic option inside the Region class. The latter object can be accessed as the "data" member of the DRC layer.

    Second, it is short-lived, so you have to set it explicitly before the NOT operations.

    Here is an example with a two-pass NOT:

    l1 = input(1, 0)
    l2 = input(2, 0)
    l3 = input(3, 0)
    
    # plain
    (l1 - l2 - l3).output(100, 0)
    
    # with min_coherence = true
    
    # using Region#min_coherence = true
    l1.data.min_coherence = true
    l1.data -= l2.data
    
    # note that after the -=, min_coherence is reset, so 
    # we need to set it again
    l1.data.min_coherence = true
    l1.data -= l3.data
    
    l1.output(101, 0)
    

    Here is my test case:

    and while the layer 100 result is merged, the layer 101 result is not:

    Matthias

  • Thanks, yeah, end up using size -1,+1. Did the trick.

Sign In or Register to comment.