Anyone familiar with gts format?

Discussion in 'Design and Modeling' started by 732584_deleted, Jan 26, 2015.

  1. Hello everyone,
    I've been facing problems with the stl2gts tool. I have the stl file of the required solid and it is in binary. When I try to convert it, I get the following error:
    alpha@alpha-Lenovo-IdeaPad-Z500:~$ stl2gts < aditya3.STL > aditya3.gts

    (process:4042): Gts-CRITICAL **: gts_kdtree_new: assertion 'points->len > 0' failed

    (process:4042): GLib-CRITICAL **: g_node_destroy: assertion 'root != NULL' failed

    There is a gts file created, but it is empty.
    I tried to convert it through Meshlab, but that failed as well. Meshlab crashes while trying to open the gts file it created itself.
    Any help will be greatly appreciated. Please tell me if you require the stl file.
    I'm just starting out with this forum, so if there is some other place more suited to this kind of inquiry, please inform me.
    Thank you.
    Aditya.
     

    Attached Files:

  2. mkroeker
    mkroeker Well-Known Member
    You could try loading the STL file into (free, cross-platform) netfabb studio basic (netfabb.com) - this would allow you to check (and perhaps
    repair) the STL in case it is not a proper mesh, and also to re-export it as an ASCII STL if necessary.
     
  3. The stl file seems all right. there are no holes, non-manifold vertices , non-manifold faces or overlapping faces. But for some reason, there is problem during conversion to gts. Converting to ASCII would be no use. you need it to be binary to be able to convert. Thank you for your help mkroeker.
     
  4. mkroeker
    mkroeker Well-Known Member
    Hmm. The one stl2gts.c I found on the 'net (which states that it belongs to the GNU GTS library) looks quite capable of reading both ascii and binary.
    I have now downloaded and built (standard "configure;make;make install" procedure) the latest gts lib I could find (sourceforge provides a link to a
    tarball named gts-snapshot-121130.tar.gz). With this I could reproduce your error message, so I rewrote the STL in ascii format from netfabb.
    gts conversion then still failed, but with a different error message ("expecting a number (z-coordinate)") which according to the gts faq usually means that the input file has microsoft-style CRLF line endings. dos2unix fixed that, and now the conversion produces the appended result.
     
    Last edited: Jan 26, 2015
  5. mkroeker
    mkroeker Well-Known Member
    By the way, netfabb studio basic also writes .gts files (that appear to be visually identical to the stl2gts result, but as the vertex ordering is different it is not easy to compare the actual coordinates side by side)
     
  6. Thank you very much. I was stuck on this problem for so long. I wasn't aware of the dos2unix method.
    Thanks. A lot.