Saving POLYLINE vertices
Posted: Wed Sep 17, 2008 5:24 am
Hi, first up, thankyou for an excellent DXF parsing library. I am currently investigating it's use to load and save DXF files with POLYLINE being the main entity I am concerned with.
Most of the POLYLINE entities i've encountered so far store X, Y and Z components with each VERTEX (or in a list for the LWPOLYLINES). The issue arose when I wrote code to save the DXF. I just output the same structs that were supplied to the DXFLib DL_CreationInterface when it loaded the file. When I tried to reload the saved file, it had lost all of the elevation (ie component 30 of the VERTEXs).
After digging around in the source, I found that DL_Dxf::writeVertex() doesn't actually output the 30 component (not in either of the supported DXF format versions). It was easy enough to fix, but I just wanted to ask if there was a reason for not outputting the 30 component when you do actually read the component?
My reason for asking is that I'd prefer not to modify the DXFLib source, particularly if I end up using it commercially (and hence buying a license).
Most of the POLYLINE entities i've encountered so far store X, Y and Z components with each VERTEX (or in a list for the LWPOLYLINES). The issue arose when I wrote code to save the DXF. I just output the same structs that were supplied to the DXFLib DL_CreationInterface when it loaded the file. When I tried to reload the saved file, it had lost all of the elevation (ie component 30 of the VERTEXs).
After digging around in the source, I found that DL_Dxf::writeVertex() doesn't actually output the 30 component (not in either of the supported DXF format versions). It was easy enough to fix, but I just wanted to ask if there was a reason for not outputting the 30 component when you do actually read the component?
My reason for asking is that I'd prefer not to modify the DXFLib source, particularly if I end up using it commercially (and hence buying a license).