Imported DXF from AutoCAD: Separate Shapes Merge Unintentionally in KLayout


Hello everyone,

I’m encountering an issue when importing DXF files (drawn in AutoCAD) into KLayout: originally separated shapes are being connected/merged unexpectedly after import. For example, two distinct rectangles might become a single polygon.

Comments

  • Hi @klxdzh,

    There is different settings available to achieve different results. In order to get support, you should supply a sample file and explain what results you intend to get.

    A very basic issue of DXF is that is does not really feature "filled" objects. Instead, DXF supplies lines in various flavors and KLayout needs to convert them into "filled polygons". There are different strategies, but the first step is always to stitch segments into continuous lines. If the lines in your drawing touch, KLayout will form larger polygons and it has some preference how to do this. I assume this is the case here.

    As there is not single solution to the problem, I think you're hitting a basic limitation of the DXF format, when it comes to translation to GDS.

    In any case, it's the polarity that matters - i.e. the part that is filled vs. the part that is not. As this is the crucial property of a photomask, the result is correct, if the polarity is. Coherence of polygons is a low priority requirement for the DXF to GDS translation.

    Matthias

  • Seems to me that a literal, polygon for polygon
    translation ought to be an option. I'd guess that
    the problem is vectors that are "loose", with no
    "bundle" to decide which merge and which do
    not in subsequent steps?

    Perhaps this is a source-DB thing (too many free,
    loose segments?) and wants some "surgical
    intervention" there, like to make repeated loose-
    vector structures into hierarchy objects?

    But then maybe it's a klayout hierarchy handling
    thing, like a "flatten 'em all" step that busts any
    incoming hierarchy before it can be used to
    determine "polygon membership"?

Sign In or Register to comment.