Re: Segfault when generating a mesh from an implicit surface
The issue actually entirely comes from Mesh_3 and the
Surface_mesher never needs to be included (but it is exclusive to
'Release' mode for me). It stems from your 'Function' type alias:
using Function = double (*)(const Point_3&);
which is an alias to a function pointer. There is actually a
known bug in a mesh domain wrapper class when pointer functions
are used. This will be fixed very soon in our master branch (and
will be in the release CGAL 4.13) by the following pull request
(which will rework the API for Mesh_3 domains): https://github.com/CGAL/cgal/pull/2739.
In the meantime, you can use the type alias that we use in the
typedef double (Function)(const Point_3&);
using Function = double (const Point_3&);
Using either, the program runs just fine for me.
PS: Note that the Surface_mesher is eventually going to be
replaced by Mesh_3 (which is more developed).
On 26/05/2018 21:01, Raphael Grimm
I wanted to compare different methods to turn implicit surfaces
into a mesh.
In the attached code I compared CGAL::make_mesh_3 with
I can deactivate the code using either of these functions using
the defines at the top of the file.
If I activate only one of these functions, the executable
generates the meshes.
So far all is good.
If I activate both functions to do the conversion, the executable