|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectGridView.MeshFileReader
public class MeshFileReader
Class for reading various file formats.
This class contains public static methods for reading and parsing mesh information from files of different format.
GeomObject
Constructor Summary | |
---|---|
MeshFileReader()
|
Method Summary | |
---|---|
private static boolean |
FaceSeenBefore(int[] triangleVert,
java.util.Map<java.lang.String,java.lang.Integer> fcMap,
StringWrapper fcMapKey)
|
static TriangulatedObject |
ReadANSFile(java.lang.String fileName,
OutputPanel outPanel,
javax.swing.JProgressBar progressBar)
Read a .ans ANSYS generated file. The file contains header lines in the beginning, followed by a vertex definition block which is followed by a cell definition block. |
static TriangulatedObject |
ReadCFEVFile(java.lang.String fileName,
OutputPanel outPanel,
javax.swing.JProgressBar progressBar)
Parse the file having cell, face, edge, vertex info. |
static TriangulatedObject |
ReadDatFile(java.lang.String fileName,
OutputPanel outPanel,
javax.swing.JProgressBar progressBar)
Parse the file having cell, face, edge, vertex info. |
static TriangulatedObject |
ReadGeomViewFile(java.lang.String fileName,
OutputPanel outPanel,
javax.swing.JProgressBar progressBar)
Read a geom view file. |
static TriangulatedObject |
ReadGTSFile(java.lang.String fileName,
OutputPanel outPanel,
javax.swing.JProgressBar progressBar)
Parse a GTS file and form an object. |
static TriangulatedObject |
ReadPLYFile(java.lang.String fileName,
OutputPanel outPanel,
javax.swing.JProgressBar progressBar)
Read a .ply data file. The data file containes header lines in the beginning, until the line "end_header" appears. |
static TriangulatedObject |
ReadPMeshFile(java.lang.String fileName,
OutputPanel outPanel,
javax.swing.JProgressBar progressBar)
Parse a PMesh file and form an object. PMesh is a file format used at the vision group at University of Edinburgh. These files have a .obj extension. This file format is as follows: First line contains an optional comment, beginning with #pmesh Next, the vertices are specified as v coord_x coord_y coord_z Next the faces are specified as f int_1 int_2 int_3 int_4 ... |
static TriangulatedObject |
ReadVRMLFile(java.lang.String fileName,
OutputPanel outPanel,
javax.swing.JProgressBar progressBar)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MeshFileReader()
Method Detail |
---|
public static TriangulatedObject ReadPMeshFile(java.lang.String fileName, OutputPanel outPanel, javax.swing.JProgressBar progressBar) throws java.io.FileNotFoundException, java.io.IOException
fileName
- Name of file.outPanel
- output panel for writing messagesprogressBar
- for indicating progress of file-reading
java.io.FileNotFoundException
java.io.IOException
TriangulatedObject
public static TriangulatedObject ReadGeomViewFile(java.lang.String fileName, OutputPanel outPanel, javax.swing.JProgressBar progressBar) throws java.io.FileNotFoundException, java.io.IOException
fileName
- Name of file.outPanel
- output panel for writing messagesprogressBar
- for indicating progress of file-reading
java.io.FileNotFoundException
java.io.IOException
public static TriangulatedObject ReadANSFile(java.lang.String fileName, OutputPanel outPanel, javax.swing.JProgressBar progressBar) throws java.io.FileNotFoundException, java.io.IOException
N,vertex_number,vert_x,vert_y,vert_z
EN,cell_number,cell_vert_1,cell_vert_2,...,cell_vert_n
The cells can be tetrahedron, cube, or hexahedron. Currently
this file reader supports only terahedron elements. Faces
of this tetrahedron can be inferred (4 triplets).
fileName
- Name of file.outPanel
- output panel for writing messagesprogressBar
- for indicating progress of file-reading
java.io.FileNotFoundException
java.io.IOException
public static TriangulatedObject ReadPLYFile(java.lang.String fileName, OutputPanel outPanel, javax.swing.JProgressBar progressBar) throws java.io.FileNotFoundException, java.io.IOException
fileName
- Name of file.outPanel
- output panel for writing messagesprogressBar
- for indicating progress of file-reading
java.io.FileNotFoundException
java.io.IOException
public static TriangulatedObject ReadVRMLFile(java.lang.String fileName, OutputPanel outPanel, javax.swing.JProgressBar progressBar) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
java.io.IOException
public static TriangulatedObject ReadDatFile(java.lang.String fileName, OutputPanel outPanel, javax.swing.JProgressBar progressBar) throws java.io.FileNotFoundException, java.io.IOException
fileName
- Name of file.outPanel
- output panel for writing messagesprogressBar
- for indicating progress of file-reading
java.io.FileNotFoundException
java.io.IOException
public static TriangulatedObject ReadGTSFile(java.lang.String fileName, OutputPanel outPanel, javax.swing.JProgressBar progressBar) throws java.io.FileNotFoundException, java.io.IOException
The first line contains three unsigned integers separated by spaces. The first integer is the number of vertices (let us denote it by nv), the second is the number of edges, ne, and the third is the number of faces, nf. The following nv lines contain the x, y and z coordinates for each of the nv vertices. The next ne lines contain the two indices (starting from 1) of the vertices forming an edge. The third part of the file contains nf lines with ordered (clockwise or anticlockwise, but vertices must be contiguous in face) indices (also starting from 1) of the edges for each of the faces.
int_num_vertices int_num_edges int_num_faces
fileName
- Name of file.outPanel
- output panel for writing messagesprogressBar
- for indicating progress of file-reading
java.io.FileNotFoundException
java.io.IOException
public static TriangulatedObject ReadCFEVFile(java.lang.String fileName, OutputPanel outPanel, javax.swing.JProgressBar progressBar) throws java.io.FileNotFoundException, java.io.IOException
fileName
- Name of file.outPanel
- output panel for writing messagesprogressBar
- for indicating progress of file-reading
java.io.FileNotFoundException
java.io.IOException
private static boolean FaceSeenBefore(int[] triangleVert, java.util.Map<java.lang.String,java.lang.Integer> fcMap, StringWrapper fcMapKey)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |