fix dump functions used inside debug macro

This commit is contained in:
Jane Tournois 2024-04-26 11:29:39 +02:00
parent 9567710cff
commit 2563f90ee1
2 changed files with 14 additions and 2 deletions

View File

@ -1307,6 +1307,11 @@ void collapse_short_edges(C3T3& c3t3,
CGAL_expensive_assertion(!!is_too_short(e, bd, sizing, c3t3, cell_selector));
CGAL_expensive_assertion(can_be_collapsed(e, c3t3, protect_boundaries, cell_selector));
#ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG
const auto p1 = e.first->vertex(e.second)->point();
const auto p2 = e.first->vertex(e.third)->point();
#endif
Vertex_handle vh = collapse_edge(e, c3t3, sizing,
protect_boundaries, cell_selector,
short_edges,

View File

@ -519,6 +519,12 @@ std::pair<Vh, Vh> make_vertex_pair(const Vh v1, const Vh v2)
else return std::make_pair(v1, v2);
}
template<typename Vh>
std::pair<Vh, Vh> make_vertex_pair(const std::pair<Vh, Vh>& vp)
{
return make_vertex_pair(vp.first, vp.second);
}
template<typename Edge>
auto make_vertex_pair(const Edge& e)
{
@ -1877,8 +1883,9 @@ void dump_edges(const Bimap& edges, const char* filename)
for(typename Bimap::left_const_reference it : edges.left)
{
ofs << "2 " << point(it.first.first->point())
<< " " << point(it.first.second->point()) << std::endl;
const auto vp = make_vertex_pair(it.first);
ofs << "2 " << point(vp.first->point())
<< " " << point(vp.second->point()) << std::endl;
}
ofs.close();
}