TRIGED Version 2.1r

Authors: William M. Chan and Shishir A. Pandya

Usage:

      triged

Description:

The triged program is a menu driven program to perform many operations on surface triangulations. Input files can be in CART3D tri, triq, FAST(.fst), UCD(.ucd), or STL(.stl) formats. The tri, triq, and FAST files can be formatted or unformatted, while the UCD and STL files must be formatted. The triq files output by overint are also accepted as input. Output files can be in CART3D tri, extended tri, triq, FAST(.fst), or tecplot formats, and can be either Fortran unformatted or formatted. Tecplot output is always ascii. Choose 0 at the end of execution for unformatted, 1 for formatted and 38 for tecplot. The code will figure out the tri, fst, or triq formats based on the file extension. Since ASCII tecplot extensions are generally .dat and that can have other meanings, FFIO library uses 38 to identify tecplot files. Menu options include:
  0 = Switch between different triangulation formats (CART3D/FAST)
  1 = Report bounding box and edge length statistics for triangulation
  2 = Swap edge for two adjacent faces
  3 = Get triangle info
  4 = Get vertex info
  5 = Reverse vertex direction for one or more faces
  6 = Scale and translate
  7 = Mirror about x,y,or z=0
  8 = Rotate about x, y, z or any arbitrary axis
  9 = Remove duplicated vertices up to given tolerance
 10 = Remove unused vertices
 11 = Extract faces on one side of Cartesian plane
 12 = Extract faces belonging to a set of components
 13 = Assign different face tags to different regions based on
      disjointedness and sharp edge criteria
 14 = Remove logically zero-length edges
 15 = Remove one or more faces
 16 = Insert one or more vertices
 17 = Add a face by connecting existing vertices
 18 = Break a face at the centroid to form 3 faces
 19 = Remove all triangles with area less than tol
 20 = Remove all edges with length less than tol
 21 = Extract a single vertex and write to PLOT3D file called extractedVert.dat
 22 = ID open edges and report total count and triangles
 23 = Fix normals if they are not consistent
 24 = Get a list of component numbers
 25 = Change face tags
 26 = Get Q from a different triq file with the same number of vertices/faces.
      This can be used to replace Qs from 1 triq file with another triq file
      that has the same number of vertices, OR
      it can be used to add Qs to a tri file.
 27 = Perturb vertices by specified distance along vertex surface normal.
 30 = Diff the X, Y, Z of two triangulations (Vertices in 1st triangulation are
      projected to the surface of the 2nd triangulation. The output triq file
      contains 4 scalars:
      q1 = distance moved by vertex in 1st triangulation
      q2 = x-component of vertex displacement vector in 1st triangulation
      q3 = y-component of vertex displacement vector in 1st triangulation
      q4 = z-component of vertex displacement vector in 1st triangulation
 31 = Diff the Qs of two triq files with identical triangulations
      The output triq file contains (Comparison Q - Original Q).
      Number of Qs is equal to the smaller number of Qs in the two triq files.
 32 = Diff the Qs of two triq files with different triangulations
      Vertices in the original triangulation are projected to the comparison surface.
      New Q values are interpolated from comparison Qs to obtain a Q at interpolated point.
      The output triq file contains (New Q - Original Q) + projection distance at every vertex.
      Therefore, the number of Qs is equal to the smaller number of Qs in the two triq files + 1.

File formats

The input file format is detected by the code automatically. The input file must carry the approapriate extension in its name. This includes:
     .tri  : Cart3D triangulation (both original and extended formats).
     .triq : Cart3D triangulation with appended Q variables.
     .fst  : FAST format triangulaiton.
     .ucd  : UCD format triangulation.
     .stl  : STL triangulation.
     .fro  : FRO surface triangulaiton.
UCD, STL, and FRO triangulations are assumed to be ASCII. Single precision, and 3D are assumed for all triangulations. For the Cart3D and FAST triangulation formats, the code automatically detects if the file is:
     Ascii/Unformatted.
     Little/Big Endian for unformatted files.
On output, the user can choose between:
     Ascii/Unformatted.
     tri/triq or tecplot.
Tecplot files are written in Ascii only. The output file format follows the endian of the input file.
Last modified: Mon Nov 17 13:55:00 PST 2025