[QGIS-Developer] Trying to upstream fixes for libdxfrw

Vittorio Carlo Alfieri vittorio88 at gmail.com
Wed May 23 06:31:44 PDT 2018


I am a new qgis user. It is great software, please keep up the good work.

I am trying to fix an issue I have in LibreCAD particularly in their
implementation of libdxfrw.

Using LibreCAD and/or libdxfrw's dwg2dxf test binary, upon importing a DWG
file I get an error: "Unable to read tables".

Using qgis Trunk or even the older qgis where libdxfrw was introduced the
dwg file I am working with imports flawlessly.
For reference, it seems to me libdxfrw was introduced to qgis with commit:
a85fe1fa4464e5b6f7bd7e9dbb76c679ec75ec29 on  Dec 14, 2016

I debugged the binary dwg2dxf during the import of a file, but identifying
the issue is more complicated than I would like because there are several
layers of code within the library, and I am not too familiar with the

Setting aside the debugger for the moment, I tried to merge the differences
between the libraries, but this too seems to be too onerous and

I believe the reasons it's difficult to harmonize the code is because the
library itself has been heavily modified, all debug statements have been
swapped for qt debug statements, and the code has been auto-reformatted.

While these changes are good, unfortunately, (for me at least), all these
changes just appeared in the qgis git source tree making it impossible to
bisect the code to the point of origin (libdxfrw upstream), so that I find
find the commit that fixes the issue I am having importing a DWG in

Sorry for the essay.

I humbly request, if available and not available online somewhere, a copy
of the git repository used to develop libdxfrw up to the point where it was
introduced in Qgis in 2016 so that I may continue to bisect the code and
find the fix for the DWG that I can't open outside of Qgis.

Thanks regardless,

P.S. If the original git repository is still available it would be great if
placed on Github and possibly even used as a submodule within qgis itself
so as to have the same git tree as upstream for libdxfrw. This would
greatly increase harmonization of source code between the various forks of
libdxfrw and de-duplicate much effort for all parties! I would be willing
to help implement this for you guys if so desired.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20180523/59a6a72e/attachment.html>

More information about the QGIS-Developer mailing list