Arrangement_2 demo fails when using 5 points arc

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Arrangement_2 demo fails when using 5 points arc

Nicolas Bonifas
With CGAL 3.3.1, in Conic Traits, create a 5 points arc, then click the
"Delete" button (rubber icon). The demo will fail with following error
message:
arrangement_2: /usr/include/CGAL/CORE/BigFloat.h:241: int
CORE::BigFloat::sign() const:  assertion « (err() == 0 && m() == 0) ||
!(isZeroIn()) » failed.
Many other operations involving 5 points arc results in the demo failing
with the same error message.
Regards,
Nicolas


-- System Information:
Debian Release: lenny/sid
   APT prefers testing
   APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-2-686 (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libcgal-dev depends on:
ii  libatlas-base-dev      3.6.0-21.5        Automatically Tuned Linear
Algebra
ii  libatlas3gf-base [liba 3.6.0-21.5        Automatically Tuned Linear
Algebra
ii  libatlas3gf-sse2 [liba 3.6.0-21.5        Automatically Tuned Linear
Algebra
ii  libboost-dev           1.34.1-11         Boost C++ Libraries
development fi
ii  libboost-graph-dev     1.34.1-11         generic graph components
and algor
ii  libboost-program-optio 1.34.1-11         program options library for C++
ii  libcgal2               3.3.1-3           C++ library for
computational geom
ii  libgmp3-dev            2:4.2.2+dfsg-3    Multiprecision arithmetic
library
ii  liblapack-dev          3.1.1-0.4         library of linear algebra
routines
ii  libmpfr-dev            2.3.1.dfsg.1-2    multiple precision
floating-point
ii  libqt3-mt-dev          3:3.3.8b-5        Qt development files (Threaded)
ii  zlib1g-dev             1:1.2.3.3.dfsg-12 compression library -
development
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Arrangement_2 demo fails when using 5 points arc

efif
This is most likely due to a bug in in CGAL/CORE_Expr.h that has been
fixed internally. The next  release will include the fix. In the
meanwhile, attached is a patch that fixes your problem.

Nicolas Bonifas wrote:

> With CGAL 3.3.1, in Conic Traits, create a 5 points arc, then click
> the "Delete" button (rubber icon). The demo will fail with following
> error message:
> arrangement_2: /usr/include/CGAL/CORE/BigFloat.h:241: int
> CORE::BigFloat::sign() const:  assertion « (err() == 0 && m() == 0) ||
> !(isZeroIn()) » failed.
> Many other operations involving 5 points arc results in the demo
> failing with the same error message.
> Regards,
> Nicolas
>
>
> -- System Information:
> Debian Release: lenny/sid
>   APT prefers testing
>   APT policy: (500, 'testing')
> Architecture: i386 (i686)
>
> Kernel: Linux 2.6.22-2-686 (SMP w/1 CPU core)
> Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/bash
>
> Versions of packages libcgal-dev depends on:
> ii  libatlas-base-dev      3.6.0-21.5        Automatically Tuned
> Linear Algebra
> ii  libatlas3gf-base [liba 3.6.0-21.5        Automatically Tuned
> Linear Algebra
> ii  libatlas3gf-sse2 [liba 3.6.0-21.5        Automatically Tuned
> Linear Algebra
> ii  libboost-dev           1.34.1-11         Boost C++ Libraries
> development fi
> ii  libboost-graph-dev     1.34.1-11         generic graph components
> and algor
> ii  libboost-program-optio 1.34.1-11         program options library
> for C++
> ii  libcgal2               3.3.1-3           C++ library for
> computational geom
> ii  libgmp3-dev            2:4.2.2+dfsg-3    Multiprecision arithmetic
> library
> ii  liblapack-dev          3.1.1-0.4         library of linear algebra
> routines
> ii  libmpfr-dev            2.3.1.dfsg.1-2    multiple precision
> floating-point
> ii  libqt3-mt-dev          3:3.3.8b-5        Qt development files
> (Threaded)
> ii  zlib1g-dev             1:1.2.3.3.dfsg-12 compression library -
> development

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

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss

Index: CORE_Expr.h
===================================================================
--- CORE_Expr.h (revision 38140)
+++ CORE_Expr.h (working copy)
@@ -162,9 +162,7 @@
       : public Unary_function< Type, double > {
       public:
         double operator()( const Type& x ) const {
-          // this call is required to get reasonable values for the double
-          // approximation
-          x.approx( 53, 1 );
+          x.approx(53,1024);
           return x.doubleValue();
         }
     };
@@ -174,7 +172,7 @@
       public:
         std::pair<double, double> operator()( const Type& x ) const {
             std::pair<double,double> result;
-            x.approx(52,1);
+            x.approx(53,1024);
             x.doubleInterval(result.first, result.second);
             CGAL_expensive_assertion(result.first  <= x);
             CGAL_expensive_assertion(result.second >= x);