Lamina Design

Lamina Design > Reference > Input to Lamina 1.0

Lamina reads input geometry in 3D Studio Max .3ds, Wavefront .obj or Stereolithography .stl formats. Lamina can also read polygon meshes found in Rhino .3dm files. These files describe a shape as a list of triangles. In these file formats, the order of the triangles in the file is not significant. The surface is defined by the geometric connection of the triangles when adjacent triangles share an edge.

Input constraints

There are some constraints on the input triangle meshes that Lamina can handle.

One requirement is sometimes called the "vertex to vertex" rule. Any adjacent triangles must share two verticies so they connect in a water tight way. It is not acceptable for one triangle to have a vertex that is at some point along the edge of another triangle.

The order of the verticies in each triangle should be in a counter clockwise order when viewed from the outside of the object. If the right hand rule is applied to the three verticies, the resulting orientation points away from the solid object.

The triangle mesh should not intersect itself. And no edge can be shared by more than 2 triangles; a cube defined by 12 triangles is ok, but adding a diagonal baffle inside the cube is not ok. Other than this the input mesh can be an arbitrarily complex shell that might have any number of handles and may also have any number of holes in the surface.

3DM, OBJ, 3DS or STL format?

The major difference between these formats is that Rhino .3dm, 3D Studio Max .3ds and Wavefront .obj files include per vertex normals, so source objects don't appear faceted, and Lamina can better recognize where to create divisions in the source object. If your file is in another format, use Rhino3D or some other modeling software to save the object in .3dm, .obj, .3ds or .stl format. If you are using Rhino3D for modelling, it's best to convert your NURBS surfaces to polygon meshes and save the file in Rhino .3dm format.

Stereolithography STL format

There are two types of STL files, ascii and binary. Ascii format STL files are easy to create with a text editor, and are human readable. Binary STL files are more compact and load faster. These files will have an extension .stl (either ascii or binary), or .stla (ascii) or .stlb (binary).

Here is an example of an ascii STL file that describes a cube 12"x12"x12" centered on the origin. One normal is provided for each triangle, along with the coordinates of the triangle verticies.
solid
  facet normal 1.000000 0.000000 0.000000
    outer loop
      vertex 6.000000 -6.000000 -6.000000
      vertex 6.000000 6.000000 6.000000
      vertex 6.000000 -6.000000 6.000000
    endloop
  endfacet
  facet normal 1.000000 0.000000 0.000000
    outer loop
      vertex 6.000000 -6.000000 -6.000000
      vertex 6.000000 6.000000 -6.000000
      vertex 6.000000 6.000000 6.000000
    endloop
  endfacet
  facet normal -1.000000 0.000000 0.000000
    outer loop
      vertex -6.000000 -6.000000 -6.000000
      vertex -6.000000 -6.000000 6.000000
      vertex -6.000000 6.000000 6.000000
    endloop
  endfacet
  facet normal -1.000000 0.000000 0.000000
    outer loop
      vertex -6.000000 -6.000000 -6.000000
      vertex -6.000000 6.000000 6.000000
      vertex -6.000000 6.000000 -6.000000
    endloop
  endfacet
  facet normal 0.000000 1.000000 0.000000
    outer loop
      vertex -6.000000 6.000000 -6.000000
      vertex 6.000000 6.000000 6.000000
      vertex 6.000000 6.000000 -6.000000
    endloop
  endfacet
  facet normal 0.000000 1.000000 0.000000
    outer loop
      vertex -6.000000 6.000000 -6.000000
      vertex -6.000000 6.000000 6.000000
      vertex 6.000000 6.000000 6.000000
    endloop
  endfacet
  facet normal 0.000000 -1.000000 0.000000
    outer loop
      vertex -6.000000 -6.000000 -6.000000
      vertex 6.000000 -6.000000 -6.000000
      vertex 6.000000 -6.000000 6.000000
    endloop
  endfacet
  facet normal 0.000000 -1.000000 0.000000
    outer loop
      vertex -6.000000 -6.000000 -6.000000
      vertex 6.000000 -6.000000 6.000000
      vertex -6.000000 -6.000000 6.000000
    endloop
  endfacet
  facet normal 0.000000 0.000000 1.000000
    outer loop
      vertex -6.000000 -6.000000 6.000000
      vertex 6.000000 6.000000 6.000000
      vertex -6.000000 6.000000 6.000000
    endloop
  endfacet
  facet normal 0.000000 0.000000 1.000000
    outer loop
      vertex -6.000000 -6.000000 6.000000
      vertex 6.000000 -6.000000 6.000000
      vertex 6.000000 6.000000 6.000000
    endloop
  endfacet
  facet normal 0.000000 0.000000 -1.000000
    outer loop
      vertex -6.000000 -6.000000 -6.000000
      vertex -6.000000 6.000000 -6.000000
      vertex 6.000000 6.000000 -6.000000
    endloop
  endfacet
  facet normal 0.000000 0.000000 -1.000000
    outer loop
      vertex -6.000000 -6.000000 -6.000000
      vertex 6.000000 6.000000 -6.000000
      vertex 6.000000 -6.000000 -6.000000
    endloop
  endfacet
endsolid

Wavefront OBJ format

An excellent description of the Wavefront .obj file format is given here. Here is an example of an ascii Wavefront .obj file that describes a cube 12"x12"x12" centered on the origin. First a set of positions are defined with the "v" commands. Then a set of vertex normals are defined with the "vn" commands. Finally, a set of triangles are defined with the "f" commands which each describe the three corners of a triangle. The first number a specification like "2//1" selects the second vertex position, the last number selects the first normal. The vertex positions and normals are indexed starting with 1.
#
# This can be a comment
#
g object_1
v -6.000000 -6.000000 -6.000000
v 6.000000 6.000000 -6.000000
v 6.000000 -6.000000 -6.000000
v -6.000000 6.000000 -6.000000
v -6.000000 -6.000000 6.000000
v 6.000000 -6.000000 6.000000
v 6.000000 6.000000 6.000000
v -6.000000 6.000000 6.000000
vn 0.000000 0.000000 -1.000000
vn 0.000000 0.000000 1.000000
vn 0.000000 -1.000000 0.000000
vn 0.000000 1.000000 0.000000
vn -1.000000 0.000000 0.000000
vn 1.000000 0.000000 0.000000
f 1//1 2//1 3//1
f 1//1 4//1 2//1
f 5//2 6//2 7//2
f 5//2 7//2 8//2
f 1//3 6//3 5//3
f 1//3 3//3 6//3
f 4//4 8//4 7//4
f 4//4 7//4 2//4
f 1//5 8//5 4//5
f 1//5 5//5 8//5
f 3//6 2//6 7//6
f 3//6 7//6 6//6

Lamina Design > Reference > Input to Lamina 1.0