AutoCAD .dwg -> .dxf, .dxf to .gds

I've been able to edit DXFs (at least R12 version)
but most AutoCAD these days seems to come as
.dwg format.

I was able to find one teaserware dwg to dxf demo
that got me from .dwg to R12 .dxf but its eval period
has expired. I had tried dxf format options in that
converter and they didn't open right until I got to
"good ol' R12" at the bottom.

Wondering whether we could get .dwg (to R12 dxf)
conversion "internalized" to klayout? Maybe there is
open source code somewhere that could be pulled
in?

I could stand any hints about using klayout to pull
in dxfs (like from package vendors) and then
exporting to GDSII, like when I have to make bond
figures for my chips. I need to get their cavity
drawings at right scale. Need to keep absolute
dimensions right (microns:microns) despite
whatever the vendor drawing might have been
(lots of the packages I like, still have inches as
drawing units).

Comments

  • Hi @dick_freebird,

    A potential path to DWG is "LibreDWG" (https://en.wikipedia.org/wiki/LibreDWG), but frankly, I try to avoid third party libraries as far as possible as they usually impose a maintenance and deployment issue. I also don't have experience with DWG and these libs myself. I just imagine that support is not complete, as those are reverse engineering activities.

    DXF spec is publicly available, so I can basically support that format. However, there are some issues that make DXF not well suited to mask applications - for example, they are unitless and do not support "filled areas" consistently. A reader that wants to make mask data from that needs to stitch the lines and compute the filling internally. That implies some implementation dependency which we do not have in GDS for example.

    KLayout's DXF reader has a number of switches to control the behavior. "Auto" settings usually work, but you may need to play with the settings until you get the result you're expecting. Unfortunately the unit issue remains. As said, DXF does not carry unit information. You have to specify that in the reader options. I am not sure if that changes with DWG.

    Matthias

  • FreeCAD has DWG support (through LibreDWG I guess). Maybe that is a way to translate your DWG files to DXF?

    Matthias

Sign In or Register to comment.