Multiple Transient STL file Translation

This Python routine takes all STL files in a particular directory, assuming that they are all just different timesteps of the same geometry found within a single STL file, and converts these multiple transient STL files into EnSight Case format, so that they can be used as transient geometry. 

(1) The STL files are ASCII, and there is one STL file for each timestep.
(2) The STL files are named with "*.stl"
(3) The user provides the location of one of the STL files, and from that directory, the routine will attempt to convert all STL files contained within that directory.
(4) All STL files have the same number of parts (Number of parts does not change from timestep to timestep)
(5) Since there is no time information with STL, will force Time 0 = 0.0 seconds, Time 1 = 1.0 seconds, etc
#     If user needs other time information, just change the time values in the .case file
(6) STL files are all triangles (no quads)

After using the tool to convert the dataset, the user will have an "ensight_files" directory containing the converted information. The user can subsequently just load the "" file within the "ensight_files" directory directly to read the data in (there is no need to convert the data each time). The Tool writes command language back into the Journal File, so that recovery and utilization of the Journal File for scripting is still valid.

You can download the current Python User Defined Tool from our Python Exchange site here :

Any issues or problems should be reported back here, to CEI, or the author (Kevin Colburn:

Should you have slightly different data, or desire a slightly different implementation for your use, please do not hesitate to contact CEI with this request, we'd be glad to help.