How to fill the entity of polygon hull

edited April 25 in General

Hello Matthias,

Importing DXF file into Klayout, sometimes the polygons seems no entity, just the hull are presented.

even if I try to collect all the points of the hull into an Array, and insert to cell again, the result is out of

my expection and keep no change. I guess it should be the polygon format's problem in original file,

but I am wondering if I can fill the entity of the hulls through some trick ? :*

This is my face now

Good day


  • edited April 25

    Updated, I found if I saved as new DXF file again by using " Visible layers only " function with just one layer, then it can be filled, but if there was more than 2 layers showed on window, the empty one still stood.

    There should be some magic I just don't know, right? If I want all layers all polygon to be filled , if many.


  • edited April 25

    Hi Vincent,

    DXF does not really support filled polygons (except through hatches). All that KLayout does is trying to stitch the lines. There are different strategies you can find on the "DXF" page in the "File/Reader Options" dialog in the "LINE/POLYLINE" setting.

    Auto is a heuristics that tries to choose the strategy based on what it finds. In the case of saving and loading it succeeds with one layer, but fails to find a consistent strategy with two layers.

    I can load your test case with filled polygons using the "Merge lines" option. I suggest this one:

    With this result:


    P.S. thanks for the test case. Test data makes things a big deal easier. I hope you make a different face now :)

  • Hello Matthias,

    There is always :) after reading message from you.


Sign In or Register to comment.