On Ubuntu EMC box, install: libgts - GNU Triangulated Surface Library -- runtime environment :: This gives stl2gts tool. use stdin and stdout to call it. also provides gtscheck tool which can be used for sanity checking.