Extrude a 2D mesh to 3D¶
This example shows how to extrude a 2D mesh to 3D. This can be helpful for closed laboratory geometries for example. If you are looking for more flexible ways to create 3D meshes, have a look at TetGen and Gmsh.
import numpy as np import pygimli as pg import pygimli.meshtools as mt
We start by generating a 2D mesh.
(<matplotlib.axes._subplots.AxesSubplot object at 0x7f98bcfddbe0>, <matplotlib.colorbar.Colorbar object at 0x7f98d3b8e3c8>)
We now extrude this mesh to 3D given a z vector.
<PIL.Image.Image image mode=RGB size=2048x1536 at 0x7F98B8DF7160> (<pyvista.plotting.plotting.Plotter object at 0x7f98b8f50be0>, None)