libredwg icon indicating copy to clipboard operation
libredwg copied to clipboard

Version 12.2 loads this DWG much worse compared to v12.1

Open timoria21 opened this issue 4 years ago • 8 comments
trafficstars

Hello,

Trying the attached DWG file with the latest build we get a much worse result. Screenshots are included in the attached zip file.

TestDWG.zip

timoria21 avatar Mar 04 '21 07:03 timoria21

Yes, should be fixed with 8e665f0273de973cbf2c804d999be5d0f788737d

More bitsize and size recalculations are needed with DD types, if missing leading to wrong hdl offsets.

rurban avatar Mar 06 '21 15:03 rurban

Nope, still wrong sizes, leading to wrong handle offsets. Caused by different TV zero-termination policies. header.dwg_version (the app) >= R_2004 always writes an ending zero with strings, before never. So we get different bitsizes also when there are strings when reading dwg's created with newer acad's (r2004), writing to older r2000. either we know with which version the strings were written, or we just re-calc the sizes all the time.

rurban avatar Mar 08 '21 09:03 rurban

with 0.12.1 we got 59996 rewrite errors with this testcase. with 14527d3eed139a23a6cd165ed591be8337ad18ba we get 187 errors. with 900004be7137c7cd00a48e33104f466587cbfc7c we get 2 errors.

rurban avatar Mar 08 '21 21:03 rurban

remaining is a wrong scale DD encode for scale.z 3 vs 0 fixed with d2084ca223607b4558801c30bbdb0c14bd9fe58d thanks for the nice testcase!

rurban avatar Mar 09 '21 09:03 rurban

I tried to build and run libredwg-0.12.3.4231-win64 but the issue is still there (see attached files). What am I missing?

Result 12 3

TestDWG_12.3.zip

timoria21 avatar Mar 19 '21 09:03 timoria21

Thanks for the recovery log. Looks like the BLOCK "1573" is broken, and more. I suspect BLOCK subentity and POLYLINE vertex ordering a bit broken, but worse is the missing ownerhandle

rurban avatar Mar 19 '21 09:03 rurban

Hello, any news on this topic?

timoria21 avatar Apr 07 '21 05:04 timoria21

Yes, see above. Not repro

rurban avatar Apr 07 '21 06:04 rurban