read_patran

Synopsis

Reads the contents of a PATRAN Neutral File (ASCII), into an array of fields and a renderable GroupObject.

Parameters

Name Type Description UI Control

filename string PATRAN file to be read Text box
points_visible int Controls Visibility of Point Mesh Toggle
line_visible int Controls Visibility of Line Mesh Toggle
tri_visible int Controls Visibility of Triangular Mesh Toggle
quad_visible int Controls Visibility of Quad Mesh Toggle
tet_visible int Controls Visibility of Tetrahedron Mesh Toggle
patch_visible int Controls Visibility of Patches Toggle

Output Ports

Name Type Description

out_mesh Mesh[] array of mesh outputs
out_obj GroupObject directly renderable output object

Description

The read_patran module is a reader for ASCII files in the PATRAN Neutral File format. The reader is based on the 2.5 specification of Patran. It parses the input, gathers common node position lists, connectivity for common element types, and builds a field data structure. Each element type is gathered into a common cell set and output in an array of meshes. A GroupObject is also constructed from these meshes. This GroupObject output can be directly rendered. Not all entity types are supported. Currently the ReadPatran project supports the the following entity types:

Approximate patches are generated from Nurbs and Bspline patches. Patch subdivision has not been implemented and hence these patches are replaced by approximated quads and polygons. The User Interface allows a PATRAN file to be selected. Once the file has been read two lines of descriptive text are shown. These are taken from the header of the PATRAN file. Toggle controls are also present in the User Interface. These allow the display of the various element types present in the file to be controlled.

Inputs

(none)

Parameters

filename

A member of the ReadPatranParams parameter block group, this string value specifies the name of the PATRAN file that should be read from. The filename should specify the full path name of the file.

points_visible, line_visible, tri_visible, quad_visible, tet_visible, patch_visible

All of these parameters are members of the ReadPatranParams parameter block group and they specify the visibility of the appropriate entity type in the GroupObject output. All of these parameters are of integer type. It should be noted that these parameters only specify the visibility of the entity type in the output object generated by read_patran. They do not specify if an entity type should be read or whether a mesh should be generated for an entity type.

Outputs

out_mesh[]

Array of meshes containing the data read from the PATRAN file. Each entity type is represented as a separate element in the array. The contents of each element are listed below.

Please see the example application for an illustration of now to use this array of meshes. If a given entity type is not present then the relevant element of the array will be empty.

out_obj

The directly renderable output of the read_patran macro. This contains a GroupObject object that contains the model geometry of all entity types and can be rendered by the standard data viewers. The visibility of the entity types can be controlled through the User Interface. This GroupObject output is intended to provide a simple way to quickly view the model. Most applications will require the out_mesh array to be used.

Utility Modules

The User Macro read_patran uses the functional macro ReadPatran and the UI macro ReadPatranUI. The ReadPatran functional macro uses the low-level module ReadPatranCore. All these macros and modules also use the Common Parameter groups ReadPatranParams and neutral_output.

Example

An example application ReadPatranEg is provided that reads a PATRAN file and renders two views of the data. The first view shows the GroupObject output and can be controlled through the UI. The second view shows how the out_mesh output can be used as the input to visualization modules. The external_edges module is used to reduce the size of the triangle mesh while the shrink_cells module is used to allow the structure of the tetrahedral mesh to be viewed. A sample PATRAN file, ex01.out, is provided with the distribution of this project.

Files

iac_proj/rd_patrn/pat_macs.v contains the V definitions of the ReadPatran Functional Macro, read_patran User Macro, the ReadPatranUI UI Macro, and the example application ReadPatranEg.

Other Notes

MSC/Patran is a product of MacNeal-Schwendler Corporation.

The ReadPatranMacs library inherits its process. As this library contains no procedural code, the process is not important.

Authors

David Laidlaw, John Stephens, Steve Larkin, Ian Curington
Advanced Visual Systems, Ltd.
Hanworth Lane, Chertsey Surrey, UK
KT16 9JX

Andrew Dodd
International AVS Centre

Contact

International AVS Centre
Manchester Visualization Centre
Manchester Computing
University of Manchester
Oxford Road
Manchester
United Kingdom
M13 9PL

See Also

ReadPatranCore, ReadPatran, ReadPatranUI, ReadPatranParams, neutral_output, ReadPatranEg, Read UCD, Mesh Mappers