klayout doesn't display circles placed in a layer.

Next image is what I get opening annexed dxf file in librecad

In klayout the layer named STICHVIAS is not shown at all:


  • Here is the dxf file

  • I have just solved this problem. The new annexed dxf file is displaying properly also in klayout.

  • It might help somebody later if you described what you found.

    Like was it an import side or an export side problem? Or that
    the "circles" were actually cells and display depth too shallow?

  • Hi dick_freebird.
    The geometry was exported from FreeCAD in separate dxf files which was merged in librecad using the command "Import Block".
    The stiching vias were firstly defined in a FreeCAD sketch and then extruded (using FreeCAD pad feature) trough the PCB depth. In the first trial I selected the pads for export and the circles were not visible in klayout. In the second trial the export was done with sketch selected and this time the circles were visible in klayout. But I do not know what is the difference between the two generated dxf files.

    By the way I would say that I tried also to merge the 4 generated dxf files inside of klayout using "Import Other Layout Files" but it didn't work.

  • @wsteffe I had a look at the first DXF file. The reason the circles do not appear is a logical one.

    In order to create filled polygons from the lines, you need to pick "merge lines into polygons" mode (or "automatic" which does the same in this case).

    In this mode, the lines found in the DXF file's layers will be turned into polygons following the "even-odd" rule - i.e. single-fold coverage will render "inside", two-fold coverage "hole" (=outside), three-fold inside again etc. This way, the holes in the other layers are generated (two-fold overlay).

    However, the circles are not alone: each circle comes 6 times (the ones I checked). This is an even-fold overlay, hence the circles cancel themselves (every second one forming a hole).

    FreeCAD does not merge and separate inside from outside, but in GDS that is mandatory. Hence, FreeCAD displays the circles, KLayout cancels them.

    I assume, saving the file again removed the duplicates.


  • edited September 2023

    Hi Matthias,
    I do not consider the duplicate circles as a valid geometry so, in my opinion, it is just an export problem that occurs when the dxf file is generated from a 3D shape of a FreeCAD document.

    So the lesson lerned to me is: never export a FreeCAD 3D shape into a planar dxf file.

    In the general case it is possible to use the fature "FreeCAD/Part/Cross Section" to generate a 2D shape that can be exported in the dxf file.

    In the FreeCAD document associated with the uploaded dxf file it was even simpler because the 3D geometry was extruded from a sketch which can be directly used to export a valid dxf file.

  • @wsteffe Very good. Thanks for the feedback!


Sign In or Register to comment.