DXFLib
DXFLib copied to clipboard
Fix exceptions when Traces and 3DFaces have 4 coordinates
Fix exceptions when Traces and 3DFaces have 4 coordinates.
This is the same as the fix for SOLIDS with 4 coordinates.
@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.
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++ )