I would like to use pygalmesh (a Python frontend to CGALs mesh generation capabilities) to perform boolean operations on a custom domain. The website gives an example for defining custom domains by using custom level set functions here (another one can be found here).
What I need is a function to generate a domain from a list of vertices and respective edges.
Any hints/ideas are appreciated.
Thanks
Package author here.
What I need is a function to generate a domain from a list of vertices and respective edges.
pygalmesh is not suited for the task. It can create meshes only from three-dimensional geometries that are described by (a combination of) level-set functions.
If you only have vertices, it isn't entirely clear what the corresponding domain should be. Perhaps the convex hull of that domain? Also, edges don't do much in 3D.
If you have the surface of your domain given by points and facets, pygalmesh can fill in the volume via
import pygalmesh
mesh = pygalmesh.generate_volume_mesh_from_surface_mesh(
"elephant.vtu",
facet_angle=25.0,
facet_size=0.15,
facet_distance=0.008,
cell_radius_edge_ratio=3.0,
verbose=False
)