Closed truenicoco closed 3 years ago
No idea either. Let me know when you find anything. (Their mailing lists and bug trackers are usually very responsive.)
Closing for lack of response. Feel free to reopen at any time.
Late answer, because I was not subscribed to pygalmesh
before.
@truenicoco The python function named generate_from_array
calls the function generate_from_inr
from file pygalmesh/src/generate_from_inr.cpp
. In that function, there is that C++ code:
C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(
cgal_domain,
criteria,
lloyd ? CGAL::parameters::lloyd() : CGAL::parameters::no_lloyd(),
odt ? CGAL::parameters::odt() : CGAL::parameters::no_odt(),
perturb ? CGAL::parameters::perturb() : CGAL::parameters::no_perturb(),
exude ? CGAL::parameters::exude() : CGAL::parameters::no_exude()
);
See the call to CGAL::parameters::exude()
, documented here. That C++ function actually has two parameters: one to define a time limit, and another one for a bound on the dihedral angle of slivers. The default parameters are documented here in the documentation of make_mesh_3
: the time limit is set to the measured time of the mesh refinement step of the algorithm.
Note that, whatever parameter you pass, that function is best effort: just using our sliver exudation algorithm (implemented from the algorithm of the article "Siu-Wing Cheng, Tamal K. Dey, Herbert Edelsbrunner, Michael A. Facello, and Shang-Hua Teng. Sliver exudation. J. ACM, 47(5):883–904, 2000") will not be enough to remove all slivers in all configurations. Our best algorithm to remove slivers is the sliver perturber, that is slower in most cases.
Here I refer to the documentation of CGAL-5.3. Depending on which CGAL version was used to compile your version of pygalmesh
, details might differ.
Thanks Laurent for the reply! I should probably expose time_limit to Python. Is the exude time the only relevant limit here? What's the default?
Thanks Laurent for the reply! I should probably expose time_limit to Python. Is the exude time the only relevant limit here? What's the default?
As I said:
The default parameters are documented here in the documentation of
make_mesh_3
: the time limit is set to the measured time of the mesh refinement step of the algorithm.
So, the default behavior, without parameter, is to spend as much time on sliver exudation as the algorithm spent on the mesh generation. That is a heuristic we chose, long ago.
And another "default": if you pass 0
as the time limit, it means "no limit", and the algorithm will exhaust its internal priority queue without any time limit.
It's all exposed now via exude_time_limit
and exude_sliver_bound
.
First of all, thanks for this great project which makes CGAL usable for C++ allergic people like me.
Using
generate_from_array
, the exuding phase of the mesh optimization process always stops because ofTIME_LIMIT_REACHED
, outputting a mesh with slivers. I don't mind letting it run as long as possible, so is there a simple way to set this limit higher? I am trying to find my way through CGAL's docs and code, but it is not easy…