KLayout, Autocad and stipple

ataata
edited June 2014 in General
Hi,
I have a curious problem regarding the stipple in KLayout. I usually draw my drawings using Autocad 2013 and verify them using KLayout, since Autocad doesn't have a practical way of showing closed regions. For this I save my drawing as a .dxf so that KLayout can open it.

As long as my drawing contains only closed polylines, lines and text, everything is fine (http://i.imgur.com/fAjcA8N.png). But as soon as I add dimension markers, KLayout fails to show the stipple in closed regions even though no other changes are made to the drawing: http://i.imgur.com/3iaI6uh.png . A simple workaround is not to add dimension markers, or to delete and purge them before inspecting the drawing with KLayout, but they would be extremely helpful.

Is there any trick to solve this, or is this some fundamental problem with Klayout and Autocad having different interpretation of the DXF format?

Comments

  • edited November -1

    Hi ata,

    I think that is either a bug. Given the bad documentation quality of DXF my interpretation may also be incorrect.

    Are you able to send a simple testcase (with and without dimension marker) to the mail address mentioned on the Contact page or publish one somewhere else? I will look at this issue then.

    Thanks,

    Matthias

  • ataata
    edited November -1
    Hi,
    thank you for answering. Here are links to both kinds of files:
    https://dl.dropboxusercontent.com/u/30337328/dxf/without_dimension_marker.dxf
    https://dl.dropboxusercontent.com/u/30337328/dxf/with_dimension_marker.dxf

    -ata
  • edited June 2014

    Hi ata,

    thanks for the testcases. With them it was easy to debug the issue.

    What basically happens is the following: a basic shortcoming of DXF is the lack of filled objects, apart from HATCH and SOLID. Beside those two there are different methods to represent filled areas, specifically closed polylines and collections of polylines which, when connected, form closed areas. But originally their intent is to represent lines, not filled objects.

    KLayout tries to convert thin (width == 0) lines into filled polygons but not at any price: since it may be desired to represent thin lines intentionally, KLayout tries to guess the layout intent - if there at least one single, thin line, it will keep all thin lines as paths and not convert them to polygons. This is what happens here: the dimension line makes KLayout regard the layout intent as "thin lines" and not produce filled polygons.

    Fortunately there is a way to enforce a certain interpretation: in "File/Reader Options" you will find the "LINE/POLYLINE" handling mode on the "DXF" tab. If you set the mode to "create polygons from closed polylines with width = 0", KLayout will always produce filled polygons.

    Best regards,

    Matthias

  • ataata
    edited November -1
    Thank you so much, I tested this and it seems to work. I wouldn't have believed there was such a simple solution. :)

    -ata
Sign In or Register to comment.