Add a function longest_border(PolygonMesh&) to PMP

This commit is contained in:
Andreas Fabri
2017-06-22 16:11:38 +02:00
committed by Mael Rouxel-Labbé
parent b077704d04
commit 7997925bf8
3 changed files with 56 additions and 0 deletions
@@ -97,6 +97,13 @@ void test_pmesh(const Mesh& pmesh)
std::cout << "mesh area (NP) = " << mesh_area_np << std::endl;
assert(mesh_area_np > 0);
std::pair<halfedge_descriptor,double> res = PMP::longest_border(pmesh);
if(res.first == boost::graph_traits<Mesh>::null_halfedge()){
std::cout << "mesh has no border" << std::endl;
} else {
std::cout << "longest border has length = " << res.second <<std::endl;
}
CGAL::Bbox_3 bb = PMP::bbox(pmesh);
std::cout << "bbox x[" << bb.xmin() << "; " << bb.xmax() << "]" << std::endl;
std::cout << " y[" << bb.ymin() << "; " << bb.ymax() << "]" << std::endl;