Commit Graph

1187 Commits

Author SHA1 Message Date
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
Sebastien Loriot 7659e881bd Merge pull request #625 from lrineau/Mesh_3-add_assertion-lrineau
Add an assertion in Image_to_labeled_function_wrapper
2016-01-14 14:09:06 +01:00
Sébastien Loriot 3bbe6e068b Merge pull request #607 from afabri/Mesh_3-avizo_output-GF
Add output to Avizo file format
2016-01-13 14:45:09 +01:00
Laurent Rineau abca7b5390 Add an assertion in Image_to_labeled_function_wrapper
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".
2016-01-13 11:00:25 +01:00
Andreas Fabri b02a7ed31a no need to funnel io routines through Mesh_complex_3_in_triangulation_3_base 2016-01-13 10:35:59 +01:00
Sebastien Loriot 2a4d8e5c9f Merge pull request #590 from lrineau/Mesh_3-manifold_criterion-lrineau
Mesh_3: add the manifold criterion
2016-01-12 16:02:00 +01:00
Sébastien Loriot aa36d50923 remove unused variable 2016-01-11 20:18:54 +01:00
Andreas Fabri 7cc1543c84 remove unused typedefs 2016-01-11 15:40:36 +01:00
Laurent Rineau f5cbf206b8 Merge branch 'Mesh_3-merge-manifold-meshing-thread' into Mesh_3-manifold_criterion-lrineau 2016-01-11 13:14:25 +01:00
Laurent Rineau f0ed1101c0 Use CGAL_assume instead of CGAL_assertion
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;
                 ^
```
2016-01-11 13:10:04 +01:00
Laurent Rineau d5a5a56ac0 Remove debug ouput
A file `polylines.cgal.txt` was created during the computation.
2016-01-11 12:06:11 +01:00
Sebastien Loriot 8245efd76b Merge pull request #601 from lrineau/Polyhedron-Mesh_3_plugin__add_Meshing_thread-lrineau
Polyhedron, Mesh 3 plugin: add the meshing threads
2016-01-11 11:20:26 +01:00
Andreas Fabri 41a30023f9 std::ofstream is used without the header being included 2016-01-09 09:45:36 +01:00
Laurent Rineau 689fcea368 Fix a compilation: <iostream> not included
Anyway, we do not want that file to be created.
2016-01-08 19:01:40 +01:00
Laurent Rineau bd315dc0a5 Merge remote-tracking branch 'lrineau/Polyhedron-Mesh_3_plugin__add_Meshing_thread-lrineau' into Mesh_3-merge-manifold-meshing-thread
Conflicts:
	Polyhedron/demo/Polyhedron/Plugins/Mesh_3_plugin/Mesh_3_plugin.cpp
	Polyhedron/demo/Polyhedron/Plugins/Mesh_3_plugin/Mesh_3_plugin_cgal_code.cpp
2016-01-08 17:55:21 +01:00
Laurent Rineau 4638645a01 Merge PR #597 into Mesh_3-manifold_criterion-lrineau
Conflicts:
	Polyhedron/demo/Polyhedron/Plugins/Mesh_3_plugin/Mesh_3_plugin.cpp
	Polyhedron/demo/Polyhedron/Plugins/Mesh_3_plugin/Mesh_3_plugin_cgal_code.cpp
2016-01-08 17:41:02 +01:00
Laurent Rineau 006642e32a Fix the commit "Try to fix warnings from VC++"
"-1" is used as a sentinel value for `v->cached_number_of_components()`.
2016-01-08 16:58:11 +01:00
Andreas Fabri 7fa7db80d4 Add output to Avizo file format 2016-01-08 16:30:07 +01:00
Laurent Rineau ccb31e40ff Re-enable the meshing thread
The Mesh_3 plugin is also renamed to Mesh_3_plugin, like the same of its
file.
2016-01-08 15:10:09 +01:00
Laurent Rineau 9730e2bd8e fix a copy-paste error in a comment 2016-01-08 14:34:44 +01:00
Laurent Rineau 25b2330fb0 Try to fix warnings from VC++
> 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
2016-01-07 16:38:11 +01:00
Sebastien Loriot f3bc10ef81 Merge pull request #549 from afabri/Polyhedron-clipping_in_shader-GF
Improve C3T3 item and meshing of a segmented image
2016-01-07 13:49:16 +01:00
Laurent Rineau b1a0f01027 Fix compilation error with clang, again 2016-01-06 17:35:25 +01:00
Laurent Rineau 8542eb2fe9 Fix compilation error (clang)
> /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_>
2016-01-06 17:28:52 +01:00
Laurent Rineau 2a7fb19d3e Fix compilation error (missing header) 2016-01-06 16:50:08 +01:00
Laurent Rineau 772772d7b7 Fix the -Wsign-compare
There was a warning in a CGAL_assertion.
2016-01-06 15:50:27 +01:00
Andreas Fabri a776df173b fix license header 2016-01-06 15:25:01 +01:00
Sébastien Loriot dd8f33adc5 Merge pull request #559 from lrineau/Mesh_3-remove_estimated_bbox-lrineau
Add bbox() to MeshDomain_3
2016-01-06 14:35:01 +01:00
Andreas Fabri d3e610f188 harcode again that the image word type is unsigned char for a segmented image and perform static_cast 2016-01-06 13:06:51 +01:00
Laurent Rineau 6eacaa7868 cosmetic fix: display the iterations on 1 line only 2016-01-05 17:41:56 +01:00
Laurent Rineau 8324d8eceb bug-fix: invalidate the "manifold info" after refine().
The global optimizers destroy the manifold info. It must be invalidated.
2016-01-05 17:40:40 +01:00
Laurent Rineau 432b52636a Override the debuginfo too
That way, the manifold mesher level displays also the number of bad
edges/vertices.
2016-01-05 17:40:01 +01:00
Andreas Fabri 56bfaa2746 merge 2016-01-05 17:06:04 +01:00