PLY (.ply)

Background & Context

    • 3D geometry format.
    • ASCII or binary format.
    • Used for storage and interchange of 3D graphical objects.
    • Known as Stanford Triangle Format.
    • PLY is an acronym derived from polygon.
    • Stores a 3D object as a collection of line and polygon primitives and their properties.
    • Allows user-defined format elements.

Import & Export

Import Elements

  • General Import elements:
  • "Elements" list of elements and options available in this file
    "Summary"summary of the file
    "Rules"list of rules for all available elements
  • Data format representation elements:
  • "BinaryFormat"whether the file is a binary or ASCII PLY
    "Comments"comments
    "VertexData"list of vertex coordinates
    "PolygonData"the polygon elements in indexed form
    "UserExtensions"user-defined data associated with polygon vertices
  • Geometry representation elements:
  • "BoundaryMeshRegion"boundary mesh representation of a solid
    "MeshRegion"mesh representation of a surface
  • Graphics representation elements:
  • "Graphics3D"PLY file represented as a Graphics3D object
    "GraphicsComplex"PLY file as a GraphicsComplex object
    "PolygonObjects"list of polygon primitives given in absolute coordinates
  • Import and Export use the "MeshRegion" element by default for PLY files.

Options

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

Examples

open allclose all

Basic Examples  (2)

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

Summary properties of the model:

Export a 3D model to a PLY file:

Print the raw textual contents of the file:

Scope  (13)

Import  (7)

Import works on an ASCII PLY file:

Binary PLY file:

Any accessible URL:

Stream:

Import automatically detects PLY files:

Import provides access to elements in the PLY file:

Import works on large files:

Export  (6)

Export works on 3D graphics:

Special regions:

Formula regions:

Mesh regions:

Export to ASCII PLY file:

Binary PLY file:

Import Elements  (11)

"BinaryFormat"  (1)

Test whether this file is a binary or ASCII PLY:

"BoundaryMeshRegion"  (1)

Give a boundary mesh region:

"Comments"  (1)

Comments to be embedded in the file:

"CoordinateTransform"  (1)

Give the transformation function from the coordinate system used by the PLY format to the coordinate system used in Wolfram Language:

"Graphics3D"  (1)

Give the Graphics3D object:

"GraphicsComplex"  (1)

Give the GraphicsComplex object:

"MeshRegion"  (1)

Give a mesh region:

"PolygonData"  (1)

Give the polygon elements in indexed form:

"PolygonObjects"  (1)

Give the list of Polygon primitives given in absolute coordinates:

"Summary"  (1)

Give the summary of properties:

File size:

"UserExtensions"  (1)

Names of user-defined data fields:

Export Options  (2)

By default, an ASCII file is generated when exporting:

Print the raw textual contents of the file:

Use "BinaryFormat" True to generate a binary file:

Print the raw textual contents of the file: