How to find accidentally repeated same object

Recently I found out that my layout had some figures totally overlaped with themselves since I accidentally used Ctrl+C & Ctrl+V without moving them. This operation causes failure when doing fabrication process since the instrument will exposure the pattern for several times.

Although merging all the object can resolve this problem, this iperation will chang box into polygons resulting up to two to three times exposure time during e beam lithography.

Though I can use other layout tools to solve the problems, I rather use klayout instead exporting the files to one another. For example,
1. Using the"nibbling" in tanner tools l editor. This can keep only one same object.
2. Layout editor can convert polygons to box. However, I cannot save as a gds file since it is a free version:(

Is there anyway that I can solve this problem using klayout?

Wang Chien


  • You can use the following from this thread it has a Python/Ruby scripts.
    This does merge , but you can modify the script to find coincident shapes if needed

  • @tagger5896 Thanks for this link!

    You can try to flatten and save to OASIS. This should remove all redundant shapes.

    BTW: you can do decomposition into "trapezoids" (boxes for Manhattan geometry) with this small DRC script:

    # read layer from 1/0
    layer = input(1, 0)
    # does the conversion to trapezoids =
    # write layer to 100/0
    layer.output(100, 0)

    here is a sample:




Sign In or Register to comment.