Subject: CGAL users discussion list
List archive
- From: gp <>
- To:
- Subject: [cgal-discuss] Bezier Arrangement_2 assertion violation: just two line segs
- Date: Fri, 10 May 2019 18:29:39 -0500 (CDT)
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=SoftFail ; spf=Pass
- Ironport-phdr: 9a23:WxSGERHQ2/gDtcS0gEPxdZ1GYnF86YWxBRYc798ds5kLTJ78ps2wAkXT6L1XgUPTWs2DsrQY0rOQ4/GrAzVIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSizexfK5+IA+1oAjVucUan5ZuIbstxxXUpXdFZ/5Yzn5yK1KJmBb86Maw/Jp9/ClVpvks6c1OX7jkcqohVbBXAygoPG4z5M3wqBnMVhCP6WcGUmUXiRVHHQ7I5wznU5jrsyv6su192DSGPcDzULs5Vyiu47ttRRT1jioMKjw3/3zNisFogqxVoAyvqR9izYHbfI6bO+Fzfr/fcN8GWWZNQtpdWzJHD4ihb4UPFe0BPeNAoonyv1sFsByzBQa0BOPvyz9IgmT53bc70+s9EgHLxxEgHtwUv3TIstr1LqMSUeeyzKXS0TrMdepb1DHg44bGdRAhpOuDXbN2ccfJz0kgDRjKgU6UqYP7JT+ayuMNs22d4uF9Vuyvk3Yqpxx1rzWr3MshhIrEipgWx13F7yl0wYc4KNulQ0Bhe9GkCoFftySCOot2XMwiR2ZotT48yrAJo5K7ejIFx488yB7bdfOLaZSH4hXmVOqJIDd4gmxqeK6nihqv9UWtzvfwW8e33VpQrSdIk8PAu3EM2hDL78iIUPp9/kOv2TaV0ADT7/lJIU8slarbKp4hxqU/loASsUvfHS/7g1j2jaGMeUU45Oeo8eDnYrLhppOGK4B7kBnyMr4ylcynHeQ4Lg8OUnCH9uSzzrLj+VT1T6hLjv0tjqbZrYvaJd8Aq66iAw5V154j5AylAzen1tQYh3gHI0hfdBKJlYi6c23Jdfv3BPP6j1W3mypw3NjHOKfgC9PDNCvtirDkKLlloxpT0AoyydpF5plXIqweKe7+QEv2s5rTB0lqYESP3+/7BYAlhcslUmWVD/rBaf6AgRqz/usqZtK0SsoVtTL6cqV34aKoi3Yzk1sQO6Ku2MlOMSzqLrFdO0ycJEHUrJIZC25T4lgjU+X2hUeGVjkVbH/gB/tttAF+M5qvCML4fq7ohbWA2CmhGZgPOjJbFVmQHG3scILCUP5eMy8=
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/
- [cgal-discuss] Bezier Arrangement_2 assertion violation: just two line segs, gp, 05/11/2019
- Re: [cgal-discuss] Bezier Arrangement_2 assertion violation: just two line segs, Efi Fogel, 05/20/2019
Archive powered by MHonArc 2.6.18.