Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
timoria21 opened this issue Mar 4, 2021 · 8 comments
Open

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

timoria21 opened this issue Mar 4, 2021 · 8 comments
Assignees
Labels
invalid This doesn't seem right
Milestone

Comments

@timoria21
Copy link

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

@rurban rurban self-assigned this Mar 5, 2021
@rurban rurban added the bug Something isn't working label Mar 5, 2021
@rurban rurban added this to the 0.12.4 milestone Mar 5, 2021
@rurban
Copy link
Contributor

rurban commented Mar 6, 2021

Yes, should be fixed with 8e665f0

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

@rurban
Copy link
Contributor

rurban commented Mar 8, 2021

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 added a commit that referenced this issue Mar 8, 2021
and re-calc the bitsize and size if changed.
generally all dwg's created with r2004+ have zero-terminated strings,
before not.

Now the testcase with ./rw ../test/issues/gh326/Test_DWG_2000.dwg
causes just 63 errors, not 187 anymore.
See GH #326
rurban added a commit that referenced this issue Mar 8, 2021
and re-calc the bitsize and size if changed.
generally all dwg's created with r2004+ have zero-terminated strings,
before not.

Now the testcase with ./rw ../test/issues/gh326/Test_DWG_2000.dwg
causes just 63 errors, not 187 anymore.
See GH #326
@rurban
Copy link
Contributor

rurban commented Mar 8, 2021

with 0.12.1 we got 59996 rewrite errors with this testcase.
with 14527d3 we get 187 errors.
with 900004b we get 2 errors.

rurban added a commit that referenced this issue Mar 9, 2021
and re-calc the bitsize and size if changed.
generally all dwg's created with r2004+ have zero-terminated strings,
before not.

Now the testcase with ./rw ../test/issues/gh326/Test_DWG_2000.dwg
causes just 63 errors, not 187 anymore.
See GH #326
@rurban
Copy link
Contributor

rurban commented Mar 9, 2021

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

rurban added a commit that referenced this issue Mar 9, 2021
for INSERT. allow 1e-12 variance in equality check.
Fixes GH #326
@rurban rurban closed this as completed Mar 10, 2021
@timoria21
Copy link
Author

timoria21 commented Mar 19, 2021

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

@rurban
Copy link
Contributor

rurban commented Mar 19, 2021

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 rurban reopened this Mar 19, 2021
@timoria21
Copy link
Author

Hello, any news on this topic?

@rurban
Copy link
Contributor

rurban commented Apr 7, 2021

Yes, see above. Not repro

@rurban rurban added invalid This doesn't seem right and removed blocking bug Something isn't working labels Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants