3D models represented in triangular mesh
Why 3D mesh?
- Definition of CSG might get messy
- And it would always require a render


3D mesh

- Collection (mesh, net) of points/vertices (one vertex), edges and faces
- Faces (one facet) are usually represented as triangles, rectangles or general simple polygons
- Defines the border between inside and outside - it’s the surface of the 3D object
STL
- STL can mean STereoLitography or Standard Tessellation Language
- Created by 3D Systems (company)
- Univerzal rapid prototyping file format
- Two variantrs
- Mesh contains triangular faces represented by three vertices and a normal
STL (ASCII) syntax
- Order of facets in file can be completely random
- Order of vertices in facet follows the right hand rule
- Fingers follow the order of vertices, thumb points out of the model
solid name facet normal nx ny nz outer loop vertex v1x v1y v1z vertex v2x v2y v2z vertex v3x v3y v3z endloop endfacet endsolid name
STL (ASCII) example

solid OpenSCAD_Model facet normal -1 0 0 outer loop vertex 0 0 1 vertex 0 1 1 vertex 0 0 0 endloop endfacet ... facet normal 1 0 0 outer loop vertex 1 0 1 vertex 1 0 0 vertex 1 1 1 endloop endfacet endsolid OpenSCAD_Model
How to preview STL
- Text/hexa editor 8-)
- Meshlab (also allows to edit the mesh)
- STLView (Windows), Pleasant3D (OS X)
- netfabb Studio
- Import to Blender
- Import to OpenSCAD
- …and more
Blender
- includes tools for mesh analyzing and fixing
- can detect thin walls, overhangs – the measurement unit has to be set
- we brought you a educational DVD, to watch (>6 GB)
- for practicing stag.stl, cubes.blend
Errors in mesh/STL
- For 3D printing, we need the mesh to be valid
- Unfortunately, it is not always valid :-(
Error - normal vector
- Bogus normal vector
- What can happen: on some layers, the printer would print outside of the object and would skip the inside
- Some slicing tools can ignore it
- Normal vector should point outside of the object and should be orthogonal to the facet
- Note: In STL spec it’s marked as optional

Error - holes in mesh
- Missing part of the surface


Error - Duplicate facet, vertex
- Duplicate facet
- Duplicate vertex (not a problem in STL, all vertices are defined multiple times)
Error - 2-manifold
- An edge has less or more than 2 facets


Error- Crossing facets or edges
- Facets or edges intersects each other


Other errrors
- Zero volume shell
- Disconected vertex or edge (not possible in STL)
Example
- Example of bogus and valid mesh
Netfabb studio
- Free to use in basic edition
- Tool for fixing and editing STL (and other) mesh
- It has “manual” and automatic correction of bogus mesh
- Aligator mini to fix
- cloud service
- Good manual in PDF
- in chapter 1 good examples of mesh errors
- corrections in chapter 7