Class STLWriter

java.lang.Object
toxi.geom.mesh.STLWriter

public class STLWriter extends Object
A simple, but flexible and memory efficient exporter for binary STL files. Custom color support is implemented via the STLcolorModel interface and the exporter comes with the 2 most common format variations defined by the DEFAULT and MATERIALISE constants. The minimal design of this exporter means it does not build an extra list of faces in RAM and so is able to easily export models with millions of faces. http://en.wikipedia.org/wiki/STL_(file_format)
  • Field Details

  • Constructor Details

    • STLWriter

      public STLWriter()
    • STLWriter

      public STLWriter(STLColorModel cm, int bufSize)
  • Method Details

    • beginSave

      public void beginSave(OutputStream stream, int numFaces)
    • beginSave

      public void beginSave(String fn, int numFaces)
    • endSave

      public void endSave()
    • face

      public void face(Vec3D a, Vec3D b, Vec3D c)
    • face

      public void face(Vec3D a, Vec3D b, Vec3D c, int rgb)
    • face

      public void face(Vec3D a, Vec3D b, Vec3D c, Vec3D normal, int rgb)
    • setScale

      public void setScale(float s)
    • setScale

      public void setScale(Vec3D s)
    • useInvertedNormals

      public void useInvertedNormals(boolean state)