Note
Go to the end to download the full example code.
Icosahedron geometry example#
Icosahedron geometry example.
from __future__ import annotations
import pyvista as pv
import skgmsh as sg
edge_source = pv.Icosahedron()
edge_source.merge(pv.PolyData(edge_source.points), merge_points=True, inplace=True)
edge_source.plot(show_edges=True, color="white")

Generate the mesh.
delaunay_3d = sg.Delaunay3D(edge_source)
delaunay_3d.mesh.shrink(0.9).plot(show_edges=True, color="white")

Total running time of the script: (0 minutes 1.398 seconds)