Login  Register

Re: DWG Support by Rallaz

Posted by Rallaz on Mar 18, 2013; 11:58am
URL: https://forum.librecad.org/DWG-Support-by-Rallaz-tp5707705p5707719.html

I started a new dwg library because:

1. license issue, incompatibility licenses with LC and libredwg, to solve are needed to rewrite all LC code, a good idea but very slow and would still be the following issues.

2. libredwg development is quite stopped, I was send a easy to solve bug report with the solution two year ago and today is not implemented and last commits are 13 months ago.
http://git.savannah.gnu.org/cgit/libredwg.git/

3. code very hard to maintain, in my opinion macros are overused doing the code very difficult to read and c++ link is disabled

4. many bugs. If you parses with examples/load_dwg the file R-2001-1.DWG (a dwg v2000 from cben.net) more than half of objects are out of bounds.
This is, most entities are located in position greater than file size.

4.1 Parsing a file with examples/load_dwg the result are diferent in 32 & 64 bits architecture.

5. I do not remember now :-)

Because dxf and dwg kept the same but written differently, I have tried has added code to read dwg files on libdxfrw and is feasible and solve all the above points.

Problems to solve for complete:
1. I need time
2. I need more time...
3. I need... help!!!

If anyone wants to help send me an email, requisites:

Time, of course, get a copy of "OpenDesign_Specification_for_.dwg_files.pdf" and read
https://github.com/Rallaz/LibreCAD/blob/dwgsupp/libraries/libdxfrw/src/dwgreader.h
https://github.com/Rallaz/LibreCAD/blob/dwgsupp/libraries/libdxfrw/src/dwgreader.h
DRW_Entity::parseDwg(...) DRW_Entity::parseDwgEntHandle(...) and DRW_Line::parseDwg(...) in
https://github.com/Rallaz/LibreCAD/blob/dwgsupp/libraries/libdxfrw/src/drw_entities.cpp

Block support are almost ready, but in my recently dead computer.

Next code to be written:
DRW_Text::parseDwg, DRW_Insert::parseDwg, DRW_LWPolyline::parseDwg, etc.
and start v2004 support: class dwgReader18

will continue
Rallaz