Friday, 2 December 2011

Messing with Meshes (sorry a bit complex stuff)

Hello, I have been busy trying to understand terms like 2-manifold, water tightness, normals and  meshes.

More often than not, when you find or design nice looking 3d object that you'd like to print, while the object is good enough for visual viewing,  it's not for 3d-printing. Many 3d programs (including Sketchup) are not accurate on how to define the objects. And while these issues are not important on screen viewing, the manufacturing expects better qualilty and consistency.

In principle making your own 3d object is simple 3 step process:
  1. You design object at right size on 3D program and save it as .STL
  2. Using slicing program (Skeinforge, SFACT, Slic3r) generate the G-code file 
  3. Use Pronterface to upload G-code to printer and print.
But... That happens so easily only on occasion. Usually there are some problems which need to be addressed during the process. Sometimes there are problems that don't prevent printing, but will cause uncertainty of the result, other problems can prevent printing the object entirely. Other can hinder later modification of the objects.

To put it simply(*), the Skener/slicer will need and object that is 2-manifold to create printable G-code. If the STL file has any holes or other mistakes (like duplicated faces) the slicer program has to make some kind of guesswork of the most likely object the STL file is supposed to represent. Quite often this result is similar to what was intended, but there may well be some nasty surprises.

Also, while the OpenSCAD program I used to scale objects on my earlier Blog entry does import stl-objects that aren't 100% correct, it can't render them properly nor can it repair them for saving. So the OpenSCAD scaling trick works only if the original object is valid 2-manifold.

At the moment I'm trying to learn how to use MeshLab . It's quite large and complex program intended to be able evaluate, simplily and fix these kid of issues on various file formats. At the moment I can't say that I have had much success with it, but I'd expect this take some time.

(*) For nonsimply answer.. It takes a lot of university level mathematics to go trough all the details and issues of open and closed surfaces, and I'm not going into there.

1 comment:

  1. Hi Joanna, Snille here (from IRC). I can recommend you to use Netfabb Basic. It's very good to both do repairs, cleanups and fix reversed "faces" (sometimes in SketchUp faces gets turned around). You can find it here: The basic version is free, but it's not open source.
    I use this procedure:
    1. Design in SketchUp and export as STL.
    2. Automatic repair in NetFabb and export as STL again.
    3. Convert to G-Code using Pronterface (Skeinforge).
    4. Save to SD-Card and print. :)