Various fixes to dwgadd (addresses LibreDWG/libredwg#388)
Here are the minimal fixes that make it work. Please do not consider it neither stable nor free of bugs.
I just rearranged the code and added some snippets to skip empty lines and comment lines, and fixed a couple of errors in its logic.
What is tested:
- Reading in a DWG and adding some simple elements to it
- Creating DWG from scratch
- Error reporting on malformed files with mixed directives (e.g. when 'imperial' appears in the middle of input)
What is NOT tested:
- Reading in DXFs and JSONs
- Processing REALLY malformed files (may dump core on them)
TODO:
- More strict syntax checks
- Useful example input file (the one provided produces a sort of DWG which crashed QCad Pro using OpenDesign DWG import engine)
Codecov Report
Merging #415 (8b971c8) into master (bdfbaef) will not change coverage. The diff coverage is
n/a.
@@ Coverage Diff @@
## master #415 +/- ##
=======================================
Coverage 69.23% 69.23%
=======================================
Files 2 2
Lines 104 104
=======================================
Hits 72 72
Misses 32 32
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update bdfbaef...8b971c8. Read the comment docs.
One problem though, Dmitry: we need a copyright assignment for this, even if it's just code moving around. See CONTRIBUTING
One problem though, Dmitry: we need a copyright assignment for this, even if it's just code moving around. See CONTRIBUTING
Well, I never did it before. What should I do exactly? Follow the form at http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=doc/Copyright/request-assign.future;hb=HEAD and send it to [email protected]?
Yes, please. Needs just a few days. And Michal: If your contributions exceed 15 lines we need yours too :)
@rurban I sent assign too.
Copyright Assignment cleared
merged to branch work/fix_dwgadd. needs much more work