[GRASS-user] vector export to DXF in 3d ?

Markus Neteler neteler at osgeo.org
Tue Oct 9 11:44:37 PDT 2012

On Tue, Oct 9, 2012 at 5:41 PM, Nick Cahill <ndcahill at wisc.edu> wrote:
> Dear Peter,
> I've found that v.out.dxf exports a 2d dxf file,

Maybe it does *some* vector types only in 2D? Because I see
x,y,z in several places:

cat vector/v.out.dxf/write_dxf.c | grep '^int \|z'
int dxf_point(char *layer, double x, double y, double z)
    fprintf(dxf_fp, "10\n%f\n20\n%f\n30\n%f\n", x, y, z);
int dxf_vertex(char *layer, double x, double y, double z)
    fprintf(dxf_fp, "10\n%f\n20\n%f\n 30\n%f\n", x, y, z);
int dxf_text(char *layer, double x, double y, double z, double size, int just,
    fprintf(dxf_fp, "%f\n 30\n%f\n 40\n%f\n  1\n%s\n", y, z, size, text);

It seems that lines and faces are not (yet) exported in 3D.
Knowing how it has to be formatted (maybe learning from v.in.dxf which
supports that) writing them might be just a few lines of code more.


More information about the grass-user mailing list