Skip to content

Conversation

@danikolovv
Copy link
Contributor

Value of o->flag must be at least 512.

Value of o->flag must be at least 512.
Copy link
Contributor

@rurban rurban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope. Convert 1 to 512

@danikolovv
Copy link
Contributor Author

Nope. Convert 1 to 512

Hello,
Okay, this is from DXF read bit value to DWG's equivalent. (Meaning, in this case - 1 to 512)
Then the original code is correct.

Then there must be an error in reading the CLOSED flags from DWG file in the first place.

Copy link
Contributor

@rurban rurban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, in my understanding the current code is ok.
DXF flag 1 i converted to DWG flag 512

Your patch overwrites all other DXF flags, and just sets CLOSED

    if (o->flag & 1)
                o->flag = (o->flag - 1) + 512;

looks correct to me. There must be some other problem, I think

@danikolovv
Copy link
Contributor Author

danikolovv commented Nov 7, 2025

Hello,

looks correct to me. There must be some other problem, I think

Yes, the problem is elsewhere.

I will write a short bullet point checklist:

  • Correct parsing of the flag values from the dwg file;
  • Correct allocation and saving in internal object structures;
  • Correct object usage later on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants