Using XOR to cut a hole in a square

edited February 2012 in General

I am trying to cut a circle hole in a square. However unnecessary line appears when i use XOR operation. This line connects the inner hole and a square. So my question is, how can i remove this line? Thank you in advance.

Yours sincerely,


  • edited February 2012

    Hi Darius,

    although the line appears to be unnecessary, it it is actually quite useful, because otherwise, you can't write a layout file :-)

    The problem is basically, that the major layout formats, GDS and OASIS do not support polygons with holes. Holes have to be inserted by connecting them to the outer contour with these cut lines.

    Internally, KLayout has a way to store polygons with holes, but as soon as you write the file, they will be converted and that cut line will appear again.

    I know this is annoying because it leads to grid snap problems for example, but there is no way to avoid that. If you want to have the cut line to appear in the center to preserve a mirror symmetry for example, I'd propose to produce half the structure, duplicate and mirror it and align both halves so they form the full square with the circle hole.

    Best regards,


Sign In or Register to comment.