pygalmesh icon indicating copy to clipboard operation
pygalmesh copied to clipboard

Cylinder geometry fails to mesh

Open mark-dostalik opened this issue 3 years ago • 1 comments

The following minimal code example:

import pygalmesh

cylinder = pygalmesh.Cylinder(-1, 1, 0.7, 0.1)
mesh = pygalmesh.generate_mesh(cylinder)

fails with:

File "/home/username/.local/lib/python3.9/site-packages/pygalmesh/main.py", line 107, in generate_mesh
    _generate_mesh(
RuntimeError: CGAL ERROR: assertion violation!
File: /usr/include/CGAL/Mesh_3/Protect_edges_sizing_field.h
Line: 453
Explanation: Error: the sizing field is null at point (0.69999999999999996 0 -1)

mark-dostalik avatar Nov 09 '21 13:11 mark-dostalik

Thanks for the report. You'll have to set

max_edge_size_at_feature_edges=0.4

Fixing this is too hard without better criteria setting in CGAL, see https://github.com/CGAL/cgal/issues/5044.

nschloe avatar Nov 27 '21 18:11 nschloe