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: Efi Fogel <>
  • To:
  • Subject: Re: [cgal-discuss] Sanitising polygons before insertion into polygon set
  • Date: Wed, 12 Apr 2017 11:45:34 +0300
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:1rbEiR37xYvLKHAmsmDT+DRfVm0co7zxezQtwd8ZseISIvad9pjvdHbS+e9qxAeQG96Kt7Qc06L/iOPJYSQ4+5GPsXQPItRndiQuroEopTEmG9OPEkbhLfTnPGQQFcVGU0J5rTngaRAGUMnxaEfPrXKs8DUcBgvwNRZvJuTyB4Xek9m72/q89pDXbAhEniaxba9vJxiqsAvdsdUbj5F/Iagr0BvJpXVIe+VSxWx2IF+Yggjx6MSt8pN96ipco/0u+dJOXqX8ZKQ4UKdXDC86PGAv5c3krgfMQA2S7XYBSGoWkx5IAw/Y7BHmW5r6ryX3uvZh1CScIMb7S60/Vza/4KdxUBLniikHOT43/m/Ul8J+kr5UrQm7qBBj2YPZep2ZOOZ8c67bYNgURXBBXsFUVyFZDY28YYoPBPcBM+ZfoInyuV8Opga5CAayCuPvyzFIhnj53aIk1+QsCg7G3Ak6ENIPtHTYtsn6NKAXUe2syqTD0DvNb/RT2Tjn6YjIdAgsofCKXbJqcMre01MjFw3fjlmItYPlMCma1uAXv2ic9epgWuSigHMkpQFpujWj2Nsgh43Tio8Wyl3I7zt1zJg7KNGiVUJ2YsKoHZ1NvC+ALYR2WNktQ2RwtSY61LIGvZm7cTAPyJs9xh7fb+WLc4mP4h7/TeqRLyp0iXF5dL6liBay9k+gyuL4VsaqylpFsi1FktzUunAM0Rzc9NSHR+Nj8ku93TuDzQPe5+FeLUwqi6bWJYQtzqMzm5YPqUjDGzX5mETyjK+YbEUk/e2o5vz5bbXop5+cOYh0ig7gPaQqgcG/DuE4PRIPX2if4+izyLrj/UjhTLVQkvI2irXZsIzdJckDuqG5DBVa0oI65xmiDjemy8gXnWQcLFJeYx+HlIjoO1TWIP/iF/u/glKskC1qx//cJLHhDI/NfTD+lqz8d+N991JE01h0istO4opdTLAHOvP6HEHr88fJCwcwdA2yzeGgA9p00sYSWHmEH7SCY57UqkKCs+IzP/GXNshSoyf4M/Fj5vj0jHZ/l0VaZrisxZJQaXa2GbNtLEydJHbtmdwcCnxZgg1rR+PjjBiOUCVYem2pd6M6/DAyToy8XqnZQYX4rbKAlAm8EZBSLjRLBFGCFnjlc62LXv4NbGSZJco3wW9MbqSoV4J0jULmjwT90bcyduc=

Thanks, please do. 

On Apr 12, 2017 03:58, "Ch'Gans" <> wrote:
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
>>
>>
>

--
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