Laurent Rineau
bc95c778b3
Add missing includes
2016-09-30 15:23:15 +02:00
Andreas Fabri
c58582b5ec
Add global function dihedral_angle()
2016-09-30 15:23:15 +02:00
Laurent Rineau
c22dcd0e2c
Missing includes
2016-09-30 15:23:15 +02:00
Andreas Fabri
6caea9384f
Fix package Mesh_3: include headers
2016-09-30 15:22:30 +02:00
Laurent Rineau
1391a3ca83
Merge pull request #1506 from lrineau/Mesh_3-fix_issue_1501-lrineau
...
Mesh_3: fix issue #1501 - about degenerate cases in initialization
2016-09-30 11:04:16 +02:00
Laurent Rineau
de3d1f4459
Fix compilation of mesh_3_plugin
...
... after the last merge commit.
2016-09-30 10:05:59 +02:00
Laurent Rineau
e4ae38ae97
Merge pull request #1514 from janetournois/Mesh_3-fix_small_angles_in_input_features-GF
...
Mesh_3 - deal with sharp angles inside input sharp features
2016-09-29 17:42:31 +02:00
Laurent Rineau
5bd65fba58
Make split_graph_into_polylines deterministic
...
- 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.
2016-09-29 17:41:32 +02:00
Jane Tournois
f3ea115db9
check nb of facets in c3t3
...
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
2016-09-29 15:35:03 +02:00
Laurent Rineau
7dbc756d42
Mesh_3: Fix other conversion warnings
2016-09-29 14:39:11 +02:00
Jane Tournois
9c181d7860
Angles < 135 deg (90 in theory) should be counted as terminal vertices,
...
otherwise protection may fail by refining protecting balls endlessly,
getting closer and closer to the input sharp angle
2016-09-29 10:43:11 +02:00
Laurent Rineau
100a4ceb10
Fix #1501
...
Even if the `dimension()` of initial triangulation is 3, the initial
c3t3 can be empty, even with a non-empty domain. Let's use more initial
points.
2016-09-28 15:20:37 +02:00
Maxime Gimeno
8469c45336
Enhance Prevent_deref API and use it.
2016-09-28 10:48:07 +02:00
Andreas Fabri
d5c31f0080
90 -> 12
2016-09-26 17:34:32 +02:00
Andreas Fabri
c4faaa99fd
remove static variables
2016-09-26 16:23:23 +02:00
Jane Tournois
e6d0fe99e0
missing const when TBB available
2016-09-06 11:01:42 +02:00
Laurent Rineau
79dc30fee3
Bug-fix Mesh_3: clear c3t3 before refine_mesh
...
If vertices are inserted manually in the triangulation between calls to
refine_mesh, the c3t3 is corrupted and must be cleared.
2016-09-02 16:55:37 +02:00
Laurent Rineau
955ca9a55d
Bug-fix: bug with Null in Labeled_mesh_domain_3
...
The bug was introduced in the PR #1010 , and was only exposed when the
`Null_subdomain_index` functor was non-trivial.
2016-09-02 16:55:19 +02:00
Laurent Rineau
056df4d93d
A Mesh_3 bug-fix!
...
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.
2016-09-02 11:51:11 +02:00
Laurent Rineau
bffed99bb0
Add a missing overload of the constructor: 4 args
2016-09-02 11:51:11 +02:00
Laurent Rineau
a3ffae35bd
Merge pull request #1364 from sloriot/CGAL-replace_assert
...
Replace assert by CGAL_assertion in CGAL code
2016-08-29 12:32:01 +02:00
Sébastien Loriot
ff1b240a37
replace assert by CGAL_assertion in CGAL code
2016-08-25 11:12:17 +02:00
Laurent Rineau
ec78fd78eb
A function that allows to specify ones own lines
2016-08-03 15:36:36 +02:00
Laurent Rineau
426f6e623b
bugfix for master: used the copied polyhedron
...
As `Polyhedral_mesh_domain_with_features_3` copies the polyhedra, the
aabb tree should used the copy (with the assigned patch ids!)
cc @jtournoi
2016-07-26 12:36:21 +02:00
Laurent Rineau
2cd9a15bb9
Merge remote-tracking branch 'cgal/releases/CGAL-4.8-branch'
...
Merge the following merge commits:
> 12b92f5 Merge pull request #1271 from lrineau/Mesh_3-distance_criterion_sizing_field-GF
> 9c3d0b0 Merge pull request #1295 from lrineau/CGAL-add_test-GF
Conflicts:
Maintenance/release_building/BUGFIX_NUMBER
Maintenance/release_building/public_release_name
2016-07-22 18:31:02 +02:00
Laurent Rineau
05260fb4ae
Allow a sizing field for the distance criterion
2016-07-21 12:59:14 +02:00
Laurent Rineau
06436ba2ea
Fix the I/O for Polyhedral_mesh_domain_3
2016-07-11 18:09:25 +02:00
Laurent Rineau
2e1a6d2c3a
Add support for Parallel_tag in io_signature.h
2016-07-11 18:08:51 +02:00
Laurent Rineau
831c0def3d
Add an assertion
2016-07-11 18:08:40 +02:00
Sébastien Loriot
10cadcb985
Merge remote-tracking branch 'cgal-dev/CGAL_headers_only_step1-gdamiand_cjamin' into HEAD
2016-06-24 17:05:40 +02:00
Sébastien Loriot
c951fe0fca
Merge pull request #1035 from lrineau/CGAL-fix_Wconversion_warnings-GF
...
Fix -Wconversion warnings, and issues detected by those warnings
2016-06-24 13:30:48 +02:00
Laurent Rineau
f9dd4b4be7
Try to fix a compilation error with CentOS5's g++
...
The compilation error was:
> ../include/CGAL/Mesh_3/polylines_to_protect.h: In function ‘void CGAL::polylines_to_protect(const CGAL::Image_3&, double, double, double, std::vector<std::vector<IC, std::allocator<_CharT> >, std::allocator<std::vector<IC, std::allocator<_CharT> > > >&, Image_word_type*, Null_subdomain_index, PolylineInputIterator, PolylineInputIterator) [with P = CGAL::Point_3<CGAL::Epick>, Image_word_type = unsigned char, Null_subdomain_index = CGAL::Null_subdomain_index, PolylineInputIterator = __gnu_cxx::__normal_iterator<std::vector<CGAL::Point_3<CGAL::Epick>, std::allocator<CGAL::Point_3<CGAL::Epick> > >*, std::vector<std::vector<CGAL::Point_3<CGAL::Epick>, std::allocator<CGAL::Point_3<CGAL::Epick> > >, std::allocator<std::vector<CGAL::Point_3<CGAL::Epick>, std::allocator<CGAL::Point_3<CGAL::Epick> > > > > >]’:
> ../include/CGAL/Mesh_3/polylines_to_protect.h:538: instantiated from ‘void CGAL::polylines_to_protect(const CGAL::Image_3&, std::vector<std::vector<IC, std::allocator<_CharT> >, std::allocator<std::vector<IC, std::allocator<_CharT> > > >&, PolylineInputIterator, PolylineInputIterator) [with P = CGAL::Point_3<CGAL::Epick>, Image_word_type = unsigned char, PolylineInputIterator = __gnu_cxx::__normal_iterator<std::vector<CGAL::Point_3<CGAL::Epick>, std::allocator<CGAL::Point_3<CGAL::Epick> > >*, std::vector<std::vector<CGAL::Point_3<CGAL::Epick>, std::allocator<CGAL::Point_3<CGAL::Epick> > >, std::allocator<std::vector<CGAL::Point_3<CGAL::Epick>, std::allocator<CGAL::Point_3<CGAL::Epick> > > > > >]’
> ../test/Mesh_3_Examples/mesh_3D_image_with_features.cpp:62: instantiated from here
> ../include/CGAL/Mesh_3/polylines_to_protect.h:193: error: no matching function for call to ‘get(boost::tuples::tuple<boost::array<int, 3ul>, CGAL::Point_3<CGAL::Epick>, unsigned char, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>&)’
See https://cgal.geometryfactory.com/CGAL/testsuite/CGAL-4.9-Ic-81/Mesh_3_Examples/TestReport_lrineau_CentOS5.gz
2016-06-23 14:19:24 +02:00
Guillaume Damiand
e21ef313c0
Merge branch 'CGAL_headers_only_step1-gdamiand_cjamin-old' into CGAL_headers_only_step1-gdamiand_cjamin
2016-06-22 20:54:37 +02:00
Laurent Rineau
bbc05a11d9
Fix -Wconversion warnings
...
All conversions are safe.
2016-06-16 16:36:43 +02:00
Laurent Rineau
955e965561
Move code
...
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.
2016-06-16 15:08:36 +02:00
Laurent Rineau
99b646bdd4
Try to fix a warning
...
> 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
2016-06-16 14:44:05 +02:00
Laurent Rineau
cfb6c060af
Try to fix a warning with MSVC
...
> 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
2016-06-16 14:44:05 +02:00
Laurent Rineau
fa5cb831c9
Add Output_rep<T,F>::is_specialized...
...
.. that allows `Dump_c3t3` to detect if a type can be streamed, using
either `operator<<` or `Output_rep<T>`.
2016-06-15 18:10:14 +02:00
Laurent Rineau
16d18351ce
Add example showing how to initialize components
2016-06-15 18:10:14 +02:00
Guillaume Damiand
a53f16edac
Merge branch 'CGAL_headers_only_step1-gdamiand_cjamin-old' into CGAL_headers_only_step1-gdamiand_cjamin
2016-06-09 19:09:38 +02:00
Sébastien Loriot
97e122ccb8
Merge pull request #1110 from maxGimeno/Mesh_3_use_split_graph_into_polylines-GF
...
Remove duplicated implementation in <CGAL/Mesh_3/polylines_to_protect.h>
2016-05-31 16:03:16 +02:00
Sebastien Loriot
cf15f57a50
Merge pull request #1097 from lrineau/Mesh_3-improve_polylines_to_protect-GF
...
Mesh 3: add an example that protects features of a 3D image
2016-05-31 16:00:58 +02:00
Sebastien Loriot
0f04b4262a
Merge pull request #1109 from lrineau/Mesh_3-change_default_for_edge_size-GF
...
Mesh_criteria_3: change the default for `edge_size` from 0 to +∞
2016-05-31 15:49:16 +02:00
Sébastien Loriot
40ff09bd43
Merge pull request #303 from lrineau/Mesh_3-add_remesh_polyhedral_surface-GF
...
Add an example that remeshes a polyhedral surface
2016-05-31 15:43:05 +02:00
Sébastien Loriot
bb856cbd63
add missing typename
2016-05-27 17:25:17 +02:00
Laurent Rineau
5770538719
Fix a warning
...
> warning: typedef ‘K’ locally defined but not used [-Wunused-local-typedefs]
2016-05-27 16:47:26 +02:00
Laurent Rineau
cfd76f1b00
Avoid degenerated polylines
2016-05-27 16:46:28 +02:00
Jane Tournois
5b45da6239
boundary edges already are detected by detect_features
...
do not detect and add them twice
and prevent from not-terminating
2016-05-26 17:02:05 +02:00
Maxime Gimeno
475d19894c
Removed the file Mesh_3/include/CGAL/internal/Mesh_3/split_in_polylines.h and replaced its usage by CGAL::split_graph_into_polylines.
2016-05-26 16:23:06 +02:00
Jane Tournois
57b609464e
save the input polyhedra in a vector
...
and implement the derived constructors to be able to detect features in them
2016-05-26 16:15:45 +02:00
Jane Tournois
be95730ee2
fix commit c7d614193e
...
I had forgotten 2 constructors
2016-05-26 13:01:30 +02:00
Laurent Rineau
fe67240536
Change the default for `edge_size` from 0 to +∞
...
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
2016-05-26 12:33:30 +02:00
Jane Tournois
c7d614193e
move detect_borders inside detect_features
...
and protect its use with a boolean, to avoid doing it twice
2016-05-26 11:54:30 +02:00
Laurent Rineau
025de85f8b
Fix a warning
...
g++, with `-Wall -Wextra`:
.../include/CGAL/Mesh_3/polylines_to_protect.h:50:28: warning: unused parameter 'k' [-Wunused-parameter]
2016-05-26 09:39:52 +02:00
Laurent Rineau
b8f90e6263
Handle the case 1-2-1 with real arcs
...
Before that, the arcs were each approximated with a polyline of only two
segments. Now they are each approximated with a polyline of 10 segments.
2016-05-25 14:36:36 +02:00
Laurent Rineau
cb8609c6ae
Handle the case 2-1-1 with real arcs
...
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.
2016-05-25 12:38:29 +02:00
Guillaume Damiand
10469f9c4e
Update with master
2016-05-25 10:58:55 +02:00
Laurent Rineau
e1ccdbf567
Add an example of a labeled imaged with 1d-features
2016-05-24 16:28:17 +02:00
Laurent Rineau
4726306ccb
Add debug code for <CGAL/Mesh_3/Graph_manipulations.h>
...
Protected by the macro `CGAL_MESH_3_DEBUG_GRAPH_MANIPULATION`.
2016-05-23 15:20:39 +02:00
Laurent Rineau
aaf91148be
bug-fix for previous commit
2016-05-23 15:19:19 +02:00
Laurent Rineau
c15c75fa1a
Do not protect outside the domain!
2016-05-20 16:53:19 +02:00
Laurent Rineau
4d38c931ce
Improve the API of <CGAL/Mesh_3/polylines_to_protect.h>
...
Now the word type and the null functor are passed as parameters.
2016-05-20 16:52:35 +02:00
Laurent Rineau
ee0fb3b23a
Fix the header guard macro, and copyright years
2016-05-20 12:46:09 +02:00
Laurent Rineau
c03f8530ce
Fix indentation
2016-05-20 12:45:47 +02:00
Sebastien Loriot
1ad076e14b
Merge pull request #1010 from lrineau/Mesh_3-improve_images-GF
...
Mesh 3: improve domains based on images
2016-05-05 14:56:56 +02:00
Laurent Rineau
121e562dd6
Merge pull request #830 from afabri/Mesh_3-Default-GF
...
Introduce CGAL::Default for the geometric traits of Mesh_triangulation_3
2016-04-22 15:26:41 +02:00
Laurent Rineau
52f884589b
Stupid typo!
2016-04-22 09:59:08 +02:00
Laurent Rineau
683fa43b69
Fix -Wconversion warnings (g++-5.3.1 Fedora 23)
2016-04-21 16:41:14 +02:00
Laurent Rineau
b8e97aa9ce
Fix conversions warnings detected by MSVC
2016-04-21 16:39:31 +02:00
Laurent Rineau
f97d5b7bd5
Restore the assertion
2016-04-20 15:59:04 +02:00
Laurent Rineau
62d1cfecbe
Fix compilation errors (in the Polyhedron Demo)
2016-04-20 15:26:49 +02:00
Laurent Rineau
89129b362f
Fix a bug with Null_subdomain_index
2016-04-20 15:24:26 +02:00
Laurent Rineau
5cf76255f8
Revert a decision made two years ago
...
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.
2016-04-20 15:22:53 +02:00
Laurent Rineau
55e0df7556
Fix a comment
2016-04-20 15:17:42 +02:00
Andreas Fabri
db02d60d6f
make output_to_medit() faster
2016-04-15 20:52:13 +02:00
Laurent Rineau
9eefbf3e6e
Fix the ambiguous matching
2016-04-14 20:00:33 +02:00
Laurent Rineau
6e874352a9
Improve Labeled_image_mesh_domain_3
...
- Allow to specify which `Subdomain_index` must be considered as outside
the domain, for `Is_in_domain`.
2016-04-14 19:45:00 +02:00
Laurent Rineau
35cb7bd5b8
Improve CGAL::Image_3
...
- 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.
2016-04-14 19:36:20 +02:00
Laurent Rineau
50a3e0b5cb
Merge pull request #969 from afabri/Distance_3-Point_Triangle_3-GF
...
Moved squared_distance(Point_3,Triangle_3)
2016-04-13 10:21:21 +02:00
Laurent Rineau
80a597c7c4
Fix C3t3::rescan_after_load_of_triangulation
2016-04-07 17:38:19 +02:00
Laurent Rineau
3299b4b906
Do not dump after optimisers that are not used
2016-04-01 16:17:08 +02:00
Laurent Rineau
5a9d82ebc7
Improve c3t3 loading and display
...
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()`
2016-04-01 16:07:56 +02:00
Andreas Fabri
2443b7d1a6
Moved squared_distance(Point_3,Triangle_3
2016-03-30 16:58:22 +02:00
Laurent Rineau
216b298652
Fix issues in I/O of Mesh_complex_3_in_triangulation_3
...
And restore the possibility for the Polyhedron demo to load two types of
C3t3 (with `Patch_id` being `int` or `std::pair<int, int>`).
2016-03-25 15:45:28 +01:00
Andreas Fabri
a2e6f59f7b
Fix K -> K_
2016-03-23 12:18:12 +01:00
Andreas Fabri
92ccbb7745
fix shadow bug (was not produced with VC++
2016-03-23 05:45:19 +01:00
Clement Jamin
9a61b23b55
Use get_default_random() instead of default_random
2016-03-09 10:35:21 +01:00
Sebastien Loriot
204e86e3cc
Merge pull request #863 from lrineau/Mesh_3-fix_IO-lrineau
...
Fix the I/O of C3t3 in <CGAL/Mesh_vertex_base_3.h>
2016-03-03 16:55:39 +01:00
Laurent Rineau
65feefa4b2
Fix the I/O of C3t3 in <CGAL/Mesh_vertex_base_3.h>
2016-03-02 11:24:17 +01:00
Laurent Rineau
99f004c15f
Minor bug-fix in Mesh_3
2016-03-01 16:32:31 +01:00
Andreas Fabri
78f00eb2e6
Introduce CGAL::Default for the geometric traits
2016-02-25 17:11:20 +01:00
Andreas Fabri
7f3d561fee
Add protection of border edges
2016-02-22 13:44:04 +01:00
Andreas Fabri
a6ae6aecfc
initialize to avoid a warning
2016-02-03 08:59:11 +01:00
Laurent Rineau
1179371045
Add the Create_bbox_mesh_plugin
2016-01-27 10:46:52 +01:00
Sebastien Loriot
277a91b4f0
Merge pull request #664 from janetournois/Mesh_3-replace_binder2nd-pmoeller
...
Mesh 3 - Improve Gray level images domain and fix warnings
2016-01-25 08:48:43 +01:00
Sebastien Loriot
2fad9efc1d
Merge pull request #633 from bo0ts/Mesh_3-replace_binder2nd-pmoeller
...
Replace deprecated binder2nd
2016-01-23 09:12:42 +01:00
Jane Tournois
790c4d68aa
change default template parameter
...
in 3D gray images, it's very likely that the area of interest is the area
where voxels have high values associated
2016-01-21 11:46:48 +01:00
Jane Tournois
d396c8c869
std::unary_function is deprecated since cpp11
...
so let's add the missing typedef instead
2016-01-19 16:07:21 +01:00
Jane Tournois
67a52efc1f
Less should derive from std::unary_function
...
otherwise the type name Less_than::argument_type is invalid
and causes compilation errors
2016-01-19 15:22:08 +01:00
Philipp Möller
659dbffa13
Replace deprecated binder2nd
...
We cannot just use boost::bind or similar, since we need to get the type
of the binder (which is not easily possible without decltype).
2016-01-15 15:35:14 +01:00