Converting STL to TRI

Although STL files have their weaknesses, it is sometimes useful to use them as an intermediary between VSP and Cart3D.

Cart3D comes with the 'stl2tri.pl' script which automates the process of converting a STL file to a TRI file. This script relies on the admesh program to infer the mesh connectivity and to fix any small problems with the mesh topology or geometry.

Admesh is an open source program which is not distributed with Cart3D or OpenVSP. You must download, compile, and install it separately to use 'stl2tri.pl'. Go to the admesh web site to obtain the admesh source code.

To convert a STL file using 'stl2tri.pl', type the following command.

stl2tri.pl infile.stl outfile.a.tri

This will create the following files:

  1. outfile.a.tri
    • Cart3D TRI file, without any component number tags. This is a component file in the Cart3D documentation.
  2. infile.off
    • Intermediate triangulated surface file.
  3. infile.comp.tri
    • Cart3D TRI file, including component number tags. This is a configuration file in the Cart3D documentation.
    • This is the file which represents the geometry for the Cart3D analysis.
    • Copy this file to 'Components.i.tri' for analysis.

Next Steps

Once the STL file has been converted and the mesh file has been re-named to 'Components.i.tri', continue to the Cart3D Setup Tutorial.

Or, feel free to jump to your topic of choice.

  1. STL to TRI Conversion (This Page)