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.