Skip to content

Small command-line tool to generate a Tecplot colormap file from a text file of non-dimensional RGB values. Written in Rust; binaries for Linux/WSL and Windows available.

License

Notifications You must be signed in to change notification settings

mlau154/teccmap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Teccmap

teccmap is a small command-line tool written in Rust that is used to convert from a text file with space-delimited non-dimensional RGB values to the .map format required by Tecplot. Assuming that the executable has been added to the system path (more on this below), teccmap can be run from either Linux or Windows using

.\teccmap "path/to/txt_file.txt" "path/to/output_file.map" "name displayed in tecplot" <num_points>

The first argument is either a relative or absolute path to a text file containing non-dimensional RGB values. The contents of the text file should look like

0.0 0.5 0.3
0.2 0.88 0.135
0.5 0.23 0.66
0.8 0.3 1.0
1.0 0.6 0.55

where each row is a space-delimited vector of RGB values scaled between 0.0 and 1.0. The second argument is a relative or absolute path to the output name of the .map file that will be imported into Tecplot. Note that the quotes are only required for the first two arguments if there are spaces in the path. The third argument is the name as shown in the Tecplot contour colormap dropdown menu. This argument must be surrounded by quotes if there are spaces.

The fourth argument is the number of points that will be extracted from the text file using a linear spacing. Tecplot requires this value to be between 2 and 50, inclusive. Using the example RGB values shown above, a value of 3 would use the first, third, and fifth points.

Import into Tecplot

Once the .map file is successfully generated, simply click on the "gear" icon in the "Contour" dialog of Tecplot and click the "import" option. Alternatively, the map can be added to the Tecplot config file.

Installation

For a simple installation, first download the executable from

  • Windows: target/x86_64-pc-windows-gnu/release/teccmap.exe
  • Linux/WSL: target/release/teccmap

Then, place the executable in any location (e.g., a "Documents" or "Programs" folder) and add this folder to the system path. To do this:

If you would prefer not to add the executable to the path, just replace ./teccmap with the absolute path to the executable.

For an installation that can utilize updates from the Git repository, navigate in the terminal to a "Documents" or "Programs" folder and run git clone https://github.com/mlau154/teccmap.git. You may have to install Git on Windows if you have never used it before. Then add the directory containing the executable for your operating system (e.g., C:/Users/<user-name>/Programs/teccmap/target/x86_64-pc-windows-gnu/release for Windows or $HOME/Programs/teccmap/release for Linux/WSL) to the system path using the instructions given above.

Dev

To build for Linux from WSL, use cargo build --profile=release. To build for Windows from WSL, use cargo build --target=x86_64-pc-windows-gnu --profile=release.

About

Small command-line tool to generate a Tecplot colormap file from a text file of non-dimensional RGB values. Written in Rust; binaries for Linux/WSL and Windows available.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages