mirror of https://github.com/CGAL/cgal
Merge pull request #2932 from kkatrio/null-edge-hole-filling
PMP hole filling: null edge
This commit is contained in:
commit
1ef766c19b
|
|
@ -1142,7 +1142,7 @@ public:
|
|||
|
||||
triangulate_all(P, Q, WC, std::make_pair(0,n-1), W, lambda);
|
||||
|
||||
if(W.get(0,n-1) == Weight::NOT_VALID()) {
|
||||
if(W.get(0,n-1) == Weight::NOT_VALID() || n <= 2) {
|
||||
#ifndef CGAL_TEST_SUITE
|
||||
CGAL_warning(!"Returning no output. No possible triangulation is found!");
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
3 -1 -1 0 1 1 0 -1 -1 0
|
||||
|
|
@ -223,6 +223,8 @@ void test_should_be_no_output(const char* file_name, bool use_DT) {
|
|||
|
||||
test_should_be_no_output("data/collinear.polylines.txt", true);
|
||||
test_should_be_no_output("data/collinear.polylines.txt", false);
|
||||
test_should_be_no_output("data/null_edge.polylines.txt", true);
|
||||
test_should_be_no_output("data/null_edge.polylines.txt", false);
|
||||
std::cerr << "All Done!" << std::endl;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -114,8 +114,14 @@ public Q_SLOTS:
|
|||
print_message(QString("Triangulated in %1 sec.").arg(timer.time()));
|
||||
|
||||
if(patch.empty()) {
|
||||
print_message("Warning: generating patch is not successful, please try it without 'Delaunay Triangulation'!");
|
||||
continue;
|
||||
if(use_DT){
|
||||
print_message("Warning: generating patch is not successful, please try it without 'Delaunay Triangulation'!");
|
||||
continue;
|
||||
}
|
||||
else{
|
||||
print_message("Warning: generating patch is not successful, skipping.");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(mw->property("is_polyhedron_mode").toBool()){
|
||||
|
|
|
|||
Loading…
Reference in New Issue