parq_blockmodel.mesh.ply.write_ply

Contents

parq_blockmodel.mesh.ply.write_ply#

parq_blockmodel.mesh.ply.write_ply(mesh, output_path, binary=False)[source]#

Write a TriangleMesh to a PLY file.

The PLY file will contain: - Vertex coordinates (x, y, z) - Optional per-vertex attributes (grade, density, rock_type, etc.) - Vertex ijk indices (if available) - Face connectivity (as vertex_indices) - Optional per-face attributes - Metadata in comments and custom properties

Parameters:
  • mesh (TriangleMesh) – The mesh to write.

  • output_path (str or Path) – Path to the output PLY file.

  • binary (bool, default False) – If True, write in binary format. If False, write ASCII.

Raises:

ValueError – If the mesh is invalid or contains unsupported attribute types.

Return type:

None