Skip to content

Conversation

@JosephEoff
Copy link

Fix exceptions when Traces and 3DFaces have 4 coordinates.

This is the same as the fix for SOLIDS with 4 coordinates.

@mkernel
Copy link
Owner

mkernel commented Aug 5, 2016

@JosephEoff thanks for pointing that out! I thought about it and came up with an alternative solution.
I thought it would be bad to have always 4 coordinates. You would have to "guess" wether your item had originally three or four coordinates based on the values of the fourth coordinate set.

I'm not entirely sure aboud SOLIDs though. Those are known to have 4 coordinates, right? Otherwise I'll update it's implementation to use the same fix.
Please have a look at https://github.com/mkernel/DXFLib/tree/JosephEoff-master and check if that also fixes the crashes with your demo files.

@JosephEoff
Copy link
Author

Close. The for loop is a bit off. With it corrected, everything works.
Correct for loop:
for (int i = oldLength - 1; i < idx + 1;i++ )

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