Jdi na navigaci předmětu

3D models represented in triangular mesh

Why 3D mesh?

  • Definition of CSG might get messy
  • And it would always require a render
cuteocto mesh
cuteocto layer

3D mesh

1000px mesh overview.svg
  • 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

screen shot 2013 10 09 at 21.29.45
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
normal vector

Error - holes in mesh

  • Missing part of the surface
mesh hole
mesh hole layer

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
non manifold en
non manifold 3d

Error- Crossing facets or edges

  • Facets or edges intersects each other
intersection
intersection 3d

Other errrors

  • Zero volume shell
  • Disconected vertex or edge (not possible in STL)

Example

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

Tasks