haplokuon / netDxf

.net dxf Reader-Writer
MIT License
981 stars 400 forks source link

Polyline2D should be PolyLine3Ds or elevation is not being read. #359

Open Schulzey opened 2 years ago

Schulzey commented 2 years ago

Hello, I am having issues with a DXF file, the issue lines are being read as 'PolyLine2D' but they are missing their elevation or they are being read in as 2D points when they should be read in as 3D points.

The model when opened with Autocad shows the elevation (Z component) image

In the file, this is the first coordinate, showing the X/Y/Z (assuming elevation = Z). image

When debugging this shows the elevation = 0, while the X & Y match correctly. image

These files were originally older versions saved to dxf 2018 through autocad. Here is the file (I renamed it to .txt so i could upload it here) sample solid - pyramid base.dxf.txt

Thanks in advance,

haplokuon commented 2 years ago

What your file contains is not a Polyline2D neither a Polyline3D but a Polygon Mesh. They are not implemented and since I forgot to filter them out, they default to the Polyline2D.