diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/edge_collapse.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/edge_collapse.h
index 18a6a70c82a..8d57b2c956e 100644
--- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/edge_collapse.h
+++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/edge_collapse.h
@@ -62,24 +62,24 @@ An external property map can be easily obtained by calling
`get(vertex_external_index,surface_mesh)`. This constructs on the fly, and returns,
a property map which non-intrusively associates a proper id with each vertex.
-\cgalHeading{edge_index_map(EdgeIndexMap eim)}
+\cgalHeading{halfedge_index_map(HalfedgeIndexMap eim)}
-Maps each directed edge in the surface mesh into an unsigned integer number
-in the range `[0,num_edges(surface_mesh))`.
+Maps each halfedge in the surface mesh into an unsigned integer number
+in the range `[0,num_halfedges(surface_mesh))`.
-`EdgeIndexMap` must be a model of
+`HalfedgeIndexMap` must be a model of
`ReadablePropertyMap` whose `key_type` is
-`boost::graph_traits::%edge_descriptor`
-and whose `value_type` is
+`boost::graph_traits::%halfedge_descriptor`
+with value type
`boost::graph_traits::%size_type`
-%Default: the property map obtained by calling `get(edge_index,surface_mesh)`,
+%Default: the property map obtained by calling `get(halfedge_index,surface_mesh)`,
which requires the surface mesh edges to have an `id()` member properly initialized to the
require value.
If the edges don't have such an `id()`, you must pass some property map explicitly.
An external property map can be easily obtained by calling
-`get(edge_external_index,surface_mesh)`. This constructs on the fly, and returns,
+`get(halfedge_external_index,surface_mesh)`. This constructs on the fly, and returns,
a property map which non-intrusively associates a proper id with each edge.
\cgalHeading{edge_is_border_map(EdgeIsBorderMap ebm)}
@@ -96,12 +96,12 @@ and whose `value_type` is `bool`.
\cgalHeading{edge_is_constrained_map(EdgeIsConstrainedMap ecm)}
-Maps each undirected edge in the surface mesh into a Boolean value
+Maps each edge in the surface mesh into a Boolean value
which indicates if the edge is constrained.
`EdgeIsConstrainedMap` must be a model
`ReadablePropertyMap` whose `key_type` is
`boost::graph_traits::%edge_descriptor`
-and whose `value_type` is `bool`.
+with value type `bool`.
\attention If this parameter is provided, `surface_mesh` must be a model of the
`EdgeCollapsableSurfaceMeshWithConstraints` concept.
diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/EdgeCollapsableSurfaceMesh.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/EdgeCollapsableSurfaceMesh.h
index 96c780c6d7d..44c2406355d 100644
--- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/EdgeCollapsableSurfaceMesh.h
+++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/EdgeCollapsableSurfaceMesh.h
@@ -23,9 +23,9 @@ to be valid and to return the vertex not removed after collapsing
the undirected edge `(v0v1,v1v0)`.
For `e` \f$ \in \{\f$ `v0v1,v1v0` \f$ \}\f$, let `en` and `ep` be the next and previous
-edges, that is `en = next_edge(e, surface_mesh)`, `ep = prev_edge(e,surface_mesh)`, and let
+edges, that is `en = next(e, surface_mesh)`, `ep = prev(e,surface_mesh)`, and let
`eno` and `epo` be their opposite edges, that is
-`eno = opposite_edge(en, surface_mesh)` and `epo = opposite_edge(ep,surface_mesh)`.
+`eno = opposite(en, surface_mesh)` and `epo = opposite(ep,surface_mesh)`.
Then, after the collapse of `(v0v1,v1v0)` the following holds:
@@ -34,9 +34,9 @@ Then, after the collapse of `(v0v1,v1v0)` the following holds:
One of \f$ \{\f$`v0,v1`\f$ \}\f$ is no longer in `surface_mesh` while the other remains.
\cgalFootnote{Most of the time v0 is the vertex being removed but in some cases removing the edge e requires v1 to be removed. See Figure \ref CollapseFigure5.}
Let `vgone` be the removed vertex and `vkept` be the remaining vertex.
-If `e` was a border edge, that is `get(is_border, e, surface_mesh) == true`, then `next_edge(ep) == en`, and `prev_edge(en) == ep`.
+If `e` was a border edge, that is `get(is_border, e, surface_mesh) == true`, then `next(ep) == en`, and `prev(en) == ep`.
If `e` was not a border edge, that is `get(is_border, e, surface_mesh) == false`, then `ep` and `epo` are no longer in `surface_mesh` while `en` and `eno` are kept in `surface_mesh`.
-For all edges `ie` in `in_edges(vgone,surface_mesh)`, `target(ie,surface_mesh) == vkept` and `source(opposite_edge(ie),surface_mesh) == vkept`.
+For all edges `ie` in `in_edges(vgone,surface_mesh)`, `target(ie,surface_mesh) == vkept` and `source(opposite(ie),surface_mesh) == vkept`.
No other incidence information has changed in `surface_mesh`.
diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h
index 35423f61a28..5dede33433b 100644
--- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h
+++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h
@@ -52,7 +52,7 @@ public:
typedef typename CGAL::Halfedge_around_target_iterator in_edge_iterator;
in_edge_iterator eb, ee ;
- for ( boost::tie(eb,ee) = halfedges_around_target(halfedge(aProfile.v0(), aProfile.surface_mesh()),aProfile.surface_mesh());
+ for ( boost::tie(eb,ee) = halfedges_around_target(aProfile.v0(),aProfile.surface_mesh());
eb != ee ; ++ eb )
{
if( get(Edge_is_constrained_map, *eb) )
@@ -60,7 +60,7 @@ public:
aProfile.surface_mesh(),
aProfile.v0());
}
- for ( boost::tie(eb,ee) = halfedges_around_target(halfedge(aProfile.v1(),aProfile.surface_mesh()),aProfile.surface_mesh());
+ for ( boost::tie(eb,ee) = halfedges_around_target(aProfile.v1(),aProfile.surface_mesh());
eb != ee ; ++ eb )
{
if( get(Edge_is_constrained_map, *eb) )
diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Detail/Lindstrom_Turk_core_impl.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Detail/Lindstrom_Turk_core_impl.h
index eef15173d06..947f7ac6582 100644
--- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Detail/Lindstrom_Turk_core_impl.h
+++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Detail/Lindstrom_Turk_core_impl.h
@@ -550,9 +550,9 @@ void LindstromTurkCore::Add_constraint_from_gradient ( Matrix const& H, V
CGAL_assertion( A0 != NULL_VECTOR ) ;
- Vector AbsA0( CGAL_NTS abs(A0.x())
- , CGAL_NTS abs(A0.y())
- , CGAL_NTS abs(A0.z())
+ Vector AbsA0( CGAL::abs(A0.x())
+ , CGAL::abs(A0.y())
+ , CGAL::abs(A0.z())
);
Vector Q0;
diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile.h
index 6a5e401b9a7..779bb0e6352 100644
--- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile.h
+++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile.h
@@ -35,11 +35,7 @@ class Edge_profile
public:
typedef ECM_ ECM ;
-
- typedef boost::graph_traits ConstGraphTraits ;
- typedef boost::graph_traits GraphTraits ;
-
- typedef typename ConstGraphTraits::vertex_descriptor const_vertex_descriptor ;
+ typedef boost::graph_traits GraphTraits ;
typedef typename GraphTraits::vertex_descriptor vertex_descriptor ;
typedef typename GraphTraits::halfedge_descriptor halfedge_descriptor ;
diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile_impl.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile_impl.h
index 00e17a4a769..079ca6701af 100644
--- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile_impl.h
+++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile_impl.h
@@ -61,7 +61,7 @@ Edge_profile::Edge_profile ( halfedge_descriptor const& aV0V1
if ( left_face_exists() )
{
- CGAL_SURF_SIMPL_TEST_assertion( !mV0V1->is_border() ) ;
+ CGAL_SURF_SIMPL_TEST_assertion( ! is_border(mV0V1) ) ;
mVLV0 = prev(v0_v1(),surface_mesh());
mV1VL = next(v0_v1(),surface_mesh());
@@ -72,12 +72,12 @@ Edge_profile::Edge_profile ( halfedge_descriptor const& aV0V1
}
else
{
- CGAL_SURF_SIMPL_TEST_assertion( mV0V1->is_border() ) ;
+ CGAL_SURF_SIMPL_TEST_assertion( is_border(mV0V1) ) ;
}
if ( right_face_exists() )
{
- CGAL_SURF_SIMPL_TEST_assertion( !mV1V0->is_border() ) ;
+ CGAL_SURF_SIMPL_TEST_assertion( ! is_border(mV1V0) ) ;
mV0VR = next(v1_v0(),surface_mesh());
mVRV1 = prev(v1_v0(),surface_mesh());
@@ -88,7 +88,7 @@ Edge_profile::Edge_profile ( halfedge_descriptor const& aV0V1
}
else
{
- CGAL_SURF_SIMPL_TEST_assertion( mV1V0->is_border() ) ;
+ CGAL_SURF_SIMPL_TEST_assertion( is_border(mV1V0) ) ;
}
if(has_border){
diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/edge_collapse.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/edge_collapse.h
index 5230a9db563..10cdeb878f7 100644
--- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/edge_collapse.h
+++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/edge_collapse.h
@@ -115,7 +115,7 @@ int edge_collapse ( ECM& aSurface
,choose_const_pmap(get_param(aParams,boost::vertex_index),aSurface,boost::vertex_index)
,choose_const_pmap(get_param(aParams,boost::halfedge_index),aSurface,boost::halfedge_index)
,choose_const_pmap(get_param(aParams,halfedge_is_border),aSurface,halfedge_is_border)
- ,No_constrained_edge_map() // AF choose_param (get_param(aParams,edge_is_constrained),No_constrained_edge_map())
+ ,choose_param (get_param(aParams,edge_is_constrained),No_constrained_edge_map())
,choose_param (get_param(aParams,get_cost_policy), LindstromTurk_cost())
,choose_param (get_param(aParams,get_placement_policy), LindstromTurk_placement())
,choose_param (get_param(aParams,vis), Dummy_visitor())
diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/halfedge_collapse_Polyhedron_3.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/halfedge_collapse_Polyhedron_3.h
index 9057ed31619..44ba24c14ec 100644
--- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/halfedge_collapse_Polyhedron_3.h
+++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/halfedge_collapse_Polyhedron_3.h
@@ -73,11 +73,11 @@ halfedge_collapse( typename boost::graph_traits< Polyhedron_3 >::hal
bool lTopFaceExists = !pq->is_border() ;
bool lBottomFaceExists = !qp->is_border() ;
- CGAL_precondition( !lTopFaceExists || (lTopFaceExists && ( target(pt,aSurface)->vertex_degree() > 2 ) ) ) ;
- CGAL_precondition( !lBottomFaceExists || (lBottomFaceExists && ( target(qb,aSurface)->vertex_degree() > 2 ) ) ) ;
+ CGAL_precondition( !lTopFaceExists || (lTopFaceExists && ( degree(target(pt,aSurface),aSurface) > 2 ) ) ) ;
+ CGAL_precondition( !lBottomFaceExists || (lBottomFaceExists && ( degree(target(qb,aSurface),aSurface) > 2 ) ) ) ;
- vertex_descriptor q = pq->vertex();
- vertex_descriptor p = pq->opposite()->vertex();
+ vertex_descriptor q = target(pq,aSurface);
+ vertex_descriptor p = source(pq,aSurface);
CGAL_ECMS_TRACE(3, "Collapsing p-q E" << pq->id() << " (V" << p->id() << "->V" << q->id() << ")" ) ;