Slammer
26th Sep 2003, 10:18 am
I was wondering about the different approaches that can be used the write a 3D box (cube) into a DXF file.
A cube drawn in AutoCAD (version 13 i thought) resulted in a DXF files that begins like this:
Polyline
8
0
66
1
10
0.0
20
0.0
30
0.0
70
16
71
6
72
3
0
18 VERTEX entities follow
Each VERTEX looks like this:
VERTEX
8
0
10
1010.0
20
20.0
30
3030.0
70
64
0
Some of the VERTEX entities are double all of them end with the 70-64 bitcode and all of them have their 10, 20 and 30 values set.
I don't really understand how this information leads to a cube.
A cube drawn in 3D Studio MAX resulted in a different way to store the cube bitcodes (71-8, 72-12) and 20 following vertices, reading the 3Dstudio generated DXF I could reconstruct the cube (on paper) since it uses 8 'points' that have coordinates and 12 vertex entities defining edges.
I don't understand how AutoCAD produces the cube, and since both files are correcly shown in a viewer (AutoCAD and 3Dstudio generated) there must be several ways to store 3D object (at least cubes)
The actual question is something like, how do I recontruct a cube from the DXF file with those information?
A cube drawn in AutoCAD (version 13 i thought) resulted in a DXF files that begins like this:
Polyline
8
0
66
1
10
0.0
20
0.0
30
0.0
70
16
71
6
72
3
0
18 VERTEX entities follow
Each VERTEX looks like this:
VERTEX
8
0
10
1010.0
20
20.0
30
3030.0
70
64
0
Some of the VERTEX entities are double all of them end with the 70-64 bitcode and all of them have their 10, 20 and 30 values set.
I don't really understand how this information leads to a cube.
A cube drawn in 3D Studio MAX resulted in a different way to store the cube bitcodes (71-8, 72-12) and 20 following vertices, reading the 3Dstudio generated DXF I could reconstruct the cube (on paper) since it uses 8 'points' that have coordinates and 12 vertex entities defining edges.
I don't understand how AutoCAD produces the cube, and since both files are correcly shown in a viewer (AutoCAD and 3Dstudio generated) there must be several ways to store 3D object (at least cubes)
The actual question is something like, how do I recontruct a cube from the DXF file with those information?