|
Boost : |
Subject: Re: [boost] Formal Review: Boost.Polygon starts today August 24, 2009
From: Simonson, Lucanus J (lucanus.j.simonson_at_[hidden])
Date: 2009-08-27 12:41:32
Andreas Fabri wrote:
> Hi Luke,
>
> thank you for your explanations for the 45 degree case. You have a
> nice solution. I guess for the general case I have to read the
> BoostCon paper first.
>
> andreas
Thank you for saying so.
As requested, I haved added a test case for which CGAL fails to subversion
https://svn.boost.org/svn/boost/sandbox/gtl/forcgal.cpp
I appologize that the test case is rather large. Expected output is:
$$$$$$$$$$$$ RANDOM TEST $$$$$$$$$$$$$$$$
Square BOXX size: 6000 *************************
CGAL error: precondition violation!
Expr: compare_xy(cv1.right(), p) == LARGER && compare_xy(cv2.right(), p) == LARGER
File: /nfs/ltdn/disks/tcad_lmg_db_exchange_01/CGAL-3.3.1/include/CGAL/Arr_segment_traits_2.h
Line: 609
Explanation:
terminate called after throwing an instance of 'CGAL::Precondition_exception'
what(): CGAL ERROR: precondition violation!
Expr: compare_xy(cv1.right(), p) == LARGER && compare_xy(cv2.right(), p) == LARGER
File: /nfs/ltdn/disks/tcad_lmg_db_exchange_01/CGAL-3.3.1/include/CGAL/Arr_segment_traits_2.h
Line: 609
Abort
This assertion in CGAL code looked to me like some condition that should be ensured by CGAL itself and is an internal error rather than a precondition violation. My interpretation was that the wrong exception type was used. I could be wrong, however, and if you find there was in fact something wrong with the polygon I produced I will eagerly fix my algorithm. My intention was to implement a booleans algorithm with the weakest possible preconditions and the strongest possible postconditions.
Thanks,
Luke
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk