libredwg icon indicating copy to clipboard operation
libredwg copied to clipboard

Various fixes to dwgadd (addresses LibreDWG/libredwg#388)

Open s0me0ne-unkn0wn opened this issue 3 years ago • 6 comments

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)

s0me0ne-unkn0wn avatar Feb 18 '22 16:02 s0me0ne-unkn0wn

Codecov Report

Merging #415 (8b971c8) into master (bdfbaef) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           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 data Powered by Codecov. Last update bdfbaef...8b971c8. Read the comment docs.

codecov[bot] avatar Feb 18 '22 20:02 codecov[bot]

One problem though, Dmitry: we need a copyright assignment for this, even if it's just code moving around. See CONTRIBUTING

rurban avatar Feb 18 '22 21:02 rurban

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]?

s0me0ne-unkn0wn avatar Feb 18 '22 22:02 s0me0ne-unkn0wn

Yes, please. Needs just a few days. And Michal: If your contributions exceed 15 lines we need yours too :)

rurban avatar Feb 19 '22 06:02 rurban

@rurban I sent assign too.

michal-josef-spacek avatar Mar 17 '22 09:03 michal-josef-spacek

Copyright Assignment cleared

rurban avatar Aug 25 '22 17:08 rurban

merged to branch work/fix_dwgadd. needs much more work

rurban avatar Dec 01 '22 12:12 rurban