DXF vs GDSII
DXF and GDSII are both drawing-interchange formats, but they were built for different domains: DXF is Autodesk's general-purpose CAD drawing format, and GDSII is a purpose-built format for hierarchical integrated-circuit and photomask layout. They differ in geometry model, precision, layering, and hierarchy, which is why files don't move cleanly between them without a dedicated converter.
What is DXF?
DXF (Drawing Exchange Format) is a CAD drawing-interchange format created by Autodesk for AutoCAD, first released in 1982. It's designed to carry general 2D and 3D drawing data — lines, arcs, circles, polylines, text, dimensions, blocks — between CAD packages, and is widely supported across mechanical, architectural, and general drafting tools. DXF ships in both an ASCII (plain-text) and a binary variant, and its structure is a tagged group-code stream rather than a fixed binary record layout.
DXF vs GDSII: key differences
| DXF | GDSII | |
|---|---|---|
| Origin / vendor | Autodesk, for AutoCAD (1982) | Calma Company, for GDS II layout systems (late 1970s) |
| Primary domain | General CAD drafting (mechanical, architectural, general drawing) | Integrated-circuit and photomask layout |
| Core geometry | Lines, arcs, circles, and open/closed polylines | Filled boundary polygons and paths (wires); no native arcs — curves are polygonized |
| Units and precision | Floating-point coordinates in a user-chosen drawing unit | Signed 32-bit integer coordinates in a fixed database unit (commonly 1 nm), avoiding floating-point drift |
| Layers | Named, user-defined layers (arbitrary strings), each with its own color/linetype | Numbered (layer, datatype) pairs — a fixed 16-bit layer number and a 16-bit datatype, not names |
| Hierarchy / reuse | Blocks, which can be inserted (and nested) like a lightweight instance | Structures (cells), placed via SREF (single instance) or AREF (regular array), forming a true hierarchical DAG |
| Curves/arcs | Native arc and circle entities | No arc primitive — a circle or curved edge is represented as a many-sided polygon approximation |
The practical upshot: DXF's named layers and native arcs suit drafting workflows where a human names things and curves matter, while GDSII's numbered layers, integer coordinates, and array references suit dense, hierarchical mask data where a single repeated cell (e.g. a memory bitcell) might be instanced millions of times.
Converting between DXF and GDSII
Because the two formats model geometry differently — arcs vs polygonized curves, named layers vs numbered layer/datatype pairs, floating-point vs fixed integer units — converting between them is a lossy or approximating operation, not a re-encoding. Arcs typically need to be segmented into polygons (or vice versa, approximated) during conversion, and named DXF layers need an explicit mapping to numbered GDS layers.
DXF → GDSII is the easier direction, and Glyph does it natively: open the .dxf file, review the imported geometry and layer mapping, then save as .gds. No separate converter step is required.
GDSII → DXF still needs an external tool — Glyph doesn't write DXF (see below). Several general-purpose CAD/EDA conversion tools and libraries support this direction; check what a given tool does with arcs, units, and layer mapping before trusting a converted file, since defaults vary and a mismatch there is a common source of geometry errors.
Does Glyph support DXF?
Yes for import: Glyph reads ASCII DXF files directly and converts them into editable, hierarchical geometry — lines, polylines (including bulge arcs), circles, arcs, ellipses, splines, hatch boundaries, and text all become native shapes, with DXF BLOCK/INSERT mapped onto Glyph cells and SREF/AREF instances so the hierarchy survives the round trip rather than flattening. Drawing units come from the file's $INSUNITS header (falling back to 1 unit = 1 µm when absent), and imported layers default to hollow outlines since DXF drawings are usually line art rather than filled mask regions. Binary DXF is not supported — re-save the file as ASCII DXF in your CAD tool first. Export is the other direction Glyph doesn't cover: Glyph writes GDSII, SVG, and PNG, but there's no DXF writer, so a round trip back to DXF needs one of the external converters mentioned above.
Further reading
- Autodesk, DXF Reference (AutoCAD 2018) — help.autodesk.com/cloudhelp/2018/ENU/AutoCAD-DXF/files/index.htm. The vendor's own format reference.
- Wikipedia, "GDSII" — en.wikipedia.org/wiki/GDSII. Background on the mask-layout format.
- W3C, Scalable Vector Graphics (SVG) 1.1 — w3.org/TR/SVG11/. The format Glyph uses as its vector import/export bridge.
Open a .gds file directly in Glyph — nothing to install, and your files never leave your browser.