Skip to Content.
Sympa Menu

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

Subject: CGAL users discussion list

List archive

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


Chronological Thread 
  • From: sergio <>
  • To:
  • Subject: [cgal-discuss] CGAL warning: check violation! in CGAL::Polygon_mesh_processing::remove_self_intersections
  • Date: Wed, 27 Jun 2018 02:05:44 -0700 (MST)
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=SoftFail ; spf=Pass
  • Ironport-phdr: 9a23:eHaP5BaOzzZ3RFKnuczUf+v/LSx+4OfEezUN459isYplN5qZoMi9bnLW6fgltlLVR4KTs6sC17KI9fi4EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCa8bL9oMBm6sRjau9ULj4dlNqs/0AbCrGFSe+RRy2NoJFaTkAj568yt4pNt8Dletuw4+cJYXqr0Y6o3TbpDDDQ7KG81/9HktQPCTQSU+HQRVHgdnwdSDAjE6BH6WYrxsjf/u+Fg1iSWIdH6QLYpUjmk8qxlSgLniD0fOjA38G/ZlM9+gr9Urx29qBJy2JLUbYOJOPZiYq/RYc0WSGxcVchRTSxBBYa8YpMUD+UfJ+ZYoIj9p1wTpha5GwmjHv/gyj5Ohn/506061P4hEQbd0QwvGtIBqnXUrNHvOKgOVuC1ybDFwDPeZP1Y3jf97ZLHchEnofyUW7J/a9HexlIrFwzblFmftYvlPzaN2uQCtGib6OVgVeaxhGI9tw5xpT2vyt8whYnGnI0VzkrI9SJjwIY6I9CzVU11Yca8HZdNtiyWKZF6Tt0iTmxmoio217MLtJChcCUI1pgqwQPUZeadfIiS+B3jUf6cITdmi3Jhf7KynxCy/Ee6xu36TMa7y01Fri5bndXWqn8N0BnT5tCGSvt74EihxS6C2x3S5+1aO0w4i6rWJpA7zrItmJcev17PEy3olEnuia+ZbEQk+uym6+T9ZbXmo4eRN5FuhQ7iM6QunMO/Aeo/MggUWGiW4uu81Lj58k34RLVGlOE5kq7csJzCP8QUura5AxNJ0oYk8xuwEzim384cnXUeMV1FeQmHgJT0O1HVO/D1Fuy/glSpkDdz3f/KJLzhApPXLnjCirjtZ7h961QPgDY0mNtQ7pYRBrAaK+/oQWfwssbZB1k3KV+a2eHiXc5wzIwfXirbHKaSMaXdv1iS4cogJuCNYMkevzOreKtt3OLnkXJswQxVRqKux5ZCMCnpTMQjGF2QZD/XuvlEFG4LugQkS+mz0Q+NVDdSYzC5WKduvWhnWrLjNp/KQ8WWuJLExD2yR8QEaWVPC1TKGnDtJd3dBqU8LRmKK8okqQQqELisT4h4iEOo6En8wrBtKueS8Sod58vu

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/


  • [cgal-discuss] CGAL warning: check violation! in CGAL::Polygon_mesh_processing::remove_self_intersections, sergio, 06/27/2018

Archive powered by MHonArc 2.6.18.

Top of Page