Benjamin Kehlet reported on CGAL-discuss (Tue, 25 Mar 2014 13:45:24
+0100) that Mesh_3 was not able to mesh the simple following OFF:
OFF
4 4 0
0 0 0
0 0 1
0 1 0
1 0 0
3 3 1 2
3 0 1 3
3 0 3 2
3 0 2 1
The unit tetrahedron!!
The bug was in the robust weighted circumcenter traits. The traits
checks that the circumcenter of four points is at least in the circum
sphere of the four points. But for weighted points, that is
"power_test" that must be tested, instead of "side_of_oriented_sphere".
This branch fixes a potential bug, that the facet surface center
is sometimes not updated properly in mirror_facet(f) when it is in f.
Tested in testsuite CGAL-4.4-Ic-155
Approved by the release manager
The return type optional<tuple...> leads to the crash
One workaround had been to move the body of the function
into the class.
As the function is private I instead return through a reference instead.
This branch fixes a bug in the sliver perturber.
It introduces some new data structures to backup the metadata
stored in cells before each perturbation. This allows to
recover these data without recomputing them in case the move
is reverted.
The bug fix comes from the fact that rec-omputed values might
have been different after the move from what they were before the
move, in a tetrahedron which is the same but for which the
Cell_handle is new.
Approved by the release manager.
In CGAL-4.2 and previous, when a facet f was between finite cells c1,
and c2, with different subdomain indices, the surface patch index of f
was the pair { c1->subdomain_index(), c2->subdomain_index() }, say the
pair (1, 2). Since CGAL-4.3, with
CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3, the Do_intersect functor of
the domain is no longer called, and only Construct_intersection. If the
bissection eventually found out that the bissection ended up between the
volumes labeled 1 and 3, then the returned surface patch index was
{1,3}, instead of {1,2}. That commit fixes that "bug", and restores
the behavior of CGAL-4.2.
- Update_c3t3::operator()(Cell_handle) returns a
boost::optional<Subdomain_index> instead of a Boolean.
- Update_c3t3::operator()(Facet) returns a
boost::optional<Surface_patch_index> instead of a Boolean.
- Update_c3t3::operator()(Facet) gets a new option that allows to update
the facet surface center, without updating the c3t3 itself.
valid_move(c3t3_cells(conflict_cells)) was computed using the outdated
c3t3-ness of cells
Now c3t3 update is done iff the surface has not been broken, and
new sliver_criterion values are computed on updated cells
vertex indices in Cell_from_ids should not be sorted,
otherwise, what is stored in surface_patch_index[i]
does not correspond to the right i.
Copy indices to have them :
- in the original order
- and sorted (for set::find)
there might be inconsistencies (of a few bits) between sliver cached values (64 bits) and values computed on the fly (potentially 80 bit on some 32 bits platforms)