Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Bezier Arrangement_2 assertion violation: just two line segs

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Bezier Arrangement_2 assertion violation: just two line segs


Chronological Thread 
  • From: Efi Fogel <>
  • To:
  • Subject: Re: [cgal-discuss] Bezier Arrangement_2 assertion violation: just two line segs
  • Date: Mon, 20 May 2019 12:20:31 +0300
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:she2GxaaTEBt4Inie7tnWhv/LSx+4OfEezUN459isYplN5qZr8y9bnLW6fgltlLVR4KTs6sC17OP9fm4CSdZut6oizMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpTEdFQ/iOgVrO+/7BpDdj9it1+C15pbffxhEiCCybL9vMRm6txjdutUVjIdtN6o8xAbCr2dVdehR2W5mP0+YkQzm5se38p5j8iBQtOwk+sVdT6j0fLk2QKJBAjg+PG87+MPktR/YTQuS/XQcSXkZkgBJAwfe8h73WIr6vzbguep83CmaOtD2TawxVD+/4apnVAPkhSEaPDM/7WrZiNF/jLhDrR2uqRxwwY7abo+WOvRjYK3SYcgXSnBdUstLTSFNHp+wYokJAuEcPehYtY79p14WoBWxCwmsBf7kxD9Phn/5w6I61/kqHAbY0wwuHtIOvnPUrNrrO6cWSu21w6zIwi/Cb/NSwzvy9I/IchU4rPyKQLl+f83RyUw1GAPEiFWdsYrlMCmO2esWt2iU8fBsWv6oi24isw1xoz6vxt0tiobTnI4VxErE+CNky4g2Pd21UFB3bcKgHZdKtCyXN5F6Tt4jTmxpoio3yqAKtJimdyYQ0psn3QTQa/mffoiI/B3jUOGRLC99hH1/ebK/gw++8UmnyuHhT8W03lZHojdfntnDsXAN0BPT6syZRfdn4kih3jOP2xjS6uFCP080ibLWJ4A9zrM0jJYeskTOEjXrlEj3jaKabEUp9vWw5+TieLrmp5ucN4FuigH5N6QjgtKwAeo5MggAWGib9vqz1Ln48E32RbVFlPw2kq3DvJ/GIsQbo7a1AxVJ3YY79xa/EzCm3cwEknkINl1FfAuLgJXoO1HVPP/4EOy/g0+3nTdwx/HGO6XhDY/XInjClrfhZ7d95FRGxAo919AMr69SEawLdfLvRlfq5pufFQ48KwXywuD9Cdw72JlZQnOKGqbeMaXcthiD6esrZuWNf4QIoy2uF/9w7PHniTo1mEQWYLKy9ZoRcnGxWPp8cGuDZn+5r9kAWUkNsQc6BLjnhlyMVjFeY169Wqs94ncwD4fwXtSLfZyknLHUhHTzJZZRfG0TUgnRQ0etTJ2NXrI3UAzXIsJllWZZB72oSotk1Bb38QGnkvxoKe3b/iBevpXmhoAsu7/j0Coq/DkxNPyzlnmXRjgtzGwNTj4ymqt4pB4lkwbR4e1Dm/VdUOdrybZMWwY+O4TbyrUjWd/3UwPFONyOTQT/Tw==

Hi gp,

Yes, I can reproduce it.
I saw that you have listed it also in stackoverflow.
It's probably the same bug that has already been reported, but not the one you referred to. (That one got fixed.)
We are working on it...

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




On Sat, 11 May 2019 at 02:30, gp <> wrote:
I've noticed that CGAL::insert on an Arrangement_2< Arr_Bezier_curve_traits_2
> will occasionally violate an assertion. I can't tell exactly what the
erroneous scenarios have in common, but I have a rough idea that they
involve one curve terminating on top of another. I've put together a minimal
example. For me (Windows 8.1, MSVC2015 running in QtCreator, CGAL-4.14),
this fails in debug mode on the assertion of line 234 of
No_intersection_surface_sweep_2_impl.h (in release mode, my system just
crashes):

         CGAL_assertion((m_statusLine.size() == 0));

Can anyone reproduce this?


main.cpp:

#include <CGAL/Cartesian.h>
#include <CGAL/CORE_algebraic_number_traits.h>
#include <CGAL/Arr_Bezier_curve_traits_2.h>
#include <CGAL/Arrangement_2.h>

#include <sstream>

using NtTraits = CGAL::CORE_algebraic_number_traits;
using Rational = NtTraits::Rational;
using Algebraic = NtTraits::Algebraic;
using RationalKernel = CGAL::Cartesian< Rational >;
using AlgebraicKernel = CGAL::Cartesian< Algebraic >;
using ArrTraits = CGAL::Arr_Bezier_curve_traits_2< RationalKernel,
AlgebraicKernel, NtTraits >;
using BezierCurve2 = ArrTraits::Curve_2;
using Arrangement = CGAL::Arrangement_2< ArrTraits >;

int main()
{
    // Change the 10.1 to a 10 and there is no longer an assertion
violation.
    const std::string curvesData =
                "2            \
                2 -10 0 10.1 0 \
                2 10 10 10 0 ";

    std::istringstream stream( curvesData );
    std::vector< BezierCurve2 > curvesToInsert;
    size_t numCurves = 0;
    stream >> numCurves;
    for( size_t i = 0; i < numCurves; i++ ) {
        BezierCurve2 curve;
        stream >> curve;
        curvesToInsert.push_back( curve );
    }

    Arrangement arr;
    // Assertion violation here.
    CGAL::insert( arr, curvesToInsert.begin(), curvesToInsert.end() );
    return 0;
}



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

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