Using Search and replace tool to convert paths into polygons

Hi,

I have a layout that has a lot of paths. I want to turn them all into polygons. I tried using the custom query option in the "Search and Replace" tool using the query:

with paths on layer 1/0 from cells * do shape.path.polygon()

It doesn't throw an error at me however it also doesn't convert any of the paths. Does anyone know if this is possible to do, and if not any ideas on how I can convert all my paths into polygons?

Thank you!

Comments

  • If you put a minuscule "box" object on the same layer and
    inside the path's edge-edge extents, and select them both,
    the Merge function will combine them into a polygon.

  • Hi,

    Thanks for the help! Since I have numerous path objects in a complex cell hierarchy, I didnt want to change all of them by hand, which is what merge shape would make me do( I think). I was hoping for a scripted approach.

    I also wrote this little script however it doesn't appear to work too well:

    for inst in cell.each_shape(layer):   
        if inst.is_path():  
            inst.path.polygon();    
    
  • I found a way :) If anyone is looking for the same thing

    from SiEPIC.utils import get_layout_variables
    
    TECHNOLOGY, lv, ly, cell = get_layout_variables();
    
    for inst in cell.each_shape(layer):   
      if inst.is_path():
        a=inst.polygon;
        inst.polygon=a #polygon= is another method 
    
    
  • Yes, that's it :)

    You could even write "inst.polygon = inst.polygon" :)

    Matthias

Sign In or Register to comment.