Crate omf

source ·
Expand description

Reader and writer for Open Mining Format version 2, a standard for mining data interchange backed by the Global Mining Guidelines Group.

Warning: This is an alpha release of OMF 2. The storage format and libraries might be changed in backward-incompatible ways and are not subject to any SLA or deprecation policy. Further, this code is unfinished and may not be secure. Don’t use it to open files you don’t trust, and don’t use it in production yet.

§What is OMF

OMF is an open-source serialization format and library to support data interchange across the entire mining community. Its goal is to standardize file formats and promote collaboration.

This repository provides a file format specification and a Rust library for reading and writing files, plus wrappers to use that library from C and Python.

§Getting Started

The Reader and Writer objects are the starting points for reading and writing files. Error is the combined error type for everything. Project is the root object of the data contained within the file, storing a list of elements, each containing some geometry and a list of attributes.

Supported element geometries are:

Supported attribute data types are:

Attributes values can be valid or null. They can be attached to different parts of each element type, such as the vertices vs. faces of a surface, or the parent blocks vs. sub-blocks of a block model.

Modules§

Structs§

  • Describes data attached to an Element.
  • Block model geometry with optional sub-blocks.
  • A container for sub-elements.
  • Defines a single “object” or “shape” within the OMF file.
  • A surface defined by a 2D grid a height on each grid vertex.
  • A set of line segments.
  • Defines the position and orientation of a 2D plane in 3D space.
  • Defines the position and orientation of a 3D sub-space.
  • Point set geometry.
  • Root object of an OMF file.
  • A surface made up of triangles.

Enums§

Constants§

Traits§

Functions§

Type Aliases§

  • RGBA color with components from 0 to 255.
  • A 3D vector with f64 components.