Routines for reading and writing ascii files. An ascii file contains
raw coordinate values, one node per line. Nodes are not numbered. e.g.
1.0 1.0 1.0
2.0 1.0 0.0
...
Ascii files may have an extension of .asc or .txt.
1.1 (16 May 2002)
1.1 (16 May 2002) :
Added .txt extension.
1.0 (15 May 2002) : Created module for converting to/from raw ascii file.
Prompted by output from laser scanners.
- PARAMETERS
-
(filename)
- USAGE
-
$group = readAscii("newfile");
- FUNCTION
-
Returns a NodeGroup read from filename (or filename.asc, or
filename.txt). Creates a single FieldSet relevant to an ascii file. It
has a coordinates Field with x, y and z Components.
- PARAMETERS
-
(filename, group, options)
- USAGE
-
writeAscii("newfile", $group, \%options);
- FUNCTION
-
Writes a NodeGroup to an ascii file. Options are passed through
the options hash to control the subset of the NodeGroup which will be
printed.
- OPTIONS
-
- nodes
-
A array of node structures which will be output. A number of routines are
available to get nodes from a group (e.g. getNodes. See CmUtils::Objects::NodeGroup).
If not set, all nodes will be printed.
- fields
-
An field name which will be printed. If not set, the "coordinates" field
will be printed if it exists.