- Status Closed
- Percent Complete
- Task Type Bug Report
- Category QCAD (main)
-
Assigned To
Andrew - Operating System All
- Severity Low
- Priority Very Low
- Reported Version 3.2.1
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
Opened by Tamas TEVESZ - 18.08.2013
Last edited by Andrew - 16.10.2013
FS#892 - DXF compatibility issues when saved as DXF R15 / dxflib
This report concerns QCAD 3.2.1 when used without the Teigha plugin for DXF / DWG support:
While playing around, I created a simple drawing with QCAD 3.2.0 with just some lines and dimensions.
QCAD 3.2.0 renders it as shown in dim-qcad320.png.
QCAD 2.0.5.0-community renders it as shown in dim-qcad2050free.png.
DraftSight V1R3.2 pops up a window upon loading that says “Drawing file requires recovery. Do you want to proceed?”. If I choose recovery, it renders it as shown in dim-draftsightv1r32.png (if I choose not to recover, it quits). If now I save the recovered drawing in “R2000-2002 ASCII drawing (*.dxf)” format (which looks closest to what QCAD 3.2 offers to save as by default), both QCAD 2 and QCAD 3.2 render this repaired drawing as intended (ie. as in dim-qcad320.png).
The font difference in the DraftSight image is apparently due to a missing font on DraftSight's side and doesn't as such appear to be a part of the problem (the aligned dimension lines being somehow skewed).
The online viewer at gallery proficad eu /tools/autocad-viewer.aspx says "we could not open this drawing" for the original one, and renders the one recovered by DraftSight OK.
Same goes for www dwgconverter org
The Java viewer at www escape de /~quincunx/dxfviewer/ says the following for the original drawing:
and renders the DS-recovered version OK.
(URLs mangled as the forum wouldn't allow them otherwise, but I feel in this case they are proper part of the report.)
Some notes:
QCAD 3.2 saves as DXF 2013 by default (the latest DXF format). Draftsight and other products may not support that version of DXF. Try an older DXF format version instead (e.g. 2000).
Backwards compatibility with QCAD 2.0 is no longer an objective. QCAD 3.2 is available as free community edition as well (GPLv3) and should be used instead.
As for QCAD 3.2 (actually, Git 6171094d2), I don't seem to be able to choose a format to save as (the "Format" field has only one item, "R15 (2000/LT2000) DXF Drawing (dxflib) (*.dxf)", either with a new empty drawing or "Saving as" an existing drawing).
DraftSight (according to its "File type" drop-down of the "Save as" dialog) does support DXF 2013 ("R2013 ASCII Drawing (*.dxf)", though the Wikipedia article has a remark to the effect of
I readily admit "DXF 2013" and "R2013 ASCII Drawing" could mean different things, for all I know.
I have tried the procedure outlined in "Creating a Simplified DXF File" chapter of the QCAD book, with results as follows:
I have also tried Autodesk's DWG TrueView 2014 (download autodesk com /esd/dwgtrueview/2014/SetupDWGTrueView2014_ENU_32bit.sfx.exe) Product version: I.18.0.0 with the following results:
Thanks for the details. You are using QCAD 3.2 without the Teigha plugin for DXF / DWG support. I've adjusted the report accordingly.
One more note: I tried to just open and save dimensions.dxf with QCAD 3.2.2.0 (binary), where "save" means "Save as R15 (2000/LT2000) DXF Drawing (Teigha)" – basically just using a different engine (Teigha vs. dxflib) to write the same format data.
Results:
There is a comment on the LibreCAD (github LibreCAD issue #404) forums stating:
I can't personally comment on the correctness (or the opposite thereof) of this statement, but it might help.
I saw a comment in 0cf489e9 that this was fixed, so I re-tested, with the original dimensions.dxf loaded and just saved again in 0cf489e9 (dimensions2.dxf, attached).
The diff is as follows:
and some textstylex to textstyley changes.
Test results:
Thanks for your efforts in repairing this!
With a recent update of dxflib to 3.3.4.0, things are getting a little bit better. dimensions3.dxf is attached, results areas follows:
One more thing appeared as well. Opening the original dimensions.dxf and saving it with Git revision 15493d, one of the diff hunks looks as follows:
This QCAD opens the original dimensions.dxf fine, renders it fine, saves it fine, but when the now-saved dimensions3.dxf is opened again, the label on one dimension line becomes "Line at an angle of 45\U+00b0", see dim3-qcadr15493d.png (it is supposed to be a "degree" sign, U+00b0).
Let me know if you need any more information, and again, thanks for your continued efforts in hunting this one down!
dim3-draftsightv1r32.png (6.8 KiB)
dim3-draftsightv1r40.png (6.8 KiB)
dim3-qcad2050free.png (6.3 KiB)
dim3-qcad333.png (17 KiB)
dim3-qcadr15493d.png (27 KiB)
Git rev e4f46f.
Looking better with each iteration. Thank you.
dim4-draftsightv1r32.png (10 KiB)
dim4-caff22004.png (6.7 KiB)
Thanks Tamas.
I have no explanation for the TrueView error at the moment, but will look into it once time permits.
Viewers which are not showing dimension entities are likely not able to render dimension entities. They expect an unnamed block to be present which contains the visualization of the dimension (lines, solids, text, etc). This is not within the scope of dxflib and will likely not be implemented anytime soon.
This is very plausible, after a single XP, the caff.de viewer displays it OK.
Thanks for your effort and the fix!
The 'Unexpected DXF group code: 73' should be fixed in the latest commit:
https://github.com/qcad/qcad/commit/2bcd3e1b4e0b3fe7a911d28af156564e06bb5299
Sadly, it isn't yet :(
I dug around a bit, made some educated guesses after reading most of the Internet (:)), especially forums autodesk com /t5/AutoCAD-2000-2000i-2002-DWG/error-opening-DXF-with-SHX-attachment/td-p/225457, and I eventually came up with a file that is actually read by TrueView as well as the other things mentioned before (including Teigha), and it also seems to render OK in each of them (trueview.jpg, other screenshots not taken now), see dimensions6.dxf.
The essence is the following diff for each of the six TEXT entities:
This may be a completely false direction, but may also give you an idea as to where to look.
Continued thanks for your efforts!
dimensions6.dxf (20.5 KiB)
trueview.jpg (160.3 KiB)
Is that with QCAD 3.3.4?
The two lines 100 and AcDbText is exactly what has changed from 3.3.3 to 3.3.4.
Hm. There's something weird going on.
After a full clean checkout and rebuild, it does.
But, adding 100 AcDbText and adding $DWGCODEPAGE ANSI_1252 were added at the same commit, yet for a partial rebuild after checking that out yielded only the $DWGCODEPAGE bit added to the dxf. Though one hunk of that commit is core, the other is 3rdparty... Weird.
OK, for the original issue, as far as I can tell, it can be closed, as things seem to be in order now. Thank you for your persistence in fixing it!
I'll open a different bug for the build issue (I see now how it goes wrong, I just don't yet see why).
Thanks!
OK, great, thanks!