Convert GDSII file to TXT file as polygons

edited October 2012 in General
I have some GDSII file, I know I can convert them to txt file by selecting "file => save as", but it's described in Rectangles, I want to enquire how to convert the files to txt files described in polygons.

I have tried to use "selection => merge shapes", but the message is "primary selection does not contain polygons".

Thanks very much.

Comments

  • edited November -1

    Hallo,

    I assume that you have a layout where you have some region fractured into a set of boxes but you want to have coherent polygons, not partial boxes.

    The description is somewhat misleading since technically the rectangles in the GDS file are polygons already - but just special ones with only four vertexes.

    You are right that "merge shapes" joins polygons into larger ones. To use this function you first have to select all parts you want to merge. If you use that function on shapes across a hierarchy of cells, this may have undesired effects.

    A better solution is probably to merge a whole layer using Edit/Layer/Merge. You can specify the input and output layer to be the same. This will replace the original shapes by a layer consisting of merged polygons.

    Please note that merging may render huge polygons. There are some limits for the maximum number of polygon vertexes in GDS. This also applies to the text format, since it is basically just a mapping of the GDS structure to a text file. You can specify the maximum number of vertexes in the save options. If a polygon exceeds this number, KLayout will cut the polygon again into parts.

    Regards,

    Matthias

  • edited November -1
    Dear Matthias,

    Thanks a lot for your great help!
Sign In or Register to comment.