Fix a runtime error. The `Intersect_3` functor of
`Robust_intersection_traits_3_new` was ignored cases in the intersection
between a segment and a triangle.
In `ts_intersection`, if one of the extremities of the segment was
coplanar with the triangle, the empty object was always returned.
This bug of mines was introduced in CGAL-4.3 by
56d733b254.
(Fix #1554.)
- There is a new argument, `Less`, that allows to sort the `std::set` of
vertex descriptors with a deterministic sort functor.
- The header `<CGAL/Mesh_3/polylines_to_protect.h>` defines and use such
a functor.
the issue is not the dimension of the triangulation,
but the nb of facets that are in the c3t3 after the initialization of features
it is necessary to start the refinement procedure that this nb is > 0
Some use-cases were triggering the assertion
```C++
CGAL_assertion (this->is_facet_on_surface(facet)
```
in `Refine_facets_3::refinement_point_impl()`.
With Jane, we eventually found out that the bug was that, once a
refinement point is not in conflict with the facet, the dual of the
facet is reconstructed using an exact arithmetic (then a round to
doubles); it turns out that, if the new (exact) dual was not
intersecting the surface of the domain, then the facet must be removed
from the `c3t3`... but it must also be removed from the priority queue
of bad facets! The last part was missing.
That will fix the initialization of c3t3 from 3D images, in the
Polyhedron demo, with the protection of 1D-features is used, but there
are no 1D-features.
For other use-cases, that does not change anything.
> include\CGAL/Mesh_3/search_for_connected_components_in_labeled_image.h(192): warning C4244: 'argument': conversion from 'const ptrdiff_t' to 'const unsigned short', possible loss of data
> include\CGAL/Mesh_3/search_for_connected_components_in_labeled_image.h(111): warning C4267: 'argument': conversion from 'size_t' to 'const unsigned short', possible loss of data
The previous default value for `CGAL::parameters::edge_size`, in the
constructor of `CGAL::Mesh_criteria_3` was `FT(0)`.
That was in contradiction with the documentation of
[`CGAL::Mesh_criteria_3`][*]:
> Each parameter has a special default value `ignored` which means that
> the corresponding criteria will be ignored.
With `edge_size=0`, the protection of 1D-features is certain to trigger
an assertion or a segmentation fault.
The new default value is now `FT(DBL_MAX)`.
[*]: http://doc.cgal.org/latest/Mesh_3/classCGAL_1_1Mesh__criteria__3.html#ada26edb7ee77aa7279b2ae7e96c56eb0
Before that, the arcs of the case 2-1-1 were approximated with a strait
line segment. Now they are approximated with a polyline composed of 10
line segments.
I have decided to revert this commit:
> commit 874e96a553
> Author: Laurent Rineau <laurent.rineau@cgal.org>
> Date: Tue Feb 4 12:33:59 2014 +0100
>
> Fix a bug of the bissection oracle (Labeled_mesh_domain_3)
>
> 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.
I have "fixed" the test as well.
- The type of `value_outside` is now directory `Return_type`: no need to
apply the transformation.
- The indicator functions of the labelized trilinear interpolation can
be changed.
Followup to PR #962:
- the display of spheres was no longer correct,
- allow loading of c3t3 without any facets and cells (only vertices
with weights),
- fix the display of spheres, with better shaders,
- `Scene_c3t3_item`: do not draw edges, in FlatPlusEdges, during a
`drawWithNames()`, to optimize speed,
- `Viewer`: do not use anti-aliasing during `drawWithNames()`
That assertion verifies that the value `value_outside` is considered at
a value *outside* of the domain. Otherwise Mesh_3 will crash with an
assertion saying that "infinite cells should not be in the C3t3".
That is an attempt to fix a warning:
```
../include/CGAL/utility.h:101:33: warning: 'index2' may be used uninitialized in this function [-Wmaybe-uninitialized]
: first(a), second(b), third(c)
^
In file included from ../include/CGAL/Mesh_3/Mesher_3.h:35:0,
from ../include/CGAL/refine_mesh_3.h:32,
from ../include/CGAL/make_mesh_3.h:30,
from ../test/Mesh_3/test_c3t3_extract_subdomains_boundaries.cpp:9:
../include/CGAL/Mesh_3/Refine_facets_manifold_base.h:162:17: note: 'index2' was declared here
int index1, index2;
^
```
> CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h(227): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data
> CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h(227): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
> CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h(503): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data
> CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h(503): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
> CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h(517): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data
> CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h(517): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
> CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h(518): warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data
> CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h(561): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data
> CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h(561): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
> CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h(814): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data
> CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h(814): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
> CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h(815): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data
> CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h(815): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
> CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h(855): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data
> CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h(855): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
> CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h(857): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data
> CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h(857): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
> /Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h:632:25: error: declaration of 'Tr' shadows template parameter
> template<class Tr, class Cr, class MD, class C3T3_, class Ct, class C_>
For the moment, the manifold feature is no longer working.
Merge remote-tracking branch 'cgal-dev/Mesh_3-manifold_criterion-lrineau' into Mesh_3-manifold_criterion-lrineau
Conflicts:
Mesh_3/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h
Mesh_3/include/CGAL/Mesh_3/Mesher_3.h
Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h
Polyhedron/demo/Polyhedron/Polyhedron_3.cpp
Polyhedron/demo/Polyhedron/Polyhedron_demo_mesh_3_plugin.cpp
Polyhedron/demo/Polyhedron/Polyhedron_demo_mesh_3_plugin_cgal_code.cpp
- The shader of the edges of the base item discards the edges when it should
- The facets of the cutplane have edges
- The grid is displayed in all the rendering modes
This macro has to be larger than the default value
and it must be set before including <boost/parameter.hpp>
Instead of setting it to 12 in the packages that
need it, we do this in <CGAL/config.h> and produce
an error if a user has set it to a value < 12
here transform() returns true or false whether the voxel value (not interpolated)
is less (default functor) than the input isovalue
this error was shown by a conversion "float to int" warning
handle the case, with global optimisers, in which
a point is moved to the same location as an existing vertex,
which is not old_vertex
it belongs to the case where there is a topological change
(because of the removal of old_vertex) but
find_conflicts(new_location) does not find any conflict
this precondition checks that global optimizers are not run on a
triangulation with weights.
Protecting balls are an exception and don't prevent global optimizers
from running
MSVC emits that warning:
include\CGAL/Implicit_to_labeling_function_wrapper.h(205) : warning C4800: 'unsigned int' : forcing value to bool 'true' or 'false' (performance warning)
The fix is to explicit exactly what is tested. The following:
CGAL_assertion(funcs.size());
is replaced by the explicit:
CGAL_assertion(funcs.size() != 0);