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
DXF: Support negative index in VERTEX #5118
Conversation
If the edge is supposed to be invisible shouldn't it be marked somehow or skipped? |
The current patch only prevents the loss of faces. Still, I believe it improves the function. As you mentioned, the invisible information should be retained if possible. Unfortunately, I haven't been able to implement this as I'm unsure how to represent invisible edges in assimp. |
I think this pull request will fix the next issue: |
I have created an example of a DXF file that cannot be read correctly without applying this PR. This file defines a square mesh consisting of two triangles. Negative indices are specified on lines 476 and 490.
When testing the code provided below, the behavior is as follows. Using assimp before applying the PR:
It only has 2 face vertices and does not read the triangle. Using assimp after applying the PR:
This one reads triangles. The code used is as follows:
|
The original patch conflicts with the changes made in PR #5146. |
Prefer rebase over merge, makes for a cleaner history. |
ca0bf25
to
8d8a0a5
Compare
I cleaned up the history by rebasing. |
Merged, thanks a lot for your contribution. |
In DXF files, negative value is allowed for the "Polyface mesh vertex index" of the VERTEX entity.
https://help.autodesk.com/view/ACD/2024/ENU/?guid=GUID-0741E831-599E-4CBF-91E1-8ADBCFD6556D
However, the current implementation of
DXFImporter::ParsePolyLineVertex()
converts negative index to 0 and cannot handle them correctly.This pull request ensures that negative index is handled correctly by reading their absolute value.