read an AVS geometry (.geom file) and output an AVS/Express field
Read_Geom reads an Application Visualization System geometry format file (.geom suffix) and converts it into an AVS/Express Field.
This output is a new field object containing cellsets to represent each of the supported geometry types. Input types GEOM_POLYHEDRON and GEOM_MESH are converted to GEOM_POLYTRI with both surface (polytriangle strip) and wireframe (polyline or disjoint line) representations before processing. The data from all geometries in the input file is concatenated into one AVS/Express field.
The number of nodes is the aggregate number of vertices for all supported input geometries, after GEOM_MESHs and GEOM_POLYHEDRONs have been converted to GEOM_POLYTRIs.
The unstructured mesh consists of:
nnodes equal to the total number of vertices
nspace equal 3
Data_Array consisting of the locations of the vertices
(nvals = nnodes, veclen = 3, units = "inches")
ncell_sets in the range 1-4
An array of up to 4 cellsets, possibly one for each of these cell types:
____Polytri_____Polyline_____Line_____Point
The types of cellsets appearing in the output is determined by the union of geometry types in the input. For example, the Polytri cellset will contain the surface information from all AVS GEOM_POLYHEDRON, GEOM_MESH and GEOM_POLYTRI input geometries.The full mapping of AVS geometry types to AVS/Express field cellsets is
ncells equal to the number of polytriangle strips
node_connect_list that is the polytriangle strip connectivity
ncell_data = 0 (no cell_data)
ncells equal to the number of polylines
node_connect_list that is the polyline connectivity
ncell_data = 0 (no cell_data)
ncells equal to the number of line vertices/2 (number of lines)
node_connect_list that is the disjoint line connectivity
ncell_data = 0 (no cell_data)
ncells equal to the number of spheres
node_connect_list that is a list of the points
ncell_data = 0 (no cell_data)
Vertex data can be associated with AVS geometry types as indicated in the following table.
The total number of nodes in the output field, equal to the sum of nodes in each of the cellsets: Polytri + Polyline + Line + Point
The number of per-vertex data items present. This will be in the range 0-4, one for each of: normals data, color data, radius data, texture coordinate data (2D uvs or 3D uvws). The uvs and uvws texture coordinates are mutually exclusive, only one of these can be present in the output geometries.
Per-vertex transparency data in the input geometry is ignored.
An array of nnode_data data arrays, one for each of normals data, color data, radius data, and texture data, as present in the input geometries:
nvals equal to nnodes
veclen equal to 3 (x, y, z)
id equal to GD_NORMAL_NODE_DATA_ID
DTYPE_FLOAT values array
nvals equal to nnodes
veclen equal to 3 (red, green, blue)
id equal to GD_COLOR_NODE_DATA_ID
DTYPE_FLOAT values array
nvals equal to nnodes
veclen equal to 1 (radius)
id equal to GD_RADIUS_NODE_DATA_ID
DTYPE_FLOAT values array
nvals equal to nnodes
veclen equal to 2 (u, v)
id equal to GD_UV_NODE_DATA_ID
DTYPE_FLOAT values array
nvals equal to nnodes
veclen equal to 3 (u, v, w)
id equal to GD_UV_NODE_DATA_ID
DTYPE_FLOAT values array
This is a renderable DataObject referencing the field output data.
The DataObject is a single graphical object, with no children. The name of the object is simply the input file basename. For example, the input file:
will generate a DataObject called teapot. If the output port is connected directly to a Viewer3D, then exactly one object will appear in the graphics hierarchy, and the name teapot will appear:
in the Object Selector browser under the ViewEditors menu
echoed in the border of the Viewer3D window for the current object
If there is more than one geometry in the input file, all the geometry data is concatenated into one output field. The DataObject geom output references this field.
The AVS/Express DataObject is the basic unit for rendering control. Rendering attributes include Modes, Properties and Colors. Building a single DataObject for all the input geometries means that the whole model read from file is rendered with a common set of attributes. This contrasts with the Read Geoms module, which builds a hierarchy of DataObjects, with one member of the hierarchy for each input geometry. Read Geoms allows each input geometry to have independent rendering attributes within AVS/Express.
All AVS .geo files supplied with AVS/Express contain one geometry, except these which contain two geometries:
crambin.geo, sphere atoms with disjoint line atomic bonds
math.geo, mesh surface/grid with disjoint line bounding box
Libraries.Examples.Graphics_Display.GDtut_2
v/dv_examp/GDtut2.v
and many others in Libraries.Examples.Graphics_Display and examples
v/modules.v
The V pre-processor symbols ACKIT or AC_KIT_V1 must be defined for the loading of v/modules.v , in order to access the Read Geom module. These symbols are usually defined in include/$MACHINE/config.h, and this file is included directly by v/modules.v .