LibDWG

LibDWG - free access to DWG

Here goes a library to allow reading data from a DWG file. That's a very important acquisiton, which may improve a lot the ability of the free software comunity to develop more interesting applications, in the field of computer technical drawing (CAD).

The DWG structure is very complicated, it seems to be crafted so that none can easily understand it. That's a strong reason to not use it, and that's also why we do not provide the writing feature in the library. One should use LibDWG mainly to read such files, filtering them to some other format, free and usable.

Since the present moment (April 2009), there seems to be no other project like this, it's uniqueness comes from the implementing programming language (C) and also from the ugly situation of the today's CAD program market, with a disgusting configuration of (almost?) monopoly.

You will also notice this interesting feature: we use Esperanto to code the library and, probably the API documentation will be available only in this language. But this is another battle... Thus, get prepared.

Features of the last version

Until now, here are the objects the library can read:

Limitations of the last version

Unfortunately, for now we must show more limitations than features. However, we hope that this situation won't last for so much longer.

Interface (API):
The last version (0.3) is just a demonstration for what we may have ahead. It's still not very usable, missing a clear and simple interface to the data (though the intrinsic complexity in DWG).
Version:
Since the beginning (and maybe forever) the library can read only DWG files with version R15 (best known as R2000). This version is enough well documented by Open Design Alliance (ODA). With the specification provided by ODA, one poorly succeed to read versions R2004 and R2007, because there are missing some internal details.
Writing:
For you, who read until here, I may confess: the read-only limitation comes from the fact that we simply didn't succeed to create (write) a correct DWG file, which could be read by the AutoCAD application. There are some peaces of bytes we simply couldn't decipher. So, it seems that some parts of DWG will remain forever as an enigma (at least for me).

Alternatives

Here we have a simple little search about other formats, more suitable for free CAD applications.

For the future

After that list, it's easy to "forecast" the intention to create something like a filter, which takes a DWG file and transform it to one (or several) of the open alternatives (whenever there be one :-). That's a long way to reach this goal. And also, other people are working on this: VectorSection

Other interesting ability of such filter would be to create image files like PNG, SVG, EPS and even PDF, for example.


^ Up ^