sized or extended_out in 1 direction

edited November 24 in Verification

Hi,

How to size a layer but only in 1 direction : top or right or bottom or left ?
I guess I have to use the extended_out method because .sized() will extend in both direction top and bottom or left and right.
Maybe extent.refs is a better method ?
Any proposal ?

Thank you, BRgds,
Laurent

Comments

  • My proposal was size and move by half the size amount. At least that is how I would implement it internally :)

    So like:

    # bottom and left sized by 1µm:
    sized_bottom_left = original.sized(0.5.um).moved(0.5.um, -0.5.um)
    

    This simple solution suffers from non reproducing 45 degree edges:

    To mitigate this, you can split the size in two steps for x and y:

    # bottom and left sized by 1µm:
    sized_bottom_left = original.sized(0.5.um, 0).sized(0, 0.5.um).moved(0.5.um, -0.5.um)
    

    I'd be careful in general - this will break isotropy and if you intend to do that hierarchically, variant generation will happen.

    Matthias

  • edited November 26

    Thank you Matthias, furthermore I needed to mixed moved and sized functions, it perfectly meets my need, except ... that I cannot resize the result. As in your exemple :

    sized_bottom_left = original.sized(0.5.um, 0).sized(0, 0.5.um).moved(0.5.um, -0.5.um)
    sized_sized_bottom_left = sized_bottom_left.sized(1.0)
    

    the second line will return an error :'( :

    'sized': Internal error: ../../../src/db/db/dbShape.h:1239 m_type == PolygonRef was not true in Region::sized in Executable::execute
    

    I use the very latest version 0.28 of yesterday under Windows-10.
    Laurent

Sign In or Register to comment.