Home      |     Contact Us      |     Users Site SEARCH:       


Creating .STL Files from Topography

This article was contributed by Jeff Burnham, P.E., Hydraulics Applications Engineer

Introduction

Final .stl generated from point cloud
Figure 1. Final .stl generated from point cloud

This article demonstrates a way to convert topographic point clouds to .stl file format using FLOW-3D’s TOPO2STL utility. The four main parts of the method are (1) pre-conditioning the point cloud to get the best results, (2) converting the cloud using TOPO2STL, (3) post-conditioning the .stl file before using it in FLOW-3D simulations, and (4) comparing the .stl file to the original point cloud for quality control. Some additional free tools are used for pre- and post-conditioning the topography.

Example Process: Rio Grande River Scale Model

The example point cloud file (Figure 2) can be downloaded from the FLOW-3D Users Site on the Tutorials page, along with a detailed exercise that expands on this note. The example topography is ground-based LiDAR of a scale model of the Middle Rio Grande River in New Mexico, built at the Colorado State University Engineering Research Center as part of a joint project of the U.S. Bureau of Reclamation and Colorado State University. The raw data was provided by Dr. Amanda Cox.

Scale model LiDAR data colored by elevation in MeshLab
Figure 2. Scale model LiDAR data colored by elevation in MeshLab

The Process

The data was first checked and pre-conditioned using the open-source free software MeshLab and CloudCompare. Pre-conditioning the point cloud included:

Pre-conditioning the point cloud makes conversion 50 – 100 times faster and gives smoother output as illustrated in Figure 5.

Unwanted points were manually removed using MeshLab
Figure 3. Unwanted points were manually removed using MeshLab

 

Empty regions were pre-filled with higher-elevation points using MeshLab
Figure 4. Empty regions were pre-filled with higher-elevation points using MeshLab

 

Pre-conditioning gives faster and better .stl output (left)
Figure 5. Pre-conditioning gives faster and better .stl output (right) than without (left)

The pre-conditioned point cloud was converted to .stl format used TOPO2STL, which comes with FLOW-3D and can be launched from the Utilities menu at the top of the interface. The spatial resolution of the conversion was set to the same resolution of the pre-sampling.

Post-conditioning the converted .stl file included:

The final step in the process was comparison of the repaired .stl file to the original point cloud with CloudCompare (Figure 6). The mean difference between .stl and point-cloud elevations was about 0.3 mm and the standard deviation of disagreement was about 3 mm.

Difference in point and .stl surface elevations: dark blue is 0 error, red is error > 1 cm.
Figure 6. Disagreement in point and .stl surface elevation: 0 error (blue) to > 1 cm (red). For two bends in the river: downstream (left) and upstream (right).

Conclusions & Summary

This Hints & Tips article described a four-part approach for converting large topographic point clouds to 3-D .stl format. Specific advice:

The methods were tested on a 15-million point river (the Middle Rio Grande scale model shown here), a 61-million point watershed (Dalalven river), and several other data sets. A detailed exercise covering all the recommended steps is available on the FLOW-3D Users Site on the Tutorials page.

^ back to top