TOC PREV NEXT INDEX

DVread_triangle

Synopsis

reads in triangle-oriented CAD/CAM geometry formats such as RAW, STL, SLP, and TIN

module DVread_triangle {
string+Iparam filename;
// cell data sometimes ... depends on file.
Mesh+Space3+Oparam outFld {
Tri+Cell_Data_Set cell_set[ncell_sets];
};
omethod+notify_val+notify_inst update<status=1> =
"DVread_triangle_update";
};

Description

DVread_triangle reads in files in RAW, STL, SLP or TIN format and out puts the data in a mesh.
RAW triangle files contain a sequence of triangles, each specified by a single line of text which contains the x,y,z coordinates for each of the three verticies of the triangle.

-3.52 -4.19 -5.08 -3.91 -6.21 -5.08 -3.4 -6.21 -7.01

Optionally, the lines may be preceeded by a RGB color specification,

with each color in the range 0.0 to 1.0

1.0 0.0 0.0 -3.52 -4.19 -5.08 -3.91 -6.21 -5.08 -3.4 -6.21 -7.01

A TIN file represents a Triangulated Irregular Network File. The term "TIN" gets applied to several diferent formats - this reader accepts simple format that is similar to RAW format.

Note that the TIN reader at the IAC handles a different format.

t -3.52 -4.19 -5.08 -3.91 -6.21 -5.08 -3.4 -6.21 -7.01

STL (Stereo Lithography File) and SLP (Pro/Engineer Render File) are very similar formats. Read_Triangle only reads ASCII STL files. Usually these file contain triangles, but the format allows any number of verticies per facet. This reader handles quads by simple on-the-fly

triangulation.

Input

filename

A string. Names the input file to be read.

Output

outFld

The output mesh.

Example

File

v/dv.v

See also

DVread_polygon

TOC PREV NEXT INDEX