How do I create write out a 3d polyline?

Use this forum to ask questions about how to do things in dxflib.

Moderator: andrew

Post Reply
Registered Member
Posts: 1
Joined: Wed Sep 01, 2010 5:44 pm

How do I create write out a 3d polyline?

Post by mesimms » Wed Sep 01, 2010 6:29 pm

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?

User avatar
Site Admin
Posts: 6761
Joined: Fri Mar 30, 2007 6:07 am

Post by andrew » Mon Sep 06, 2010 9:45 pm

3d polylines are not supported by dxflib at this point. Support should be relatively easy to add in a similar way as LWPOLYLINE support.

Registered Member
Posts: 1
Joined: Thu Nov 01, 2012 5:12 pm

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

Post by rayj » Thu Nov 01, 2012 6:05 pm

Has anyone added support to create 3D Polylines?

Registered Member
Posts: 2
Joined: Thu Apr 03, 2014 9:08 am

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

Post by dgrees » Tue Apr 15, 2014 10:19 am

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).

Post Reply

Return to “dxflib 'How Do I' Questions”