Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-67552

StlGeometryLoader: Fail to load binary format STL if contains "solid" string in top of file

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.9.4, 5.10.1, 5.11.0 Beta 2
    • Fix Version/s: 5.11.0
    • Component/s: Qt3D
    • Labels:
      None
    • Environment:
      All

      Description

      Solidworks CAD application generates binary format STL which contains "solid" in top of file. Binary format STL’s header is 80 characters, and accepts any strings in there even containing "solid". But below method in defaultgeometryloader plugins checks "solid" in top of file, then calls to load Ascii format if true.
       

         bool StlGeometryLoader::doLoad(QIODevice *ioDev, const QString &subMesh)
          {
      ...
              if (!qstrncmp(signature, "solid", 5)) //<-- !!!
                  return loadAscii(ioDev);
              else
                  return loadBinary(ioDev);
       
      

        
      It should not check "solid" if binary format.
       

        Attachments

        1. stl-load-test.zip
          4 kB
          Akihito Izawa
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            akizawa Akihito Izawa
            Reporter:
            akizawa Akihito Izawa
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes