Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Sanitising polygons before insertion into polygon set

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Sanitising polygons before insertion into polygon set


Chronological Thread 
  • From: Julia Fischer <>
  • To:
  • Subject: Re: [cgal-discuss] Sanitising polygons before insertion into polygon set
  • Date: Sun, 9 Apr 2017 22:05:48 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:MNd1ExRSC0Q73n3MSoK8R2mPgtpsv+yvbD5Q0YIujvd0So/mwa6yYRaN2/xhgRfzUJnB7Loc0qyN4vymATRIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSijewZbx/IA+qoQnNq8IbnZZsJqEtxxXTv3BGYf5WxWRmJVKSmxbz+MK994N9/ipTpvws6ddOXb31cKokQ7NYCi8mM30u683wqRbDVwqP6WACXWgQjxFFHhLK7BD+Xpf2ryv6qu9w0zSUMMHqUbw5Xymp4qF2QxHqlSgHLSY0/2PZisJwgqxVow+vqQJjzIPPZYGZKOBzc7nBcd8GR2dMWNtaWSxbAoO7aosCF+4PPftcr4n8vVQFsBuwBQi3BOzzyj9HmGX21rA93uQjDAHG2A0gEMgUvHTJsNX6Kr0eUe60zKnT0TrDb+1Z2S3m5YjHdxAuu/CMXbZqfcXNzkkvEhrIg1ONooLrODOV0/4Cs2md7+d4VOKvjXQnqwBrrTS1yMcskJHFiZ4ayl/e8SV12oE1Jce3SEN9fNWqE4NQujmEO4dqRs4uWWJltSYgxrEYp5K2cjIGxIklyhPRbfGMbpKG7Qj5VOmLJDd1nHJld6y7hxa16UWgz/fzVsiw0FpTrypFlcXAumkD1xDO6MWKROFx/kim2TaI2ADT7v9LLVoomqrcLp4t2r8wlpwNvkTfBiL6hln6gauMekgn+uWk8frrbqvoq5OGKoN5iA/zPrwrmsOlAOQ4NgYOX3Kc+eS5zLDj/1D5QLFLjvIsiKXZrYzaKtoBqq63Ag9VyZos6xahADe8y9kYknwHI0hEeBKDlYTmJ1bOIPXgAfeln1usiCtrx+zBPrD5HprNIWLMkLP4cblg6k5c0xY8zc1E55JPEbwBO/LyWkrptNPCFBM5Mgq0w/zmCNpnzI8eV3iPUeekNrjPuwqI+v43OLvLI5QEvS70bfkj/f/ny3Ej3kQMeLGgmpoRZnf/FftvJwCVYGHnn8waQlsN6wExReivhFyZWiNIfF6zWbg973c1EtGIF4DGE6KwhL2IlAm6BZZWa3oOXlKRFXbhMZiYVrECaTmZIsJ7ujMBXLmlDYQm0Ef950fB17N7I7+MqWUjvpX52Y0t6g==



On 7 April 2017 at 22:36, Efi Fogel <> wrote:
If you are using an exact predicate and exact construction kernel, then it seems like a bug; either in the union operation (join) or the validity check.

   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/



On 7 April 2017 at 04:51, Ch'Gans <> wrote:
Hi there,

Every now and then when I join polygons into a polygon set, the
polygon set becomes invalid.

To make sure i am not inserting invalid polygon, i have tried to check
them all individually before calling join(), eg:

std::vector<Polygon_2> allPolygons;
buildPolygons(allPolygons);
Polygon_set_2 S;
for (const auto &poly: allPolygons)
   if (!CGAL::is_valid_unknown_polygon(poly, S.traits()))
     qWarning() << "Found invalid input polygon";
S.join(allPolygons.begin(), allPolygons.end());
if (!S.is_valid()) {
  qDebug() << "Polygon set invalid after inserting all polygons";
}

When i run the above code, i get no "Found invalid input polygon"
warning, yet i get a final "Polygon set invalid after inserting all
polygons" along with this CGAL message:

CGAL warning: check violation!
_expression_ : false
File : /usr/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h
Line : 1407
Explanation: An inner component is located in the wrong face.
Refer to the bug-reporting instructions at http://www.cgal.org/bug_report.html

Is this a bug, or am I not doing the right checks against the input polygons?

Chris

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss




Attachment: signature.sig
Description: PGP signature




Archive powered by MHonArc 2.6.18.

Top of Page