Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] CGAL warning: check violation! in CGAL::Polygon_mesh_processing::remove_self_intersections

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] CGAL warning: check violation! in CGAL::Polygon_mesh_processing::remove_self_intersections


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] CGAL warning: check violation! in CGAL::Polygon_mesh_processing::remove_self_intersections
  • Date: Mon, 2 Jul 2018 11:19:59 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:7zozsx/6SaD9Lf9uRHKM819IXTAuvvDOBiVQ1KB32ukcTK2v8tzYMVDF4r011RmVBduds6oMotGVmpioYXYH75eFvSJKW713fDhBt/8rmRc9CtWOE0zxIa2iRSU7GMNfSA0tpCnjYgBaF8nkelLdvGC54yIMFRXjLwp1Ifn+FpLPg8it2O2+55zebx9UiDahfLh/MAi4oQLNu8cMnIBsMLwxyhzHontJf+RZ22ZlLk+Nkhj/+8m94odt/zxftPw9+cFAV776f7kjQrxDEDsmKWE169b1uhTFUACC+2ETUmQSkhpPHgjF8BT3VYr/vyfmquZw3jSRMMvrRr42RDui9b9mRgL2hicJNzA382/ZhcJ/g61ZvB2vqAdyw5LWbYyPKPZyYq3QcNEcSGFcXshRTStBAoakYocBEuQOI/1XoJPmp1sSrBuxGw+sD/7pxD9PnH/23Ko60/g8Gg3C3QIvAdUOsHHKo9XpLqcTUeC7w7PUwjXfaPNWwzf85I3Gfhs8pvyMRrZwcc3LyUkuEAPFkk+cqYnhPz6O2eQNtnKU7+tkVe61l2EnrARxryGpy8wxhIfJgYcVxUrF9SV/2Is1I8e3R1Vgbt6gDpRcrT2VN4xzQs86TGFovyE6yrICuZGlZiQF1JMnxxvHZ/ObfIiH+BbjWPyWITdii3Jofq+0iRWq8UW41OHwSs253ExJoydFiNXAq24B2h/J5sSaTvZw8V+t1DSM2gzJ9O1JLkE5mbDGJ5MlzLM8jJgevETFEyTrgkv5lrWWeV8h+uWw6+TofLHmppiEOo9xkA7+M6AultWxAOQiLgQCRmab9fm42bDs50H5T7JKjvo5kqndrp/WP9gUpqm8AwNN04Yj7QiwDyu+3dgGgXUKKEhJdRGHgoTzJl3CPvP1Ae2ij1monzpn3/XGMafgApXJIHjDirDhfbNl5k5HzAozyspf55NTCrEdOv7zX0vxucfXDh88KQO0wuLnBM9h2YMZXGKDGrWZP7/KsV+U+uIvJPGBa5MauDnnL/gp/uPhjX4imVABYKmpxoAXZWujHvVmJkWZeWDjjs0AEWcMpAo+TfblhEeMUT5JND6OWPc36Tg/TY6nFozeXZuFgbqb3S79EIcFSHpBDwXGKnrifp6YWvoKIAaVOM5mjnREerWmToI9zwCAvQTmzKB2b6CcrjYcsoji08Qz4un7mhQ79DgyBMOYhTLeB1pol38FEmdllJt0plZwnw/agPpIxsdAHNkW3MtnFwIzNJrS1et/UomgVQfIf9PPQ1GjEIz/XWMBC+kpytpLWH5TXs24h0majSWvCr4R0beMAc5sq/+O7z3KP894jk3++uwhgl0hGJUdMGSngutg7VCWCdeYzwOWkKGlcala1ynIpj+O

This is a debug warning that indicates that filling a hole
failed, it means that it will be tried again with a larger
region. This warning will be gone in release mode.
Using the polyhedron demo, it only took a few seconds to fix
the model so I guess you are in debug mode.

Sebastien.

On 06/27/2018 11:05 AM, sergio wrote:
Hello,
I have the following code to repair the candy_bowl.obj file:

typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;

bool repairOBJFile(const char* filename)
{
std::cerr << "repairOBJFile " << std::endl;
std::ifstream input(filename);
if (!input)
{
std::cerr << "Cannot open file " << std::endl;
return false;
}

std::vector<Kernel::Point_3> points;
std::vector< std::vector<std::size_t> > polygons;
if (!CGAL::read_OBJ(input, points, polygons))
{
std::cerr << "Error parsing the OFF file " << std::endl;
return false;
}
//Mesh mesh;
Polyhedron mesh;
CGAL::Polygon_mesh_processing::orient_polygon_soup(points, polygons);
CGAL::Polygon_mesh_processing::polygon_soup_to_polygon_mesh(points,
polygons, mesh);

bool solved = solved =
CGAL::Polygon_mesh_processing::remove_self_intersections(mesh);

if (!solved)
{
std::cout << "Some self-intersection could not be fixed" <<
std::endl;
//return false;
}

std::ofstream ofs(filename);
CGAL::print_polyhedron_wavefront(ofs, mesh);

return true;
}

during this process the program generate the following warnings:

CGAL warning: check violation!
Expression : !"Returning no output. Filling hole with extra triangles is not
successful!"
File :
C:\dev\CGAL-4.12\include\CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h
Line : 1103
Explanation:
Refer to the bug-reporting instructions at
https://www.cgal.org/bug_report.html

The model is repaired after 971 seconds.

from:

Number self-intersections:..........290 (0.0618804 % of faces)
Number non manifold edge:...........0 (0 % of edges)
Number non manifold vertex:.........63 (0.026893 % of vertices)
IsCoherentlyOriented:...............False
IsOrientable:.......................False
to

Number self-intersections:..........4 (0.000857012 % of faces)
Number non manifold edge:...........0 (0 % of edges)
Number non manifold vertex:.........0 (0 % of vertices)
IsCoherentlyOriented:...............True
IsOrientable:.......................True

Questions:
1. Is it possible to fix the problem related with the warnings?
2. How we can reduce the time of repairing?


the file candy_bowl.obj is included in:
https://drive.google.com/file/d/1UCsstxwBQF--uFMXxcKR4JrQDGdHbB94/view?usp=sharing

Thanks in advance!
Sergio









--
Sent from: http://cgal-discuss.949826.n4.nabble.com/




Archive powered by MHonArc 2.6.18.

Top of Page