PVGeo-Examples 2.2 - omfvtk

import pyvista
import omfvista

pyvista.set_plot_theme('document')

project = omfvista.load_project('data/test_file.omf')
project
InformationBlocks
MultiBlockValues
N Blocks9
X Bounds443941.105, 447059.611
Y Bounds491941.536, 495059.859
Z Bounds2330.000, 3555.942
IndexNameType
0collarPolyData
1wolfpass_WP_assayPolyData
2TopographyUnstructuredGrid
3BasementUnstructuredGrid
4Early DioriteUnstructuredGrid
5Intermineral dioriteUnstructuredGrid
6DaciteUnstructuredGrid
7CoverUnstructuredGrid
8Block ModelRectilinearGrid
project.plot(multi_colors=True)

在這裏插入圖片描述

# Grab a few elements of interest and plot em up!
vol = project['Block Model']
assay = project['wolfpass_WP_assay']
topo = project['Topography']
dacite = project['Dacite']
vol.slice_orthogonal().plot()

在這裏插入圖片描述

threshed = vol.threshold_percent([0.25, 0.75])
threshed.plot(clim=vol.get_data_range())

在這裏插入圖片描述

# make an active plotting window
p = pyvista.Plotter()
# Add datasets
p.add_mesh(topo, cmap='gist_earth', opacity=0.5)
p.add_mesh(threshed, opacity=0.5)
p.add_mesh(assay, color='red', line_width=3)
p.add_mesh(dacite, color='yellow', opacity=0.6)
# Add the bounds axis
p.show_bounds()
# Render
p.show()

在這裏插入圖片描述

Reference

PVGeo-Examples

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章