Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Conditional deletion of edge while iterating in Arrangement_2 package

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Conditional deletion of edge while iterating in Arrangement_2 package


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Conditional deletion of edge while iterating in Arrangement_2 package
  • Date: Tue, 30 Jun 2020 13:42:42 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:ui4+QRLhvJ07/Af5oNmcpTZWNBhigK39O0sv0rFitYgXK/n9rarrMEGX3/hxlliBBdydt6sazbKO+Pm6ESxYuNDd6S1EKMQNHzY+yuwu1zQ6B8CEDUCpZNXLVAcdWPp4aVl+4nugOlJUEsutL3fbo3m18CJAUk6nbVk9Kev6AJPdgNqq3O6u5ZLTfx9IhD2gar9uMRm6twrcutQXjId4Nqo91hTFrmZWd+9LwW9kOU+fkwzz68ut/JNv6Thct+4k+8VdTaj0YqM0QKBCAj87KW41/srrtRfCTQuL+HQRV3gdnwRLDQbY8hz0R4/9vSTmuOVz3imaJtD2QqsvWTu+9adrSQTnhzkBOjUk7WzYkM1wjKZcoBK8uxxyxpPfbY+JOPZieK7WYNUXTndDUMlMTSxMGp6yYZUBD+QBPuhWoYfyqFQMohSiCgehH//vxzxSi3PqwaE33eYsHAfb1wIgBdIOt3HUoc37OKkPT++617PHzS7fb/NXxzj97pXDfBYmofGWXLJwdtbRwlQrGw3EkFqQronlMC2J1uQXs2mV7/BvWv6zi24gsQFwoj2jyskxgYTOnYIVzlfE9T94wIYyOd20Ukt7Ydq/HZtfsiGVLYp2Qsc4T250vyY6z6QLtJimdycF1Jop3QTQa+Cbc4eW+BLjUv6cLzl2in9kdr+yhgq//Fa+x+D/SMS50VlHoy5En9fCuH4AyQDe58eZRvdh+kqs2jiC2Q/Q5+1YPE04iKvWJZ4uzLM2i5Edv0PDHirsl0X3iq+bbkok+um06+Tnf7XpvYWQOJNzigH7Kqgum8q/Af45MgcURWSb9/682bv+9kP6WLVHluM6nrXdvZzAJskWprS1DxJL3osg8RqyACmq3MwGkXYdMF5JZReKgJb1N17UJf30E+uzj0mpnTpl3f/KIKHtD5DWIXTfnrrscrNw5kpTxQUuzd1S4o5bB7IALf/zX0L+qd3VAQIiPAGy3u3pEs9y1pkEVmKKGqKZML3dsVuP5u83JumDfo4VuDLkJ/kr4v7ikGY1mVEScKW3x5cXZ3e4HvNpI0Wdf3XgmMsOEWAPvgYmTezqjkONUSJLanqsQ64x4is3BYGmAIvZW4yhnr+M0D20E5FIfmxGD0qDEXbsd4WKQfcMbyeSL9d6kjwAUrihUY4h1RaytAPgzrpnKvHZ+iIdtZ351dh14/ffmg019TxxF8idyX2CT3lonmMUQD87xLxwoUNnxVeHyKR3nv1YFcdP6PNUSQc6LoXRz/d6CtD3QgLOZM2FSFegQtW8ADE+VMg9w9EUYxU1JtO5kxqW3za2G6RH0PuQFZks++Td2WLwLoBz0THdxaw5hh4nRMVIcmapj6o6+wnIDJPSiBakkb23f5gRzDKY9Huf1XHc+wZDQQtoWOPEW2oebw3Yt5Pi90baRvivD7ogdQBOwMrHJqpRYcDylgZ6Q6LoN93aJm6wgGytHg2gx7WWbYOsdX9O8j/aDR1OqA0Z9G2aNAU4TgOmuWPZEHQuOl/oZk7w6/hQoXinSVUljkvCO1Zl0KC0/QJTgPi0RPYa37ZCsyAk/WYnVG2h1s7bXoLT7zFqe79RNItksQV3kFnBvgk4BaSOaqVrh1oQaQNy5hq82BB+C4EGms8v/ipzkVhCbJmA2VYETAu2mJD9PrqNdzv39RGrLrHTgxTQjIzQ9aAI5/A17V7kuVPxTxZwwzBcy9BQlkCkyNDSFgNLCMD+V082815xoLSIOiQ=

The next version of CGAL will be 5.1 but we continue providing bug-fixes for 4.14 and 5.0. The patch will be part of 4.14.4 and 5.0.3 bug-fix releases as well as the 5.1 release.

Best regards,

Sebastien.

On 6/30/20 1:33 PM, Trần Anh ( via cgal-discuss Mailing List) wrote:
Thanks for the quick response Sebastien :).
Out of curiosity, is milestone 4.14.4 the version number of CGAL? I thought CGAL is at 5.x already. If it is not, why are milestone number and CGAL version different?


On Tue, 30 Jun 2020 at 17:24, "Sebastien Loriot (GeometryFactory)" < <>> wrote:

The following PR fixes the issue:
https://github.com/CGAL/cgal/pull/4820

Note that if (i = 0) is an assignment and will be evaluated to true.

Best,

Sebastien.

On 6/30/20 1:45 AM, Trần Anh (
<> via cgal-discuss
Mailing List) wrote:
> Hi,
> I have a set of edges in an Arrangement and would like to delete the
> edges based on some condition while iterating through the edges.
I have
> the following example:
>
>     #include <CGAL/Cartesian.h>
>     #include <CGAL/MP_Float.h>
>     #include <CGAL/Quotient.h>
>     #include <CGAL/Arr_segment_traits_2.h>
>     #include <CGAL/Arrangement_2.h>
>     typedef CGAL::Quotient<CGAL::MP_Float> Number_type;
>     typedef CGAL::Cartesian<Number_type> Kernel;
>     typedef CGAL::Arr_segment_traits_2<Kernel> Traits_2;
>     typedef Traits_2::Point_2 Point_2;
>     typedef Traits_2::X_monotone_curve_2 Segment_2;
>     typedef CGAL::Arrangement_2<Traits_2> Arrangement_2;
>     int main()
>     {
>     Arrangement_2 arr;
>     Segment_2 cv[3];
>     Point_2 p1(0, 0), p2(0, 4), p3(4, 0);
>     cv[0] = Segment_2(p1, p2);
>     cv[1] = Segment_2(p2, p3);
>     cv[2] = Segment_2(p3, p1);
>     CGAL::insert(arr, &cv[0], &cv[3]);
Arrangement_2::Edge_iterator curr;
>     Arrangement_2::Edge_iterator next = arr.edges_begin(); int i = 0;
>     for (curr = next++; curr != arr.edges_end(); curr = next++)
>     {
>     if (i = 0)
>     {
>     arr.remove_edge(curr);
>     }
>     } return (0);
>     }
>
> However, my Visual Studio was not very happy with the
operation*curr =
> next++*. I was trying to
> replicate  Arrangement_on_surface_2/isolated_vertices.cpp. Very much
> appreciate your help :).
>
>
> --
> 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



--
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.19+.

Top of Page