Converting from DXF saved from AutoCAD to GDSII often produces unintended results/defects in the design. It is highly recommended to create your GDSII pattern using a native GDSII editor such as KLayout, or a script-based approach (Raith_GDSII, python-gdsii), rather than creating the design in AutoCAD and converting to GDSII. Please see this page on GDSII design software options.
- Make design as normal in AutoCAD; use mm for units.
- Make all features into polylines → select all elements → MPEDIT → Join.
- Select each element and use HATCH function → polygons should now appear shaded.
- Export the file as DXF.
- Open DXF file in KLayout.
- N.B. Before opening the file, check File > Reader Options, under the DXF tab and ensure that Database unit is 0.001 µm and DXF file unit is 1000 µm (assuming mm mode was used in AutoCAD).
- Ensure that all elements to be patterned are (shaded) polygons, and verify that the scaling is correct (GDSII assumes units of µm, not mm).
- Save as GDSII.
- Hatching large areas in AutoCAD can create issues in the conversion process
- Segmenting areas and hatching them separately can help prevent this from happening
- Particularly helpful with many small pillars or objects inside a larger area
- Discs in the DXF file may be rendered as path elements consisting of a single point, with path width equal to the disc diameter, and with rounded extension type (end caps). Although this single-point path is rendered correctly by KLayout, it is not supported by Heidelberg lithography tools (e.g., MLA150 or DWL200 for photomask fabrication), instead raising an error that a path must have at least two points. To rectify this, select "Eliminate zero-length paths (convert to BOUNDARY)" in the GDSII Writer Options section when saving as GDSII in KLayout: