Commit Graph

362 Commits

Author SHA1 Message Date
Sébastien Loriot fd43d44fa5 do an initial try with the closest point since do_intersect is with a sphere and not a ball 2020-01-28 12:45:29 +01:00
Maxime Gimeno a17c5b1eb2 Update 2020-01-28 12:45:29 +01:00
Maxime Gimeno 5907ec9a18 Add Policy for bounded distance placement 2020-01-28 12:45:29 +01:00
Maxime Gimeno 4351ecfb5e Add test for bench 2020-01-28 12:45:29 +01:00
Mael Rouxel-Labbé 9a7c98f26c Minor code fixes 2019-11-29 11:42:18 +01:00
Mael Rouxel-Labbé 6cbb0d0712 Make the VertexCostMap a member of the policy
If the dynamic property map isn't attached to the mesh, this could not
work previously.
2019-11-29 09:30:54 +01:00
Mael Rouxel-Labbé 55bb46a383 Use DontAlign property for garland heckbert matrices
See discussion in: https://github.com/CGAL/cgal/pull/4279

Initial warning: https://cgal.geometryfactory.com/CGAL/testsuite/results-5.1-Ic-11.shtml#Surface_mesh_simplification_Examples
2019-11-29 09:29:48 +01:00
Mael Rouxel-Labbé 5057df5cb7 Properly forward a parameter 2019-11-20 09:09:05 +01:00
Mael Rouxel-Labbé 0813fd740b Move partial specializations outside of the Edge_collapse.h class 2019-11-19 11:04:14 +01:00
Mael Rouxel-Labbé ddf9be579b Fix conversion warnings 2019-11-15 11:44:04 +01:00
Mael Rouxel-Labbé a0db18b0bb Fix code typo 2019-11-15 11:43:49 +01:00
Mael Rouxel-Labbé a1763c8789 Mark expensive assertions as expensive 2019-11-15 11:43:32 +01:00
Mael Rouxel-Labbé 11e49e817c Fix compilation of SMS trace code 2019-11-15 11:17:19 +01:00
Mael Rouxel-Labbé ea3736ab20 Fix using full specialization of functions within non namespace scopes 2019-11-15 11:11:04 +01:00
Mael Rouxel-Labbé 6f96731156 Fix header license text 2019-10-28 09:41:51 +01:00
Mael Rouxel-Labbé ff09c5d0c8 Merge branch 'SMS-Add_GH_simplification-GF-old' into SMS-Add_GH_simplification-GF 2019-10-25 16:35:53 +02:00
Mael Rouxel-Labbé 1fc58a433f misc code cleaning 2019-10-21 15:31:07 +02:00
Mael Rouxel-Labbé 9b30a557f8 Remove incorrect comment about null placements 2019-10-21 15:21:27 +02:00
Mael Rouxel-Labbé 7be4775087 Fix old assertion that had not been updated when constraints were introduced 2019-10-21 00:22:09 +02:00
Mael 082732ee59
Fix missing include 2019-10-20 01:37:45 +02:00
Mael Rouxel-Labbé 19c02bdd0b Fix missing include 2019-10-19 18:06:05 +02:00
Mael Rouxel-Labbé c488a14d96 Regroup both GH policies within a single class
Simpler API (users don't have to explicit the vertex cost map) + clearer
that they must go together.
2019-10-19 18:03:01 +02:00
Sébastien Loriot c4c1a0b317 Remove license notice in headers manually 2019-10-19 16:00:05 +02:00
Sébastien Loriot 254d60f642 First pass on removing license notice in header for GPL files 2019-10-19 15:23:19 +02:00
Sébastien Loriot 7356421d80 introduce Commercial license SPDX tag 2019-10-19 12:15:19 +02:00
Mael Rouxel-Labbé 09bd731ff9 Finish documentation 2019-10-18 23:09:21 +02:00
Sébastien Loriot 9bd9c68b83 update LGPL[23]+ and GPL[23]+ SPDX tags
ack -l --no-svg "SPDX-License-Identifier: GPL-3.0\+" | xargs sed -i "s/SPDX-License-Identifier: GPL-3.0+/SPDX-License-Identifier: GPL-3.0-or-later/"
ack -l --no-svg "SPDX-License-Identifier: LGPL-3.0\+" | xargs sed -i "s/SPDX-License-Identifier: LGPL-3.0+/SPDX-License-Identifier: LGPL-3.0-or-later/"
ack -l --no-svg "SPDX-License-Identifier: GPL-2.0\+" | xargs sed -i "s/SPDX-License-Identifier: GPL-2.0+/SPDX-License-Identifier: GPL-2.0-or-later/"
ack -l --no-svg "SPDX-License-Identifier: LGPL-2.0\+" | xargs sed -i "s/SPDX-License-Identifier: LGPL-2.0+/SPDX-License-Identifier: LGPL-2.0-or-later/"
2019-10-18 21:57:54 +02:00
Mael Rouxel-Labbé eb2942bc37 No more lies about the concept EdgeProfile, it does not exist.
Users cannot actually set any model, it is hardcoded to be SMS::Edge_profile
2019-10-17 16:19:47 +02:00
Mael Rouxel-Labbé 4ec28cb79b Add a traits class member to Surface_mesh_simplification
Can be passed via named parameters, must be compatible with the VPM
2019-10-17 15:35:56 +02:00
Mael Rouxel-Labbé d7e26020f4 Minor cleaning (no real changes) 2019-10-17 12:53:04 +02:00
Mael Rouxel-Labbé 7b1547d1f0 Continue improving Surface_mesh_simplification
- Use BGL functions
- Simplify trivially simplifiable code
- Use proper nomenclature (no camel code, stop using capital
  on members, etc.)
- Fix Edge and Halfedge being mixed (edge_index_map
  being a halfedge index map, etc.)
- Get rid of package specific macros so that assertions are
  actually doing something
- Minor indentation changes
2019-10-16 16:01:26 +02:00
Mael Rouxel-Labbé a88382283b Clean weird and useless converter shenanigans in OpenMesh-based simplification
Profile::Point is by definition equal to Profile::VPM::value_type,
so it is not converting anything.

Users are free to pass a custom VPM, and in that case things will break
because there is no proper geom traits being passed, but this is an
independent issue that must be fixed.
2019-10-16 15:32:45 +02:00
Mael Rouxel-Labbé e4b2be3e4b Merge branch 'SMS-Add_GH_simplification-GF-old' into SMS-Add_GH_simplification-GF 2019-10-16 12:32:30 +02:00
Mael Rouxel-Labbé f121c194b4 Fixes for GH:
- Actually use the VPM
- Do not compute the planes needlessly: loop faces rather than vertices
- Some minor fixes
2019-10-16 11:06:12 +02:00
Mael Rouxel-Labbé ae3f7d1e1a Revert unpractical change (forces having to specify template parameters) 2019-10-15 14:00:55 +02:00
Mael Rouxel-Labbé d5a05392b0 Fix type 2019-10-15 13:59:09 +02:00
Mael Rouxel-Labbé c0b61fbace Mirror commit c6fc4568fe 2019-10-15 13:59:09 +02:00
Mael Rouxel-Labbé f026201511 Misc SMS cleaning 2019-10-15 13:59:09 +02:00
Mael Rouxel-Labbé 63e8bf841a Fix wrong sign 2019-10-15 13:59:09 +02:00
Mael Rouxel-Labbé cb3c68eca2 Rework the storing of cost marices for GH simplification 2019-10-15 13:59:09 +02:00
Mael Rouxel-Labbé 7b3a59f355 Remove undesired files 2019-10-15 13:59:07 +02:00
Mael Rouxel-Labbé d7f615dd6e Clean code 2019-10-15 13:58:13 +02:00
Baskin Senbaslar a662c97f00 map_type change to state_type 2019-10-15 13:58:13 +02:00
Mael Rouxel-Labbé bfdaf7f2de Do not return a cost if there is no placement (GH) 2019-10-15 13:58:13 +02:00
Baskin Senbaslar 2c37b32f92 borders are handled based on edges instead of vertices 2019-10-15 13:58:13 +02:00
Baskin Senbaslar 0e0c312bf4 garland&heckbert border bad simplification issue solved 2019-10-15 13:58:13 +02:00
Baskin Senbaslar cd7fd75efc GarlandHeckbert_cost_stop_predicate added 2019-10-15 13:58:13 +02:00
Baskin Senbaslar 9438b6c168 several changes, fix the issue with plane normal normalization 2019-10-15 13:58:10 +02:00
Sébastien Loriot c6fc4568fe do not collapse an edge is the placement cannot be computed 2019-08-19 13:45:45 +02:00
Sébastien Loriot 25a05e9f4c Merge branch 'CGAL-named_function_parameters-4.14' into master
Conflicts resolved by hand
2019-07-28 23:46:43 +02:00
Sébastien Loriot 560c77f567 rename named function parameter class 2019-07-15 06:25:02 +02:00
Sébastien Loriot cebf0657d8 Use a full CGAL version of named function parameters
no longer rely on boost
2019-07-14 22:45:47 +02:00
Baskin Senbaslar b4e313e323 garland&heckbert null-face problem solved, 1 more example added for polyhedron meshes 2019-06-13 16:09:06 +03:00
Baskin Senbaslar 0c893d8167 garland&heckbert non invertible derivative matrix handled with alternative optimization 2019-06-11 17:39:22 +03:00
Baskin Senbaslar 22e02f0d65 Add garland&heckbert mesh simplification first structure and implementation 2019-06-07 22:59:59 +03:00
Mael Rouxel-Labbé b2cb2e708d Clean interal code
- Get rid of abusive and often useless 'using'
- Rename Detail to internal to align with conventions
- put internal code in 'internal' namespace
- Put include headers where they matter rather than in Common.h
2019-05-09 11:41:58 +02:00
Mael Rouxel-Labbé 2e178c106b Remove "convenience" headers that are actually just cluttering things up 2019-05-09 09:40:36 +02:00
Mael Rouxel-Labbé 6d8d0b564c Clean SMS code (whitespace, indentation, variable names, clumsy for loops, etc) 2019-05-09 09:31:35 +02:00
Mael Rouxel-Labbé 4747f8ccaf Improve reader sanity
- Re-indent to more normal standards
- Remove usage of *_impl.h
- Clean useless and trailing whitespace
- some minor code readability changes
2019-05-03 14:56:21 +02:00
Sébastien Loriot ce126b87c6 remove cpp11::copy_n, cpp11::prev, and cpp11::next and use std instead 2019-03-29 13:28:32 +01:00
Sébastien Loriot e474d61fa7 handle the case of degenerate volumes in the link condition
a volume is degenerate if it consists only of twice the same face
with opposite orientation
2018-09-04 10:09:08 +02:00
Sebastien Loriot c09e6ec7bc
Merge pull request #2741 from sloriot/SMS-clean_up_doc
Cleanup documentation
2018-05-07 11:29:48 +02:00
Maxime Gimeno 7fa4b380d2 fixes in includes logic. 2018-02-02 12:08:05 +01:00
Sébastien Loriot f2b1e70d80 rename ECM -> TM in code 2018-01-16 10:03:06 +01:00
Sébastien Loriot ee297db460 Merge remote-tracking branch 'cgal/releases/CGAL-4.11-branch' 2017-12-21 15:16:10 +01:00
Sébastien Loriot 09a7f58410 Merge remote-tracking branch 'cgal/releases/CGAL-4.10-branch' 2017-12-21 15:15:20 +01:00
Sébastien Loriot 989264e32b only the counts must be tight
lSize must be num_edges as we use an array for edge property
we access using halfedge index properties
2017-12-21 15:08:20 +01:00
Laurent Rineau f37630bc0f Merge branch 'releases/CGAL-4.11-branch'
# Conflicts:
#	Kernel_23/test/Kernel_23/include/CGAL/_Result_of_kernel.h
#	Kernel_23/test/Kernel_23/test_result_of.cpp
2017-12-05 18:14:23 +01:00
Laurent Rineau 9513533b68 Merge pull request #2643 from sloriot/SMS-use_tight_edge_numbers
Use a tight count for the number of edges
2017-12-05 17:58:25 +01:00
Sébastien Loriot 4e8639edb9 workaround a warning with MSVC 2017-12-04 11:50:52 +01:00
Sébastien Loriot c0eb7c33e1 use a tight count for the number of edges 2017-11-29 14:54:12 +01:00
Sébastien Loriot ee57fc2d6c add SPDX identifier for files under the GPL-3+ license 2017-11-12 10:17:51 +01:00
Andreas Fabri 5b69ef7783 Add typedef .. ECM so that one can wrap the Midpoint_placement 2017-10-05 08:39:31 +01:00
Laurent Rineau e5f49829cd Merge pull request #2350 from sloriot/SMS-fix_link_computation
Fix the link computation for edges on the border
2017-08-28 12:57:15 +02:00
Sébastien Loriot 4d68958d82 fix the link computation
the only tedious point is what to do with the target vertices
of endleft and endright that might be the target of the
halfedges used to start the link extraction
(that is opp(prev(v0v1)) and opp(prev(v1v0)))
The fix consists in checking whether such a vertex will be (were) added
by the next (previous) while-loop.
2017-08-24 11:07:03 +02:00
Andreas Fabri 6c0323fc8a fix typos and indentation 2017-07-17 16:39:27 +02:00
Maxime Gimeno d019010144 Fix exemple 2017-06-28 11:28:05 +02:00
Simon Giraudot 4749fda6a1 Bugfix: missing typename 2017-06-26 11:08:34 +02:00
Andreas Fabri b21d6a18aa Fix and comment as Mael suggested 2017-06-26 11:08:34 +02:00
Andreas Fabri 836ca79279 Fix Bounded_normal_change_placement.h 2017-06-26 11:08:34 +02:00
Andreas Fabri c55f66a170 WIP: document new placement 2017-06-26 11:08:34 +02:00
Andreas Fabri 00f3c27eae Add a placement class that avoids a change of >90deg of facet normals 2017-06-26 11:08:33 +02:00
Andreas Fabri 3f46969e88 resolve merge conflict 2017-06-26 11:08:33 +02:00
Sébastien Loriot e9395aba6f move enum for named parameters inside internal_np namespace 2017-02-13 10:25:28 +01:00
Maxime Gimeno e1430aa6ac Use CGAL::parameters in edge_collapse.h for parameters. 2017-02-10 10:20:32 +01:00
Sébastien Loriot 50510c05ea add include directive for license of all GPL header files
done using:
ack-grep "^GPL" */package_info/*/license.txt -l | awk -F "/" '{print $1}' > /tmp/gpl_packages
for i in `cat /tmp/gpl_packages | \
          grep -v Operations_on_polyhedra | \
          grep -v Algebraic_kernel_for_circles | \
          grep -v Algebraic_kernel_for_spheres | \
          grep -v Polyhedron_IO`;
do
  echo $i
  python Scripts/developer_scripts/add_license_in_pkg_header.py $i
done
python Scripts/developer_scripts/add_license_in_pkg_header.py Operations_on_polyhedra Polygon_mesh_processing
python Scripts/developer_scripts/add_license_in_pkg_header.py Algebraic_kernel_for_circles Circular_kernel_2
python Scripts/developer_scripts/add_license_in_pkg_header.py Algebraic_kernel_for_spheres Circular_kernel_3
python Scripts/developer_scripts/add_license_in_pkg_header.py Polyhedron_IO Polyhedron
2017-01-19 15:20:25 +01:00
Laurent Rineau 3b04501a63 Merge pull request #1698 from sloriot/SMS-missing_ns
Add missing namespace
2016-12-02 11:35:34 +01:00
Sébastien Loriot 16f1b07adc add missing namespace 2016-11-16 22:13:21 +01:00
Sébastien Loriot 6325b309f3 add a stop predicate to collapse all short edges 2016-10-21 14:43:33 +02:00
Andreas Fabri c45730530c Fix package Surface_mesh_simplification: include headers 2016-09-30 15:23:14 +02:00
Sébastien Loriot cd60cfc2d2 named parameters are in parameters namespace 2015-03-17 16:20:37 +01:00
Andreas Fabri f242567a3f fix wording and indentation 2014-12-30 16:04:01 +01:00
Andreas Fabri 4937d02271 make the trace code work for Surface_mesh 2014-12-30 11:57:05 +01:00
Andreas Fabri cb62891f8e Use size_type of the graph 2014-12-29 12:55:37 +01:00
Andreas Fabri 9f6807b005 Add Tds_2::collapse_edge() 2014-12-18 08:25:57 +01:00
Andreas Fabri 896add20d3 fix implementation of number_of.. 2014-11-12 17:03:54 +01:00
Andreas Fabri cc20bf42a8 bug fixes 2014-11-12 15:42:21 +01:00
Sébastien Loriot 0da71942d1 is_topologically_valid is aware of pinching and handle it as topological feature 2014-08-28 10:47:42 +02:00
Sébastien Loriot 5f4813b64d properties_Polyhedron_3.h is now included by graph_traits_Polyhedron_3.h 2014-07-04 17:24:05 +02:00
Andreas Fabri 00be4cd8fa Don't use const Point& but property_traits<..>::reference 2014-07-02 17:44:10 +02:00
Andreas Fabri c836b21521 no typename needed 2014-06-19 18:45:29 +02:00
Andreas Fabri 4ba2eae6bf replace copy pasted specific code by a call to a generic function 2014-06-19 13:42:38 +02:00
Sébastien Loriot 432bf75c3c remove extra template paramater 2014-06-11 14:15:00 +02:00
Andreas Fabri 51990f53e3 Remove border property map and switch from halfedge to edge constraints.
The latter has a bug as edge_constrain_sharp_edges removed constrained edges
2014-06-04 13:03:31 +02:00
Andreas Fabri 02ba12b686 fix Constrained_placement 2014-06-03 17:41:55 +02:00
Andreas Fabri e1b6990d42 Add a vertex-point property map so that we can use the mesh simplification with OpenMesh 2014-06-03 16:37:40 +02:00
Andreas Fabri ec5dceb0e7 BGL style in assertions 2014-06-03 09:55:59 +02:00
Andreas Fabri b866447f54 Add an example for simplifying an OpenMesh 2014-05-30 16:19:28 +02:00
Andreas Fabri 0e02466b2b remove halfedge_collapse_Polyhedron_3.h 2014-05-28 12:13:48 +02:00
Andreas Fabri c753fc97ff add Euler::collapse_edge taking into account constrained edges 2014-05-28 11:46:24 +02:00
Andreas Fabri a26b6ef84c #if 0 the low level implementation of collapse_edge as it has a bug 2014-05-28 10:30:36 +02:00
Andreas Fabri 1949cd5122 first changes in the manual 2014-05-27 17:52:08 +02:00
Andreas Fabri de34478f85 fix the mesh_simplification_plugin 2014-05-27 17:10:43 +02:00
Andreas Fabri c552dce7c6 first pass to switch to the BFL API 2014-05-27 16:02:42 +02:00
Sébastien Loriot ecc86d3bd7 add code for backward compatibility
Note that the result is still the same without the patch.
Indeed, the uniqueness of link vertices is guaranteed if the
collapse of the edge is topologically valid.
This patch is just to avoid users having cost/placement
relying on the former behavior even for non-topologically
valid collapse (which seems unlikely to happen)
2014-05-23 17:13:27 +02:00
Andreas Fabri e9edf5efac bug fix 2014-04-11 09:46:42 +02:00
Sébastien Loriot 720e3d3578 make the order of vertices in the link similar as bcb7cc03 2014-04-10 15:54:01 +02:00
Sébastien Loriot 97b5300a66 clean up 2014-04-10 15:32:27 +02:00
Sébastien Loriot c867c1d2e2 remove unused variable 2014-04-10 15:22:20 +02:00
Andreas Fabri d4f88fd138 bugfix. endleft and endright were not initialized if the surface has a border 2014-04-10 15:09:09 +02:00
Andreas Fabri 0ca4d8de85 Use the border property map (not the top level provided one, but the one obtained with get(edge_border...) 2014-04-10 10:44:26 +02:00
Andreas Fabri bcb7cc0332 Rewrite of Extract_triangles_and_link() using no map 2014-04-10 10:11:33 +02:00
Andreas Fabri e986d53df6 typo 2014-04-10 09:17:01 +02:00
Andreas Fabri c45eb40191 Check initially if the surface has borders 2014-04-09 17:18:45 +02:00
Andreas Fabri 6f278a3837 Rewrite of Extract_borders()
Don't use a map, but start from the edge that we want to contract
and turn around the two vertices by looking at each edge exactly once
2014-04-09 15:34:25 +02:00
Andreas Fabri cf28acb826 Use less index maps 2014-04-09 15:04:33 +02:00
Andreas Fabri 0b63624b1e Move the reserve to the right spot
Don't use a vertex index map
2014-04-09 13:51:15 +02:00
Andreas Fabri 3558831f22 reserve 2014-04-09 13:43:37 +02:00
Panagiotis Cheilaris 0edd0e2943 put a field access in assertion code
This fix removes a warning in compilation of mesh_simplification_plugin
in demos (in some environments).
2014-03-07 15:42:54 +01:00
Panagiotis Cheilaris 6812889b8f use a value from insert in Edge_profile_impl
This fix removes a warning in compilation of mesh_simplification_plugin
in demos (in some environments).
2014-03-06 19:20:09 +01:00
Sébastien Loriot 5786041a31 uniformly use surface mesh in the documentation, the API and the examples
This induces a renaming of the Concept EdgeCollapsableMesh to
  EdgeCollapsableSurfaceMesh and the same for the constrained version.
2014-02-13 16:33:45 +01:00
Sébastien Loriot 9b79c9a842 make sure all edges removable are removed
After the collapse of an edge the 2-ring of edges incident
  to the remaining vertex are reinserted in PQ when no longer in PQ.
  An exemple is also updated to show the issue if we remove the fix.
2014-02-13 16:32:47 +01:00
Sébastien Loriot 8384c6be3c fix warnings in the testsuite 2014-01-31 12:02:17 +01:00
Sébastien Loriot 9dcd94d753 do not use a halfedge after it has been removed 2014-01-30 15:28:19 +01:00
Sébastien Loriot c5b7ccef71 remove warning 2014-01-30 15:27:57 +01:00
Sébastien Loriot 9311883c97 rename Constrained_placement_wrapper to Constrained_placement 2014-01-30 14:39:30 +01:00
Sébastien Loriot b28fadc2c3 handle zero-length edges and constrained correctly
Handle constrained edges of length 0
Remove from the queue edges removed (not related to constraints)
Avoid calling Collapse directly to avoid updating neighbors
2014-01-30 14:08:29 +01:00
Sébastien Loriot e2ad879473 update debug print function to use pmap instead of assuming id() is available 2014-01-30 13:23:37 +01:00
Sébastien Loriot a5c75e732c take into account the constrained edges and ensure they will not disappear
The code is fully backward compatible and is written to not
penalize the runtime when no edge is constrained
2014-01-29 19:05:10 +01:00
Sébastien Loriot 8135ef739c add some debug code to get intermediate mesh during simplification 2014-01-29 19:05:09 +01:00
Sébastien Loriot 0c14664977 Add a is-constrained edge map without using it for now 2014-01-29 19:04:55 +01:00
Sébastien Loriot a503a77aee remove an edge if topology stays the same+don't process an already removed edge 2013-09-25 13:23:06 +02:00
Sébastien Loriot 82b2ebc865 apply the cpp0x namespace renaming in all files 2012-12-19 11:33:17 +01:00
Sébastien Loriot 1fec6c7ca1 remove edges of length 0 instead of ignoring them 2012-09-07 14:19:24 +00:00
Philipp Möller 8f1ce2412c Removed all places where the CGAL_CFG_NO_TMPL_IN_TMPL work-around was
used. Those were mostly in Polyhedron and HalfedgeDS but some places
in Arrangement_2 used it, too. Neither of the parts of Arrangement_2
have been documented.
2012-04-13 13:13:30 +00:00
Laurent Rineau 8f59fd9592 Turn QPL into LGPLv3+ 2012-01-13 16:33:35 +00:00
Laurent Rineau 1e3c229440 merge from next 2011-08-26 13:55:12 +00:00
Andreas Fabri 56587380e9 Add missing () 2011-06-14 12:55:51 +00:00
Andreas Fabri 94ffff62f4 opposite(..) -> opposite_edge(..) 2011-06-14 12:46:55 +00:00
Andreas Fabri 6641069273 Replace next_edge_ccw, as it's implementation circulates around target and not source 2011-06-11 19:59:15 +00:00