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
Problem reading gradient hatch from files v2004 #27
Comments
I see, HATCH handle: 0.3.1E9F74 [5] in CascoUrbano.dwg is wrong. The problem is not with the HATCH itself, but earlier from the common_entity_data already with the colors. So it affects all entities with RGB colors. Thanks a lot! |
Great :) Thanks for fast response. |
I could fix this bug now. It was of course another ODA spec bug with RBG colors. The colors of gradient HATCH'es are still not fully converted to DXF properly though. There are some special tricks. Will do this later. |
Are your commits for rgb colors final, because I applied them fast way but still get corrupted hatch (number of gradient colors is too big and I get corrupted name strings) ? |
Nope, not yet. Still get corrupted 2013 DWGs and nan's. |
For v2004 I get corrupted hatch only if color has together AcDbColor reference (0x40) and complex color (0x80) |
for 2013 I'm not sure about reading has_ds_binary_data. ODA spec says so, but reading this byte corrupts next reading. |
Exactly, this is wrong. Just deleted it by myself some minutes ago. Great analysis. b974888 should have it fixed. |
Ok, I figured out where the problem occurs. Here is extracted hatch 0x1E9F74 and screenshot from editor Also after tests I think that in ENC decoder if you have (flags & 0x40) then you should ignore (flags & 0x80) because the color value you will read in COMMON_ENTITY_HANDLE_DATA. ODA spec is really buggy. |
I'll leave now for holidays for a week, and will incooperate this into the next release. Yes, the color handle is read from COMMON_ENTITY_HANDLE_DATA. There needs to be a check for the flag & 0x40. |
This fixes the error with hatch_color_ref.dwg from [GH #27] and several LAYER entities with attached large EED data.
This fixes the error with hatch_color_ref.dwg from [GH #27] and several LAYER entities with attached large EED data.
This fixes the error with hatch_color_ref.dwg from [GH #27] and several LAYER entities with attached large EED data.
And on overlong stringsize just skip it to the end. This fixes the error with hatch_color_ref.dwg from [GH #27] and several LAYER entities with attached large EED data.
referenced by color handle of some entities WIP See 2004/CascoUrbano GH #27
gradient_fills are now stable |
I have problems decoding hatch with gradient in these files v2004 :
DWG.zip
Can you please take a look if the spec is correct? Strangely the same files converted to version 2000 or 2007 open fine.
The text was updated successfully, but these errors were encountered: