Skip to content

Commit 152b0f4

Browse files
committed
- [BUG] Revert code to this morning
1 parent f6e092c commit 152b0f4

File tree

4 files changed

+421
-421
lines changed

4 files changed

+421
-421
lines changed

docs/source/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
pyvista.rcParams['window_size'] = np.array([1024, 768]) * 2
2626

2727
# Save figures in specified directory
28-
#pyvista.FIGURE_PATH = os.path.join(os.path.abspath('./images/'), 'auto-generated/')
28+
pyvista.FIGURE_PATH = os.path.join(os.path.abspath('./images/'), 'auto-generated/')
2929

30-
# if not os.path.exists(pyvista.FIGURE_PATH):
31-
# os.makedirs(pyvista.FIGURE_PATH)
30+
if not os.path.exists(pyvista.FIGURE_PATH):
31+
os.makedirs(pyvista.FIGURE_PATH)
3232

3333
sys.path.insert(0, os.path.abspath('.'))
3434

examples/examples/gempy_model.py

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -33,53 +33,53 @@
3333
mesh = ss.visualization.to_pyvista_mesh(obj)
3434
ss.visualization.pv_plot([mesh])
3535

36-
#
37-
# # %% md
38-
# # Four Layers
39-
# # -----------
40-
#
41-
# # Pull gempy model
42-
# model_files_2 = pooch.retrieve(
43-
# url="https://github.com/cgre-aachen/gempy_data/raw/master/data/gempy_models/Kim.zip",
44-
# known_hash="f530a88351ed0e38673c6937161c59a2f69df92202e14c1e5d5729ed5d72a323",
45-
# processor=pooch.Unzip()
46-
# )
47-
#
48-
# # %% md
49-
# # Triangular meshes
50-
# # +++++++++++++++++
51-
#
52-
# # %%
53-
# fname, = [i for i in model_files_2 if "meshes.nc" in i]
54-
# gempy_tri_mesh_unstruct = ss.reader.read_netcdf.read_unstruct(fname)
55-
# tri_surf = ss.TriSurf(gempy_tri_mesh_unstruct)
56-
# mesh = ss.visualization.to_pyvista_mesh(tri_surf)
57-
# ss.visualization.pv_plot([mesh])
58-
#
59-
# # %% md
60-
# # Regular grid
61-
# # ++++++++++++
62-
#
63-
# fname, = [i for i in model_files_2 if "regular_grid.nc" in i]
64-
# gempy_struct = ss.reader.read_netcdf.read_struct(fname)
65-
# regular_grid = ss.StructuredGrid(gempy_struct)
66-
#
67-
# # %%
68-
# pyvista_mesh = ss.visualization.to_pyvista_grid(regular_grid,
69-
# data_set_name='property_matrix',
70-
# attribute_slice={'Properties': 'id'}
71-
# )
72-
#
73-
# ss.visualization.pv_plot([pyvista_mesh])
74-
#
75-
#
76-
#
77-
#
78-
# # %%
79-
#
80-
# pyvista_mesh = ss.visualization.to_pyvista_grid(regular_grid,
81-
# data_set_name='block_matrix',
82-
# attribute_slice={'Properties': 'id',
83-
# 'Features': 'Default series'})
84-
#
85-
# ss.visualization.pv_plot([pyvista_mesh])
36+
37+
# %% md
38+
# Four Layers
39+
# -----------
40+
41+
# Pull gempy model
42+
model_files_2 = pooch.retrieve(
43+
url="https://github.com/cgre-aachen/gempy_data/raw/master/data/gempy_models/Kim.zip",
44+
known_hash="f530a88351ed0e38673c6937161c59a2f69df92202e14c1e5d5729ed5d72a323",
45+
processor=pooch.Unzip()
46+
)
47+
48+
# %% md
49+
# Triangular meshes
50+
# +++++++++++++++++
51+
52+
# %%
53+
fname, = [i for i in model_files_2 if "meshes.nc" in i]
54+
gempy_tri_mesh_unstruct = ss.reader.read_netcdf.read_unstruct(fname)
55+
tri_surf = ss.TriSurf(gempy_tri_mesh_unstruct)
56+
mesh = ss.visualization.to_pyvista_mesh(tri_surf)
57+
ss.visualization.pv_plot([mesh])
58+
59+
# %% md
60+
# Regular grid
61+
# ++++++++++++
62+
63+
fname, = [i for i in model_files_2 if "regular_grid.nc" in i]
64+
gempy_struct = ss.reader.read_netcdf.read_struct(fname)
65+
regular_grid = ss.StructuredGrid(gempy_struct)
66+
67+
# %%
68+
pyvista_mesh = ss.visualization.to_pyvista_grid(regular_grid,
69+
data_set_name='property_matrix',
70+
attribute_slice={'Properties': 'id'}
71+
)
72+
73+
ss.visualization.pv_plot([pyvista_mesh])
74+
75+
76+
77+
78+
# %%
79+
80+
pyvista_mesh = ss.visualization.to_pyvista_grid(regular_grid,
81+
data_set_name='block_matrix',
82+
attribute_slice={'Properties': 'id',
83+
'Features': 'Default series'})
84+
85+
ss.visualization.pv_plot([pyvista_mesh])

0 commit comments

Comments
 (0)