7 Replies Latest reply on Feb 10, 2011 10:59 AM by John Summers

    Solid body creates STL with holes

    Erica Carnrite
      I have a combination of surfaces in Solidworks which are completely knitted together to form a solid body. When I export this solid body as an STL for rapid prototyping, it is not watertight. What is going on?
        • Re: Solid body creates STL with holes
          Mike Harvey

          Hi Erica,


          Sorry to be so late in replying, only just found your question while looking for something else.  I see this all the time, not always sure why it happens on some parts and not others but consider this.  When converting from a CAD model to a mesh the software is effectively wrapping your nice smooth geometry in something akin to chicken wire, you can adjust how fine the mesh is but at the cost of file size and small complex details will often defeat all but the finest resolution settings.  My advice would be to try tweaking the settings on the stl export options and see how they affect the output file but also not to worry too much about small holes.  RP software can usually repair small holes quickly and easily to leave a buildable part so the odd flaw is not actually that big a problem.

            • Re: Solid body creates STL with holes
              Scott Lake

              I have this problem as well.  RP software sometimes can help (I have Materialise Magics software), but sometimes the hole repair goes all wonky.


              I use the .stl files as input files in another CAD package that deals with modeling of custom-fit earpieces for hearing aids.  That particular software does not like 'efficient' .stl files; that is, it would rather see .stl files which have nearly identical triangle sizes; rather than the typical assortment of triangles where large flat surfaces can be represented by few triangles, and curvature represented by many triangles.


              What is curious about SW is that if you try to import the faulty, non-watertight .stl file back into SW and run import diagnostics, it does not detect the holes in the .stl file.


              SW is 'blind' to this problem.


              Also related:  Sometimes SW's export to .stl file will not treat a SW solid, as a solid, but create multiple bodies in the .stl export, even if you ensure the option to consider it as one body is checked.


              It seems like there's some work that DSS needs to do on the export to .stl function.  Where are the official wish-lists for SW?

                • Re: Solid body creates STL with holes
                  Charles Culp



                  SolidWorks cannot import complex STL files natively; which is probably why import diagnostics didn't show any errors. It probably didn't check anything, because there aren't any solid bodies to check?


                  You can also use Meshlab to refine STL files, but if it comes in as multiple bodies, I don't know if it can combine them. I know it can fix watertightness issues. It is open source and free software.

                    • Re: Solid body creates STL with holes
                      Scott Lake



                      Thanks for the Meshlab tip.  I'm going to give it a try.


                      BTW, the .stl I'm trying to import that was generated by SW's export feature is a very simple shape.  A circular cylinder, upon which another circular cylinder is built, upon which a cone rests on top.


                      I created it by simply rotating the profile about the axis of the long side of the profile.


                      I just wish that the export function in SW allowed for:  1.  Watertight export.  2.  Ability to control how the surface is meshed so that the triangles are fairly uniform in size and of equilateral shape.



                    • Re: Solid body creates STL with holes
                      Mike Harvey

                      Hi Scott,


                      Re: "Sometimes the hole repair goes all wonky." when using Magics to repair meshes.


                      Sadly the auto repair option is not foolproof, some repairs as you rightly point out can ruin the part totally.  From hard won experience (I often get to process 5-10 files a day) the best plan of action is to analyse the imported file using the Part Fixing Information tab.  Then, assuming there are problems to fix, rather than trusting Magics to do all the work select the shells that you need, invert the selection - and delete everything else!  Check visually that your part still looks OK then set about fixing the (Hopefully) few problems that remain.  Firstly try stitching from the Basic menu, this will heal any small gaps, then manually fill any small holes using the Holes menu, lastly, if any problems remain you can delete and replace individual triangles to repair tricky areas.  Check visually at every stage that nothing unexpected has happened then when the last of the yellow lines have vanished from your screen check the part fixing analysis one more time.  If all is well you should see a line of "0"s in all the fault boxes and (Hopefully) just one fault free shell remaining.  www.amalgam-prototypes.co.uk