Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated block models for v2 #125

Open
wants to merge 45 commits into
base: dev
Choose a base branch
from

Conversation

Tim-Evans-Seequent
Copy link
Contributor

@Tim-Evans-Seequent Tim-Evans-Seequent commented Mar 23, 2023

Context and scope

OMF v1 only supports regular and tensor block models. This means that applications can't use it to store sub-blocked models. OMF v2 should support common regular sub-blocking schemes like those used by Deswik, Surpac, Datamine, and Vulcan as well as have room to store less common or application-specific free-form sub-blocks.

There was previous work done in this area but it was incomplete and doesn't do what we need it to do. That works is discarded by this PR.

Existing Code

In OMF v1 block models are saved using the VolumeGridGeometry class. This is a grid that can have values on block centroids or corners. Rotation was supported by directly specifying the U, V, and W direction vectors of the block model space. These directions were required to be orthogonal so skew was not supported. Positions was specified with the origin point on the ProjectElementGeometry super-class. Block spacing did not need to be regular, with arrays of offsets along those U, V, and W directions explicitly specified. A regular block model just used regularly spaced offsets.

Goals and non-goals

  1. Support regular sub-blocking with optionally merged sub-blocks.
  2. Support octree sub-blocking with the Surpac extension of unequal sizes in each direction.
  3. Support free-form sub-blocking for sub-blocks that aren't on any sort of grid inside the parent.
  4. This is not a database format. We accept and return complete arrays.
  5. Smaller files and fast import/export are nice but simplicity is preferred.
  6. Avoid the annoying parts of CSV block models, like floating point rounding.

Design

Common block model base class

The common base for block models will contain:

  • Origin point to describe the position. This is the project-space position of the minimum corner of the block model.
  • Orthogonal U, V, W vectors to describe the orientation.
  • A collection of attribute arrays.

Regular block grid

Adds a parent block size and a block count in each direction.

Tensor block grid

Adds arrays of sizes along the U, V, and W axes.

Regular sub-blocks

These sub-blocks must lie on regular a grid inside each parent block. They stored as a list of corner indices on that sub-grid. Check the documentation changes in this PR for details. Below is a 2D example of parent indices and corners for some sub-blocks:

image

These can be further restricted/documented with an octree or fully sub-blocked mode.

Free-form sub-blocks

These sub-blocks aren't restricted to any sort of grid inside the parent. They are still stored as a list of corners but the values are floating-point and range from 0.0 to 1.0 across the parent block. The positions are always relative to the parent block so there's no large offset added on making the floats less precise.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tim-Evans-Seequent can you please delete this file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants