Commit Graph

679 Commits

Author SHA1 Message Date
Sébastien Loriot 0072b649e2 Merge branch 'old/Polygon_mesh_processing-local_remeshing-GF' into Polygon_mesh_processing-local_remeshing-GF 2015-11-05 20:11:10 +01:00
Jane Tournois f55e73e475 doc : distinguish between what should be triangulated, and what does not have to 2015-11-05 20:09:17 +01:00
Jane Tournois 4f320a7c29 update doc 2015-11-05 20:09:17 +01:00
Jane Tournois fd3b738955 remove unused variable and avoid warnings 2015-11-05 20:09:17 +01:00
Jane Tournois 950a3fa5a3 fix doc warning 2015-11-05 20:09:15 +01:00
Jane Tournois 52dbd6ef3d add precondition about protection of constraints
this precondition is here to check whether protection of constraints is
compatible with termination of the refinement step
2015-11-05 20:09:15 +01:00
Jane Tournois 340a52ac44 update doc wrt to @sloriot review 2015-11-05 20:09:15 +01:00
Jane Tournois 007fc60c64 rename default function 2015-11-05 20:09:14 +01:00
Jane Tournois 945d358db5 change function name in "see also" 2015-11-05 20:09:14 +01:00
Jane Tournois 893b80c490 rename function to isotropic_remeshing() 2015-11-05 20:09:14 +01:00
Jane Tournois 57ef5d03f7 remove todo. Works the same for multiple cc 2015-11-05 20:09:14 +01:00
Sébastien Loriot c6e649aa9b Merge branch 'Polygon_mesh_processing-local_remeshing-GF-old' into Polygon_mesh_processing-local_remeshing-GF
and adapt plugin to CGAL::Three
2015-11-05 20:07:15 +01:00
Sébastien Loriot 54ca52b538 Merge branch 'BGL-SurfaceMesh2SurfaceMesh-GF' into Polygon_mesh_processing-local_remeshing-GF 2015-11-05 19:25:00 +01:00
Jane Tournois 3448f7cd57 Merge branch 'PMP-length_of_border-GF-old' into PMP-length_of_border-GF 2015-11-03 15:34:45 +01:00
Jane Tournois ad2e627a31 documentation and change return types to use Geom_traits::FT 2015-11-03 15:29:15 +01:00
Maxime Gimeno 7c0be4674d Fix for std::sqrt in Mesh_processing
- replaces all the std::sqrt by CGAL::sqrt
2015-10-29 13:44:18 +01:00
Sébastien Loriot bed84e6234 Merge branch 'releases/CGAL-4.7-branch' 2015-10-28 13:45:23 +01:00
Sébastien Loriot 36b68c936f fix duplicated include guard macro name 2015-10-28 13:44:46 +01:00
Sébastien Loriot 770f87dd29 Merge branch 'releases/CGAL-4.7-branch' 2015-10-28 11:21:16 +01:00
Sébastien Loriot 87b6490af7 add missing includes 2015-10-28 11:20:46 +01:00
Andreas Fabri d2ed79d38d Add keep_large_connected_components (code,doc,test) 2015-10-22 09:01:08 +02:00
Sébastien Loriot cb7d309f86 fix include file path and use it in a test
Trivial fix tested locally
2015-09-22 12:42:06 +02:00
Jane Tournois a7c3670f8e do not test is_degenerated on a border halfedge
is_border test should only be an assertion inside the function
also make sure is_degenerated is called only on non-border edges
2015-09-15 17:08:11 +02:00
Jane Tournois 5e2c263cf5 remove debug_normals test
in presence of sharp edges which are not constrained, the "false" result
does not highlight a bug and is misleading
2015-09-15 15:04:59 +02:00
Jane Tournois a0ba10438e fix collapsibility test, and reorder things dealing with the tags
collapse on face range border was broken
2015-09-15 14:57:35 +02:00
Jane Tournois 549266bb8a fix degeneracy test on border 2015-09-15 14:40:55 +02:00
Jane Tournois 6f718be591 rename functions to make it consistent with face_area 2015-09-10 09:30:16 +02:00
Jane Tournois 55ab0f5b06 rename area() to face_area() to avoid ambiguities
also add geom_traits as a named parameter
2015-09-08 09:56:29 +02:00
Jane Tournois 9188ba9de6 add function bbox_3(pmesh) 2015-09-07 15:46:00 +02:00
Jane Tournois 2d251049dd add volume function and test it 2015-09-07 15:11:14 +02:00
Laurent Rineau 7ddefbdcc8 Merge pull request #297 from afabri/CGAL-assert-GF
assert() should not be used in CGAL headers!
2015-09-07 10:58:20 +02:00
Jane Tournois 2160da4ceb add area function for the complete triangulated Surface
use CGAL_PMP_NP_TEMPLATE_PARAMETERS and CGAL_PMP_NP_CLASS
to avoid ambiguities
2015-09-04 17:37:36 +02:00
Jane Tournois 216fafb6af for area(), faces should be triangular (at least for now) 2015-09-04 17:11:59 +02:00
Jane Tournois 2bb201c0ef add documentation and rename file 2015-09-04 16:58:53 +02:00
Jane Tournois e3a3c9939b introduce named parameters in area functions 2015-09-04 15:58:38 +02:00
Jane Tournois 757be4f245 introduce area(face) function 2015-09-04 15:52:13 +02:00
Jane Tournois a4f7911202 introduce named parameters and length(halfedge) function 2015-09-04 15:44:49 +02:00
Jane Tournois 13411283ce remove duplicate include 2015-09-04 14:58:08 +02:00
Jane Tournois 24cb41e31f rename file
it's not about dimensions, but about measures
2015-09-04 14:21:30 +02:00
Jane Tournois 6256bfd44f fix constness and put pmesh as last parameter, as usual 2015-09-04 14:10:13 +02:00
Laurent Rineau 1eab366954 Merge pull request #312 from sloriot/Polyhedron_demo-stl_io_plugin_safer-sloriot
Polyhedron demo: first check that the STL file is a polygon mesh before loading it

Conflicts:
	Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt
2015-09-04 11:36:13 +02:00
Laurent Rineau 59ac9f30fc Merge pull request #293 from sloriot/PMP-fix_remove_degenerate_faces-sloriot
Polygon mesh processing:  fix remove_degenerate_faces() but do not publish it in the documentation
2015-09-04 11:24:36 +02:00
Sébastien Loriot 4931c8c889 first check that the stl file is a polygon mesh before loading it 2015-09-03 15:17:14 +02:00
Jane Tournois 33710fe170 replace std::map with boost::unordered_map
this speeds up the calls to "find" in status()
2015-09-02 16:29:29 +02:00
Jane Tournois e790bda380 move macro inside debug code 2015-09-02 16:05:05 +02:00
Jane Tournois ce54198aa7 Merge branch 'Polygon_mesh_processing-local_remeshing-GF-old' into Polygon_mesh_processing-local_remeshing-GF 2015-09-02 15:57:23 +02:00
Andreas Fabri 3a2850eecd Use accelerate_distance_queries() 2015-09-02 14:47:37 +02:00
Andreas Fabri 90cbba8e72 Add functions to measure length of border and area of patch 2015-09-01 10:07:48 +02:00
Andreas Fabri 1e2ff1131e assert -> CGAL_assertion 2015-08-27 16:51:55 +02:00
Sébastien Loriot 9514bcc8fe do not publish remove_degenerate_faces that is not yet ready 2015-08-27 11:26:04 +02:00
Sébastien Loriot bfe03f16eb add debug function 2015-08-27 09:56:27 +02:00
Sébastien Loriot f9edc6e4db extract the part responsible for removing all null-edges and create a function 2015-08-27 09:56:27 +02:00
Sébastien Loriot 05ff60df9c remove unused code 2015-08-27 09:56:06 +02:00
Jane Tournois 713f7424ab documentation for remeshing 2015-08-18 18:24:27 +02:00
Laurent Rineau 5d99700c3d Merge pull request #277 from janetournois/Polygon_mesh_processing-GF
Polygon mesh processing - Eigen 3.2 needed for fairing
2015-08-18 18:07:23 +02:00
Jane Tournois 7b93b844f2 integrate the complete test inside the static assert
to avoid inconsistencies between different compilers
2015-08-17 16:49:01 +02:00
Jane Tournois aef04b7dce make compilation more explicit when Eigen < 3.2 is used 2015-08-17 12:08:50 +02:00
Jane Tournois a5c14aad21 fix a bug in collapse_short_edges
an edge that is about to be collapsed can be not on border,
but with both of its vertices on the mesh Border

this causes the appearance of a null_face that causes a seg fault
2015-08-14 18:52:28 +02:00
Jane Tournois 768dfbc0b0 write documentation 2015-08-11 12:56:37 +02:00
Jane Tournois a45368680f add function to remove isolated vertices 2015-08-10 19:03:54 +02:00
Jane Tournois 86896278e5 Merge branch 'Polygon_mesh_processing-local_remeshing-GF-old' into Polygon_mesh_processing-local_remeshing-GF 2015-08-07 13:02:35 +02:00
Sébastien Loriot ca19447002 fix warnings detected by clang 2015-08-06 19:39:35 +02:00
Sébastien Loriot 5de888d9dc Revert "move update of the status outside of the constructor"
This reverts commit 6378a51191.

The commit was incorrect and was introducing a huge performance issue
2015-08-06 15:27:55 +02:00
Sébastien Loriot cabb80a4ae if no cc is to be removed, do nothing 2015-08-04 12:22:51 +02:00
Sébastien Loriot 74e6f3ea39 remove named parameter not needed 2015-08-04 12:22:51 +02:00
Sébastien Loriot acd4f70bf0 improve doc 2015-07-31 14:11:39 +02:00
Sébastien Loriot bc30aa5f48 handle the stitching of patches with incorrect orientation
we make two border halfedges matching only if they are opposite
2015-07-31 14:11:38 +02:00
Sébastien Loriot 4dbface316 make the range of halfedge to stitch const
it requires a tweak with PMP macros to desambiguate overloads
2015-07-31 14:11:20 +02:00
Sébastien Loriot 89498ff175 remove less_halfedge named parameter that is no longer needed 2015-07-31 11:18:24 +02:00
Sébastien Loriot d97a0dc1c5 remove less_halfedge named parameter that is not necessary
Since the edge endpoints must be identical, it is error prone
to provide a way to tweak the detection of edges to stitch
2015-07-31 11:15:58 +02:00
Sébastien Loriot aeff7c78a6 fix to correctly handle cases with border vertices 2015-07-29 17:04:31 +02:00
Sébastien Loriot f67d2f7148 add a description of the method used to remove link condition restrictions 2015-07-29 11:07:24 +02:00
Sébastien Loriot 9b1983eeb7 fix indentation 2015-07-29 10:08:23 +02:00
Sébastien Loriot a2ed1face6 remove unused code and variable 2015-07-29 10:06:50 +02:00
Sebastien Loriot 1ebc5f75b5 Merge pull request #196 from janetournois/Polygon_mesh_processing-GF
Polygon mesh processing - small fixes
2015-07-28 17:16:36 +02:00
Jane Tournois fb1714154f fix documentation
this template parameter is not needed!
2015-07-27 16:12:42 +02:00
Jane Tournois 2a6ddd38a4 use get() instead of [] to access vertex point map 2015-07-27 16:12:12 +02:00
Jane Tournois 9abb55125b use get() instead of operator[] for vertex point map
Conflicts:
	Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/remesh_impl.h
2015-07-27 16:11:14 +02:00
Jane Tournois 98fecc9a12 fix documentation
this template parameter is not needed!
2015-07-24 12:33:27 +02:00
Jane Tournois c37ed37c4c use get() instead of [] to access vertex point map 2015-07-24 12:31:50 +02:00
Jane Tournois ea1b6b402a fix the use of does_self_intersect 2015-07-24 12:23:32 +02:00
Jane Tournois b8d81cb8f6 add todo 2015-07-24 12:09:50 +02:00
Jane Tournois 87759f9ca8 use get() instead of operator[] for vertex point map 2015-07-24 12:09:04 +02:00
Jane Tournois b5cf442653 make plugins valid for Qt5 2015-07-24 10:05:02 +02:00
Jane Tournois bb3d38c9e7 Merge branch 'Polygon_mesh_processing-local_remeshing-GF-old' into Polygon_mesh_processing-local_remeshing-GF 2015-07-23 17:50:34 +02:00
Sébastien Loriot 7da45ca55c handle the case of a triangle hole with an edge of length 0 2015-07-22 16:08:38 +02:00
Sébastien Loriot a220686d02 satisfies_link_condition->does_satisfy_link_condition to match naming convention 2015-07-21 10:27:27 +02:00
Sébastien Loriot a30ad4be3c use PMP internal function 2015-07-16 16:40:54 +02:00
Sébastien Loriot 25d5a69104 use Side_of_triangle_mesh 2015-07-16 16:32:04 +02:00
Sébastien Loriot c89fa4bd53 simplify bgl named parameters handling with boost < 1.51 and make PMP compatible 2015-07-16 16:01:21 +02:00
Sébastien Loriot b766b511e6 avoid non-necessary inheritance 2015-07-16 13:21:38 +02:00
Sébastien Loriot f2a0d8c201 fix unused variable warning 2015-07-15 16:56:04 +02:00
Sébastien Loriot 45b1f593fc protect debug function by debug macro 2015-07-15 16:02:32 +02:00
Jane Tournois 9b0cd59255 add debugging code 2015-07-15 16:02:32 +02:00
Jane Tournois 2b0061d511 fix inversion of faces in equalize_valences
when endpoints of the halfedge being flipped belong to something else
than PATCH
2015-07-15 16:02:32 +02:00
Jane Tournois 4b85ca5460 add assertions 2015-07-15 16:02:32 +02:00
Jane Tournois 0ef807ac06 missing space in verbose mode 2015-07-15 16:02:32 +02:00
Jane Tournois 9b1eac30c2 verbose mode 2015-07-15 16:02:32 +02:00
Jane Tournois 6c00963c80 more verbosity 2015-07-15 16:02:32 +02:00
Jane Tournois d423378321 remove visitor (became useless) 2015-07-15 16:02:31 +02:00
Jane Tournois a1056c57dc little cleaning 2015-07-15 16:02:31 +02:00
Jane Tournois ed9276295d add stuff to verbose mode 2015-07-15 16:02:31 +02:00
Jane Tournois 77529d985d move debug code to debug macro 2015-07-15 16:02:31 +02:00
Jane Tournois e7b8734306 fix compilation for Polyhedron 2015-07-15 16:02:31 +02:00
Jane Tournois 8950cef414 add degeneracy test 2015-07-15 16:02:31 +02:00
Jane Tournois a603d5a705 fix collapse_short_edges
now there are degenerate faces in equalize_valences
2015-07-15 16:02:31 +02:00
Jane Tournois bfa1dfea2c add code to remove degenerate faces after each edge collapse 2015-07-15 16:02:31 +02:00
Jane Tournois 7ad049d14c don't use status visitor, it is not enough to keep halfedges status up-to-date 2015-07-15 16:02:31 +02:00
Jane Tournois e87c65bd3d rename variable for consistency 2015-07-15 16:02:30 +02:00
Jane Tournois ab1ddcac25 fix non-inversion test 2015-07-15 16:02:30 +02:00
Jane Tournois b7c0acae56 first operations for visitor that deals with status map 2015-07-15 16:02:30 +02:00
Laurent Rineau b639f7d051 Fix a compilation error
One cannot bind a temporary object to a non-const reference.
2015-07-15 16:02:30 +02:00
Jane Tournois 4b7a997df0 add the ability to use a Visitor for a BGL graph using an overload of graph_traits
TODO : is_valid(mesh) does not compile on msvc. To be fixed
2015-07-15 16:02:30 +02:00
Jane Tournois f8eb659abd remove debug_mesh_border
since it has become wrong when we have 2 adjacent patches
with a constrained polyline separating them
the same vertex can appear more than twice
2015-07-15 16:02:30 +02:00
Jane Tournois 237c20321f deal with degenerate faces better 2015-07-15 16:02:29 +02:00
Jane Tournois 6214feaaf1 add stuff for verbose mode 2015-07-15 16:02:29 +02:00
Jane Tournois 4f5be714bb add warning code 2015-07-15 16:02:29 +02:00
Jane Tournois e3121567fa automatically re-select border of selection after refining only border 2015-07-15 16:02:29 +02:00
Jane Tournois 7da4b81a19 add very verbose mode 2015-07-15 16:02:29 +02:00
Jane Tournois 99e0a245a0 add macro for verbose mode 2015-07-15 16:02:29 +02:00
Jane Tournois dea8a59dbb make flip_allowed test simpler, and reorganize flipping step
to save useless operations
2015-07-15 16:02:28 +02:00
Jane Tournois 4e95d9cc05 check that flip does not create a non-triangle face
this can happen around sharp tips of the domain,
when no incident edge is selected for protection
2015-07-15 16:02:28 +02:00
Jane Tournois df1985d296 use named parameters 2015-07-15 16:02:28 +02:00
Jane Tournois 07820b8e0d remove dump 2015-07-15 16:02:28 +02:00
Jane Tournois 4f58f5182e add debug code and fix constness 2015-07-15 16:02:28 +02:00
Jane Tournois 2dd3ae2407 fix remeshing of a patch WITH protection of constrained edges 2015-07-15 16:02:28 +02:00
Jane Tournois d56e54ec6f fix the edge collapse step
degenerate faces where responsible for some self intersections, so we remove
them after collapses and flips

the function that checks that no triangle gets inverted by a flip has also
been fixed
we had to check both the 1-ring of source(h) and target(h), even though those
vertices got the same coordinates
The common faces in their rings were degenerate, but their normals had all to
be checked for consistent orientation

also add more debugging code
2015-07-15 16:02:28 +02:00
Jane Tournois 891b426f82 new attempt to avoid self intersections 2015-07-15 16:02:27 +02:00
Jane Tournois 679e93b252 remove degenerate faces a posteriori 2015-07-15 16:02:27 +02:00
Jane Tournois 7543f35ff2 adapt code to PATCH_BORDER cases and add debugging code 2015-07-15 16:02:27 +02:00
Jane Tournois 97379e50b2 add null vector test (should not happen!) 2015-07-15 16:02:27 +02:00
Jane Tournois 6f667c7a24 reorganize 2015-07-15 16:02:27 +02:00
Jane Tournois 8b5902b038 add function to split long edges listed by the user
this changes the remesher internal API only
2015-07-15 16:02:27 +02:00
Jane Tournois 8d5312d263 reorganize test 2015-07-15 16:02:26 +02:00
Jane Tournois 117a24807d make tests simpler 2015-07-15 16:02:26 +02:00
Jane Tournois 67874c737d fix test when splitting of constraints is allowed 2015-07-15 16:02:26 +02:00
Jane Tournois 2b7bf24205 add documentation for protect_constraints 2015-07-15 16:02:26 +02:00
Jane Tournois 00cc96f968 add code to protect_constraints
edges tagged as constraints are not refined when protect_constraints is true
2015-07-15 16:02:26 +02:00
Jane Tournois ebeb1fdcaa edge_is_constrained_map does not need to be kept as a member
it is used only in the initialization, to fill the halfedge_status_map
2015-07-15 16:02:26 +02:00
Jane Tournois c460008f23 make test simpler (it is equivalent) 2015-07-15 16:02:26 +02:00
Jane Tournois f7204a0a99 add edge_is_constrained_map as a parameter for remeshing
this property map "tags" the edges that should be kept in the remeshed mesh.
They can be splitted or collapsed, but their vertices can't move with the
Laplacian, and they can't be flipped.

in the Polyhedron demo, this feature is integrated in order to remesh two
adjacent surface patches and keep the (possibly sharp) polyline that is
delimitating them
2015-07-15 16:02:26 +02:00
Jane Tournois c554466b80 fix default value 2015-07-15 16:02:25 +02:00
Jane Tournois caad50a628 documentation 2015-07-15 16:02:25 +02:00
Jane Tournois c41bc2250d start documentation for get_border and incremental_triangle_based_remeshing 2015-07-15 16:02:24 +02:00
Jane Tournois e6a7b5a0a3 use get and set to access vertex point map, instead of operator[] 2015-07-15 16:02:24 +02:00
Jane Tournois f958fe7d5d fix warning 2015-07-15 16:02:24 +02:00
Jane Tournois d34d47a6d5 Revert "detect sharp edges and surface patches"
This reverts commit 80b1363f1db4db8391398188bcb33427ffc69aac.
2015-07-15 16:02:23 +02:00
Jane Tournois 83957ed495 add code to the selection tool to be able to select a surface patch
for now it works only for facets and the checkbox is not used
2015-07-15 16:02:23 +02:00
Jane Tournois 54922319ff remove todo 2015-07-15 16:02:23 +02:00
Jane Tournois abc92fcc24 fix assertion code 2015-07-15 16:02:23 +02:00