1 Reply Latest reply on Apr 21, 2016 8:57 AM by Chris Dordoni

    STL from scans

    Alan Thomason

      Hello all...


      I am just getting into laser scanning for the purpose of reverse engineering and have a fundamental question.  Why is the *.stl format used?  I think I understand what the format is, where there are a number of triangles, each defined by:

           a unit vector, requiring three floating point numbers.

           three points, each defined by a positive floating point number.

      That doesn't look that bad, until you really think about what you are trying to do.  If you want this to be a 'watertight' mesh, then two of the three points have to be identical to two other points which could be defined anywhere in the list.  This also means that there is a lot of redundancy.  The unit vector could be determined from the other three points, and two of those three points are in general shared with another triangle.  I can see how the triangulation would be useful for a mesh boundary (like flow analysis) but not necessarily useful or necessary for reverse engineering.


      My first attempts at laser scanning were to have a cylinder head scanned by a professional (although this was just a quick favor to see if I could use the output data) and my own attempt using a Perceptron laser scanner.  The first one was sent over as an *.stl and the second one I think I chose *.stl probably based on the first one and what I see on the internet.


      In both cases, the files took an extremely long time to load, both being over 1million triangles. I tried 'decimating' in the scanner software but the resultant surface was so coarse as to be visually unusable.  Every time I bring up over 1E6 triangles, I am told how unusual that is.  Having little experience in this, I'm not sure.  If I load the file into Python/Numpy as an array it happens so fast that you are left wondering if you typed in the right program name (a technical description of about 1sec).


      When I try to bring the cylinder head file into SolidWorks, I am told there are topographical errors.    I am assuming that either the resultant unit vector orientations don't match between adjacent triangles or the points themselves don't match.  If this was a pure point cloud, there wouldn't be any possibility of any error as long as the number could be input.


      For reverse engineering, my goal is simply to determine where the surfaces are so that I can make sure that the geometry that I design in parametrically matches the original product.  All I need for that is points.  The following quote from Jeffrey Mather (thanks Jeffrey) in a recent forum entry is the first I have seen that goes into whether or not stl might be the right choice..."In general - stl is a poor format for using in an MCAD software.  I didn't want to hijack that thread, so after that long winded introduction my question is, "Is there a better format than *.STL for data transfer between the laser scanner and SolidWorks for reverse engineering".  Besides answering the specific question, any elaboration on the subject would be appreciated.


      Thanks in advance

        • Re: STL from scans
          Chris Dordoni

          If you have SolidWorks Standard, STL is the best choice for scanned data.
          With Premium or Professional, you have the Scan to 3D add in, and there are some additional formats available for import. I don't have Scan to 3D since I am on Standard, its possible another format would be a better choice with Scan to 3D.


          Without Scan to 3D, importing an STL will be limited to about 15,000 triangles as a Solid Body, slightly more as a Surface Body. Importing as a Graphics Body will allow millions of triangles, but then its limited to using as a visual reference only (you can't extract any geometry, sketches or sections).


          The comment about STL being a poor format I believe is referring to working with existing CAD models. Using a nurbs based format like STP, Parasolid, IGS to transfer data maintains the surface information, so a curved surface is infinitely smooth. An STL of the same curved surface would be a sampling of the curve.