writing spline data to a DXF file for 3DSMAX

writing spline data to a DXF file for 3DSMAX

Post by Lee Oze » Thu, 04 Mar 1999 04:00:00



Hi Folks,

Does anyone know how to write out a cubic spline to a DXF file so that
3DSMAX will import the data as a spline?   I am currently writing out a
polyline with the following attributes:
   fprintf(pFile,"0\nPOLYLINE\n8\n%s\n66\n1\n70\n5\n75\n6\n",lpszLayerName)
and I write out each spline control point as:

fprintf(pFile,"0\nVERTEX\n10\n%.6f\n20\n%.6f\n30\n%.6f\n70\n8\n",fx,fy,fz)

but when I import this data in 3DSMAX, I don't see the outline.  The shape
is there and the vertices are there but ...no line.


 
 
 

writing spline data to a DXF file for 3DSMAX

Post by Carl Perki » Sat, 06 Mar 1999 04:00:00



}Does anyone know how to write out a cubic spline to a DXF file so that
}3DSMAX will import the data as a spline?   I am currently writing out a
}polyline with the following attributes:
}   fprintf(pFile,"0\nPOLYLINE\n8\n%s\n66\n1\n70\n5\n75\n6\n",lpszLayerName)
}and I write out each spline control point as:
}
}fprintf(pFile,"0\nVERTEX\n10\n%.6f\n20\n%.6f\n30\n%.6f\n70\n8\n",fx,fy,fz)
}
}but when I import this data in 3DSMAX, I don't see the outline.  The shape
}is there and the vertices are there but ...no line.
}


My guess is that it is this:
You havn't specified a layer (type 8 thing) for your verticies. This
is apparently necessary. I think the DXF specification sayas that every
entity has to have it, and a vertex is an entity (the DXF file I just
looked at specified it for every vertex, as well as for the polyline entity
itself - yeah, I know: the DXF format is one of the most rediculously
inefficient formats ever created, it's trivial to fit all the information
in half the space while simultaneously making it much more easily human
readable). You should make it match the one for the polyline.

--- Carl

 
 
 

1. looking for code to read/write DXF files ...

Hi.  I'm in need of C/C++ code to help read and/or write DXF files
created from AutoCAD.  Any leads to PD or commercial sources of such
software would be most helpful.  I will be manipulating both 2D and 3D
data including solid models created using AutoCAD 12 with AME.

I am aware of two commercial offerings, and have solicited information
from them.  I welcome any comments you may have regarding these or
other tools which may be available.

CAD/CAM Developer's Kit/DXF
Building Block Software
Waltham, MA
(617) 899-4350

TG-Professional 4.0
Disk Software Inc.
Richardson, TX
(214) 423-7288

Thanks.


2. Mouse translate from ortho to viewport?

3. Component to Read/Write AutoCAD DXF-Files

4. Masks

5. dxf files into 3dsmax

6. APOLOGIES

7. Animation data from file in 3DSMax?

8. Scratch disk

9. Help: Need program to convert .DXF to Data explorer .DX files

10. about DXF file Datum convertion

11. Help: Need program to convert .DXF to Data explorer .DX files

12. 3d dxf data files

13. Help: Need program to convert .DXF to Data explorer .DX files