Syntax
[C/C++:]
void gImportDXFSurface(GFILE *fp, char *layer, GPOINT3 *points, int maxpts, int *npts, GTRIANGLE *triangles, int maxtri, int *ntri);
[F90:]
subroutine gImportDXFSurface(unit, layer, points, maxpts, npts, triangles, maxtri, ntri)
integer, intent(in) :: file, maxpts,maxtri
character*(*), intent(in) :: layer
type (GPOINT3), intent(out) :: points(*)
type (GTRIANGLE), intent(out) :: triangles(*)
integer, intent(out) :: npts,ntri
Arguments
fp
GINO-C file pointer
unit
Fortran 90 file unit
layer
Layer name or blank for all layers
points
Array of type GPOINT3 containing vertices of all surface data
maxpts
Size of points array on input
npts
Number of points on return
triangles
Array of type GTRIANGLE containing triplets of pointers to points array
maxtri
Size of triangles array on input
ntri
Number of triangles on return
Description
The routine gImportDXFSurface() returns a set of vertices and triangle pointers representing the polyface meshes contained within a DXF metafile whose file pointer has been passed in
fp or
unit. The file should have been opened using the routine gFopen().
The argument
layer may be used to select a single layer from which to import a mesh, or if a blank or NULL string is passed, then all layers will be interpreted. Layer names may be obtained using the routine gEnqDXFLayer().
It is necessary to call the routine gEnqDXFEntities() prior to using this routine to obtain the number of vertices and meshes in the required DXF file in order to allocate the appropriate sized arrays for
points and
triangles. It should be noted that where the DXF file contains meshes each with four vertices, this routine will split each mesh into two triangles, thus doubling the number of triangles returned.
The data returned by this routine is mostly useful for passing to the GINOSURF routine gsImportTriangulationNetwork() for the generation and display of the surface data.
If there is an error reading the DXF file, or the file does not contain any polyface meshes, the argument
npts and
ntri will return the value zero in both cases.
See Also
gImportDXFSurface UsagegEnqDXFEntitiesgEnqDXFLayersgFopen