A partials file is an ASCII file that represents the percentages of a solid or polygon that falls within each block of a 3D block model.
This module is a read-only interface to the partials file format. This module will read a partials file for a solid (i.e. mspart.out) or a polygon (i.e. ipres.out) and provide a convenient structure that you can iterate through to do calculations. It is intended to be used in conjunction with the grail.data.model.
The following snippet illustrates how to use a Partial object in conjunction with a Model object in order to determine the total value represented by a cut.
Partial(file_path)
Partial is the top-level class. The constructor takes the partials file path as it's only argument.
Methods
getTonnage(density, cellVolume)
Returns the tonnage of the cut given the cell size and a common density. Warning: if the S.G. fluctuates from block to block, it will be more accurate to use a method similar to the example above.Attributes
name
This is the path to the file.blockList
A list of block objects (see below)colMin
The minimum column number in the block model occupied by the geometry.colMax
The maximum column number in the block model occupied by the geometry.rowMin
The minimum row number in the block model occupied by the geometry.rowMax
The maximum column number in the block model occupied by the geometry.levelMin
The minimum level number in the block model occupied by the geometry.levelMax
The minimum level number in the block model occupied by the geometry.
Block
Block is an inner-class of Partial. The Partial object contains a list of blocks. Each block object refers to one unique cell in the block model.
Attributes
level
The cell's level in the Block Model.row
The cell's row number in the Block Model.col
The cell's column number in the Block Model.pct
The percentage volume of the cell occupied by the geometry.