This is a rewrite of the great java Heightmap2STL project. It can convert a heightmap to stl triangles. For a full cli there is another repository here.