OFF (.off, .coff)

  • Import and Export support ASCII and binary versions of the OFF file format.


    OFF 3D geometry format.
    Used for storing and exchanging 3D models.
    OFF is an acronym for Object File Format.
    Occasionally called COFF if color information is present.
    Related to NOFF and CNOFF.
    ASCII or binary format.
    Represents a single 2D or 3D object.
    Stores a collection of planar polygons with possibly shared vertices.
    Supports polygon and vertex colors and opacity specifications.

Import and ExportImport and Export

  • Import[""] imports an OFF file as a MeshRegion object representing the surface.
  • Import["",elem] imports the specified element from an OFF file.
  • The import format can be specified with Import["file","OFF"] or Import["file",{"OFF",elem,}].
  • Export["",expr] exports a 3D mesh-based geometric region to a binary OFF file. The expr can be any region that is ConstantRegionQ or a Graphics or Graphics3D object.
  • Export["",expr,{opt1->val1,}] exports expr with the specified options for the file format.
  • The export format can be specified with Export["file",expr,"OFF"] or Export["file",expr,{"OFF",opt1->val1,}].
  • See the reference pages for full general information on Import and Export.
  • ImportString and ExportString support the OFF format.


  • General Import elements:
  • "Elements"list of elements available in this file
    "Rules"list of rules for each element
    "Options"list of options and settings
    "Summary"summary of properties
    "CoordinateTransform"transformation function from OFF format
  • Data format representation elements:
  • "BinaryFormat"whether the file is a binary or ASCII OFF
    "VertexData"list of vertex coordinates
    "PolygonData"the polygon elements in indexed form
    "VertexColors"colors associated with each vertex
    "PolygonColors"face color information for each polygon
  • Geometry representation elements:
  • boundary mesh representation of the solid
    mesh representation of the surface
  • Graphics representation elements:
  • "Graphics"2D OFF file represented as a Graphics object
    "Graphics3D"3D geometry represented as a Graphics3D object
    "GraphicsComplex"OFF file as a GraphicsComplex object
    "PolygonObjects"list of Polygon primitives given in absolute coordinates


  • Export options:
  • "BinaryFormat"Truewhether to write a binary or ASCII file

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Import a 3D model from OFF as a MeshRegion object:

Click for copyable input

Summary properties of the model:

Click for copyable input

Export a 3D model to an OFF file:

Click for copyable input

Print the raw textual contents of the file:

Introduced in 2007
| Updated in 2015
Translate this page: