Syntax
[C/C++:]
int gGetNextDXFEntity(GDXFENTITY *entity);
[F90:]
integer function gGetNextDXFEntity(entity)
type (GDXFENTITY ), intent(out) :: entity
Arguments
entity.type
Entity type
|
= GDXF3DFACE, |
3D facet with 3 or 4 vertices (npts,points,nquad) |
|
= GDXFARC, |
Arc composed of centre, start and end points (npts,points) |
|
= GDXFCIRCLE, |
Circle composed of  centre and point on radius (npts,points) |
|
= GDXFELLIPSE, |
Ellipse composed of four points, centre, end point of major axis, extrusion direction and ratio of minor to major axis (npts,points) |
|
= GDXFLINE, |
3D line with two points (npts,points) |
|
= GDXFPOINT, |
3D Point (npts,points) |
|
= GDXFLWPOLY, |
2D polyline (subtype,npts,points) |
|
= GDXFPOLY, |
2D/3D polyline or polygon(subtype,npts,points) |
|
= GDXFSOLID, |
3D facet with 3 or 4 vertices (npts,points,nquad) |
|
= GDXFTEXT, |
TEXT, ATTRIB or ATTDEF string with two alignment points(npts,points,text) |
|
= GDXFMESH, |
3D polyface mesh, composed of a series of vertices grouped in sets of nquad points representing each mesh(npts,points,nquad) |
|
= DXFHATCH, |
2D Complex Polygons(npts,points) |
everec.subtype
Polyline entity sub-type
everec.colour
Entity colour number. Note that DXF files only contain colour numbers and no specification for what colour these are meant to represent. There is however an adhoc standard which maps colours 1 to 7 onto red, yellow, green, cyan, blue, magenta and black.
everec.npts
Number of points/vertices contained in points array element
everec.points
Variable sized array of type GPOINT3 containing npts points/vertices
everec.nquad
Number of points in 3DFACE, SOLID and each mesh of a polyface mesh
everec.text
Text string
Description
The funtion gGetNextDXFEntity() will return a subset of the data associated with the next entity when reading a DXF file which has been opened using gOpenDXFFile(). The data is returned in the structure
entity of type GDXFENTITY as described above.
The funtion returns the entity type value, a copy of the value found in entity.type. This enables the testing of the end of file marker GEOF within an appropriate 'while' loop.
When the process of reading a DXF file in this manner is complete, the routine gCloseDXFFile() should be called to terminate the process.
Note the GDXFENTITY structure is likely to be extended in the future to contain additional data associated with an entity.
See Also
gGetNextDXFEntity UsagegCloseDXFFilegOpenDXFFile