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: "Ch'Gans" <>
  • To:
  • Subject: Re: [cgal-discuss] Sanitising polygons before insertion into polygon set
  • Date: Wed, 12 Apr 2017 13:57:58 +1200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:ksBJ9xKKP0Xr+L/L89mcpTZWNBhigK39O0sv0rFitYgRLfXxwZ3uMQTl6Ol3ixeRBMOAuq4C07KempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgppPOT1HZPZg9iq2+yo9ZDeZwpFiCChbb9uMR67sRjfus4KjIV4N60/0AHJonxGe+RXwWNnO1eelAvi68mz4ZBu7T1et+ou+MBcX6r6eb84TaFDAzQ9L281/szrugLdQgaJ+3ART38ZkhtMAwjC8RH6QpL8uTb0u+ZhxCWXO9D9QLYpUjqg8qhrUgflhyUJNzA5/m/ZidF+grxHrx+6uxxz35TZbJ2JOPZifK7Qe84RS2pbXsZWUixMGo2wYpUPD+YCPOhXtY/9p0AAoRCjAgSjGOPvyjBSiX/wxq03yOshEQfc0wA6GNIOqnvUoczzOawPX+61y6zIwi/Cb/NQwTr96Y7Icgogof6WR75wf9DRxVEzGAPKlFqQrZbpPzSP1uQCtWWQ8uluVfq3hmI5tw18piKjy8Qsh4XTmI4Z11HJ+T9kzIs0IdC1TlNwb8S+H5tKrS6aMpN7QsM8TGFsvyY30rgGtoS6fCgO0Zgn3gLfZ+Cef4iG/x7uVeKcLS13hHJif7K/iBKy/la6xuLgUcm01U5GritDktbSqnAAzwLf5tSDR/dn/Uqs2SyD2x7O5uxFO0w4iKvWJpo5zr41jJUTsEDDHiHsmEXxia+bblkr+uin6+v9ZLXmvYSRN4Bxig7kM6QuntazDvg/MggLR2Sb4/iz1KX//U3lR7VHluE5kqbDv5DePMgUu6+5AxRJ3YY+8Ba/FCyr0M8YnHkCNFJKYgiLj4nvO1HUIfD3F+2zg1q2kGQj+vbdI7e0AonRNmOR1/D6bLNl4ghdzhAyxJZR/dVPG7QZKbXyXEH289fXBxt8Pw2vyPv8E4ZB0dYVVmuLR6OYK6jPqkSg5+Q1IuDKapVGliz6Lq1vzP6honY/ghVVKaKp0pIRc1i3GP0gJF+WNym/yuwdGHsH61JtBNfhj0ePBGZe

On 8 April 2017 at 08: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.

I am using Epeck, so there's either a bug in my code, in the
validation or in the set.
I have tried to build a use case that show the problem without having
to insert thousands of polygons.
So far the simplest use case i found requires to insert ca. 100 circles.
Next step is to serialise these circles and write a simple program to
read them back and insert them into a set, if the problem is still
there, then i will open a ticket on github with the data file and the
simple program.

Chris

>
> ____ _ ____ _
> /_____/_) 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
>>
>>
>



Archive powered by MHonArc 2.6.18.

Top of Page