Page 1 of 1

How do I create write out a 3d polyline?

Posted: Wed Sep 01, 2010 6:29 pm
by mesimms
I have been experimenting with dxflib to produce 3dpolylines: the LWPOLYLINE generated by writePolyline(), writeVertex() and writePolylineEnd() is of course 2D.

I've tried writing a function to emulate a simple 3D line in an existing DXF file: I don't get why in writePolyline() it automatically writes a LWPOLYLINE, surely full 3Dpolylines were allowed in DXF 2000, (AC1015)?

Does anyone know how to do this?

Posted: Mon Sep 06, 2010 9:45 pm
by andrew
3d polylines are not supported by dxflib at this point. Support should be relatively easy to add in a similar way as LWPOLYLINE support.

Re: How do I create write out a 3d polyline?

Posted: Thu Nov 01, 2012 6:05 pm
by rayj
Has anyone added support to create 3D Polylines?

Re: How do I create write out a 3d polyline?

Posted: Tue Apr 15, 2014 10:19 am
by dgrees
Is 3d polylines supported in nowadays?
I see what z-coordinates (30) of vertices are wrote correctly, but in dwgTrueView all of polylines points have z-coordinate equal to zero.

I found why there is z-coords, but in the end it is zero.
Dxflib writes "LWPOLYLINE" ->
"LWPOLYLINE entities are defined more efficiently, and in theory take up
less memory and disk space. They are always 2D."
(from autodesk site)
...
i found a trick: we need to choose format AC1009 and write polyline with flag 8. But this file contains many errors, DWGTrueView can't open it (but DraftSight can).