some low level code cleanup. renamed

* CGAL_error to CGAL_error_msg
* introduced a macro CGAL_error()
* added some words about CGAL_error to the developers manual
* renamed most of assert(x) into CGAL_assertion(x)
* renamed exit(x) with x != 0 , CGAL_assertion(false) and assert(false) into CGAL_error
* CORE left untouched, OpenNL changed
This commit is contained in:
Andreas Meyer 2007-11-07 16:51:18 +00:00
parent 80f14be579
commit fdeedcf8b0
185 changed files with 1724 additions and 1722 deletions

View File

@ -336,7 +336,7 @@ void single_benchmark( std::string filename, std::string isolator, int samples =
single_benchmark< Coeff, Boundary, Rep_class,
CGAL::CGALi::Bitstream_descartes< typename CGAL::Polynomial< Coeff >, Boundary > >( filename, samples );
else
CGAL_error( "Unknown isolator class" );
CGAL_error_msg( "Unknown isolator class" );
}
template< class Coeff_ >
@ -352,7 +352,7 @@ void single_benchmark( std::string filename, std::string rep_class, std::string
single_benchmark< Coeff, Boundary,
CGAL::CGALi::Algebraic_real_rep_bfi< Coeff, Boundary > >( filename, isolator, samples );
else
CGAL_error( "Unknown rep class" );
CGAL_error_msg( "Unknown rep class" );
}
int main( int argc, char** argv ) {
@ -368,7 +368,7 @@ int main( int argc, char** argv ) {
// single_benchmark< CGAL::Sqrt_extension< leda_integer, leda_integer > >( argv[4], argv[2], argv[3], samples );
single_benchmark< CGAL::Sqrt_extension< CORE::BigInt, CORE::BigInt > >( argv[4], argv[2], argv[3], samples );
else
CGAL_error( "Unknown coefficient type" );
CGAL_error_msg( "Unknown coefficient type" );
} else {
std::cerr << "No parameters found" << std::endl;

View File

@ -308,7 +308,7 @@ public:
Comparison_result operator()(const Xy_coordinate_2& xy1,
const Xy_coordinate_2& xy2) const {
CGAL_error("Compare_y_2 functor not yet implemented");
CGAL_error_msg("Compare_y_2 functor not yet implemented");
return CGAL::EQUAL;
}
};
@ -785,7 +785,7 @@ public:
// check if there is an event of curve p at r.x()
if(cv_line.is_event()) {
if(cv_line_r.is_event())
CGAL_error("you're lucky )) this is not an easy \
CGAL_error_msg("you're lucky )) this is not an easy \
case..");
//std::cout << "sign at event of curve p\n";
// this is an event of curve p but not of r.curve() ->

View File

@ -247,7 +247,7 @@ public:
* TODO: Loos-algorithm
*/
X_coordinate_1 y() const {
CGAL_error("Not yet implemented");
CGAL_error_msg("Not yet implemented");
return this->ptr()->_m_x;
}

View File

@ -440,7 +440,7 @@ operator >> (std::istream& is,
break;
}
default:{
CGAL_error("ALGEBRAIC_TYPE unexpected!" );
CGAL_error_msg("ALGEBRAIC_TYPE unexpected!" );
}
}
return is;

View File

@ -53,7 +53,7 @@ namespace CGALi {
class Test_to_double<NT, ::CGAL::Null_functor> {
public:
void operator() (::CGAL::Null_functor) {
CGAL_error("To_double functor not implemented");
CGAL_error_msg("To_double functor not implemented");
}
};
@ -90,7 +90,7 @@ namespace CGALi {
class Test_to_Interval<NT, ::CGAL::Null_functor> {
public:
void operator() (::CGAL::Null_functor) {
CGAL_error("To_Interval not implemented");
CGAL_error_msg("To_Interval not implemented");
// ok, nothing to test
}
};

View File

@ -17,25 +17,27 @@
// Author(s) : Monique Teillaud, Sylvain Pion
// Partially supported by the IST Programme of the EU as a Shared-cost
// RTD (FET Open) Project under Contract No IST-2000-26473
// (ECG - Effective Computational Geometry for Curves and Surfaces)
// and a STREP (FET Open) Project under Contract No IST-006413
// RTD (FET Open) Project under Contract No IST-2000-26473
// (ECG - Effective Computational Geometry for Curves and Surfaces)
// and a STREP (FET Open) Project under Contract No IST-006413
// (ACS -- Algorithms for Complex Shapes)
#ifndef CGAL_ALGEBRAIC_KERNEL_FOR_CIRCLES_FUNCTIONS_ON_ROOTS_AND_POLYNOMIALS_2_H
#define CGAL_ALGEBRAIC_KERNEL_FOR_CIRCLES_FUNCTIONS_ON_ROOTS_AND_POLYNOMIALS_2_H
#include <CGAL/basic.h>
namespace CGAL {
namespace AlgebraicFunctors {
template < class AK, class OutputIterator >
inline
inline
OutputIterator
solve( const typename AK::Polynomial_for_circles_2_2 & e1,
const typename AK::Polynomial_for_circles_2_2 & e2,
OutputIterator res )
{
assert( ! (e1 == e2) ); // polynomials of this type cannot be multiple
CGAL_precondition( ! (e1 == e2) ); // polynomials of this type cannot be multiple
// of one another if they are not equal
typedef typename AK::FT FT;
@ -58,8 +60,8 @@ namespace CGAL {
const FT y_base = ((e1.b() + e2.b()) + dy*diff_sqr_rad / dist2) / 2;
if (sign_disc == ZERO) {
// one double root,
// no need to care about the boolean of the Root_of
// one double root,
// no need to care about the boolean of the Root_of
*res++ = std::make_pair
( Root_for_circles_2_2
(Root_of_2(x_base), Root_of_2(y_base)),
@ -74,49 +76,49 @@ namespace CGAL {
if (sign_dy == ZERO) {
const FT y_root_coeff = dx / (2 * dist2);
if(sign_dx == NEGATIVE) {
* res++ = std::make_pair
( Root_for_circles_2_2(Root_of_2(x_base),
* res++ = std::make_pair
( Root_for_circles_2_2(Root_of_2(x_base),
make_root_of_2(y_base, y_root_coeff, disc)),
static_cast<unsigned>(1) );
* res++ = std::make_pair
( Root_for_circles_2_2(Root_of_2(x_base),
make_root_of_2(y_base, -y_root_coeff, disc)),
static_cast<unsigned>(1) );
} else {
* res++ = std::make_pair
( Root_for_circles_2_2(Root_of_2(x_base),
* res++ = std::make_pair
( Root_for_circles_2_2(Root_of_2(x_base),
make_root_of_2(y_base, -y_root_coeff, disc)),
static_cast<unsigned>(1) );
* res++ = std::make_pair
( Root_for_circles_2_2(Root_of_2(x_base),
make_root_of_2(y_base, y_root_coeff, disc)),
static_cast<unsigned>(1) );
}
return res;
return res;
}
if (sign_dx == ZERO) {
const FT x_root_coeff = dy / (2 * dist2);
if(sign_dy == POSITIVE) {
* res++ = std::make_pair
( Root_for_circles_2_2(make_root_of_2(x_base, -x_root_coeff, disc),
* res++ = std::make_pair
( Root_for_circles_2_2(make_root_of_2(x_base, -x_root_coeff, disc),
Root_of_2(y_base)),
static_cast<unsigned>(1) );
* res++ = std::make_pair
( Root_for_circles_2_2(make_root_of_2(x_base, x_root_coeff, disc),
( Root_for_circles_2_2(make_root_of_2(x_base, x_root_coeff, disc),
Root_of_2(y_base)),
static_cast<unsigned>(1) );
} else {
* res++ = std::make_pair
( Root_for_circles_2_2(make_root_of_2(x_base, x_root_coeff, disc),
* res++ = std::make_pair
( Root_for_circles_2_2(make_root_of_2(x_base, x_root_coeff, disc),
Root_of_2(y_base)),
static_cast<unsigned>(1) );
* res++ = std::make_pair
( Root_for_circles_2_2(make_root_of_2(x_base, -x_root_coeff, disc),
( Root_for_circles_2_2(make_root_of_2(x_base, -x_root_coeff, disc),
Root_of_2(y_base)),
static_cast<unsigned>(1) );
}
@ -127,22 +129,22 @@ namespace CGAL {
const FT y_root_coeff = dx / (2 * dist2);
if (sign_dy == POSITIVE) {
* res++ = std::make_pair
( Root_for_circles_2_2(make_root_of_2(x_base, -x_root_coeff, disc),
* res++ = std::make_pair
( Root_for_circles_2_2(make_root_of_2(x_base, -x_root_coeff, disc),
make_root_of_2(y_base, y_root_coeff, disc)),
static_cast<unsigned>(1) );
* res++ = std::make_pair
( Root_for_circles_2_2(make_root_of_2(x_base, x_root_coeff, disc),
( Root_for_circles_2_2(make_root_of_2(x_base, x_root_coeff, disc),
make_root_of_2(y_base, -y_root_coeff, disc)),
static_cast<unsigned>(1) );
} else {
* res++ = std::make_pair
( Root_for_circles_2_2(make_root_of_2(x_base, x_root_coeff, disc),
( Root_for_circles_2_2(make_root_of_2(x_base, x_root_coeff, disc),
make_root_of_2(y_base, -y_root_coeff, disc)),
static_cast<unsigned>(1) );
* res++ = std::make_pair
( Root_for_circles_2_2(make_root_of_2(x_base, -x_root_coeff, disc),
* res++ = std::make_pair
( Root_for_circles_2_2(make_root_of_2(x_base, -x_root_coeff, disc),
make_root_of_2(y_base, y_root_coeff, disc)),
static_cast<unsigned>(1) );
}
@ -151,13 +153,13 @@ namespace CGAL {
}
template < class AK >
inline
inline
Sign sign_at( const typename AK::Polynomial_for_circles_2_2 & equation,
const typename AK::Root_for_circles_2_2 & r)
{
typedef typename AK::Root_of_2 Root_of_2;
Comparison_result c = compare(square(r.x() - equation.a()),
equation.r_sq() -
Comparison_result c = compare(square(r.x() - equation.a()),
equation.r_sq() -
square(r.y() - equation.b()));
if(c == EQUAL) return ZERO;
if(c == LARGER) return POSITIVE;
@ -167,7 +169,7 @@ namespace CGAL {
template <class AK>
typename AK::Root_for_circles_2_2
x_critical_point(const typename AK::Polynomial_for_circles_2_2 & c,
x_critical_point(const typename AK::Polynomial_for_circles_2_2 & c,
bool i)
{
typedef typename AK::Root_of_2 Root_of_2;
@ -180,7 +182,7 @@ namespace CGAL {
template <class AK, class OutputIterator>
OutputIterator
x_critical_points(const typename AK::Polynomial_for_circles_2_2 & c,
x_critical_points(const typename AK::Polynomial_for_circles_2_2 & c,
OutputIterator res)
{
typedef typename AK::Root_of_2 Root_of_2;
@ -191,13 +193,13 @@ namespace CGAL {
make_root_of_2(c.a(),FT(-1),c.r_sq()), c.b());
*res++ = Root_for_circles_2_2(
make_root_of_2(c.a(),FT(1),c.r_sq()), c.b());
return res;
}
template <class AK>
typename AK::Root_for_circles_2_2
y_critical_point(const typename AK::Polynomial_for_circles_2_2 &c,
y_critical_point(const typename AK::Polynomial_for_circles_2_2 &c,
bool i)
{
typedef typename AK::Root_of_2 Root_of_2;
@ -207,19 +209,19 @@ namespace CGAL {
const Root_of_2 b1 = make_root_of_2(c.b(),FT(i?-1:1),c.r_sq());
return Root_for_circles_2_2(c.a(),b1);
}
template <class AK, class OutputIterator>
OutputIterator
y_critical_points(const typename AK::Polynomial_for_circles_2_2 & c,
y_critical_points(const typename AK::Polynomial_for_circles_2_2 & c,
OutputIterator res)
{
typedef typename AK::Root_of_2 Root_of_2;
typedef typename AK::FT FT;
typedef typename AK::Root_for_circles_2_2 Root_for_circles_2_2;
*res++ = Root_for_circles_2_2(c.a(),
*res++ = Root_for_circles_2_2(c.a(),
make_root_of_2(c.b(),-1,c.r_sq()));
*res++ = Root_for_circles_2_2(c.a(),
*res++ = Root_for_circles_2_2(c.a(),
make_root_of_2(c.b(),1,c.r_sq()));
return res;

View File

@ -38,7 +38,7 @@ public:
double x = random_integer(r_, b_, true);
double y = random_integer(r_, b_, true);
double w = random_integer(r_, B_, false);
assert( w >= 0 );
CGAL_assertion( w >= 0 );
typename Site_2::Point_2 p(x, y);
return Site_2(p, w);

View File

@ -3,7 +3,6 @@
#include <CGAL/basic.h>
#include <cstdlib>
#include <cassert>
#include <CGAL/Gmpz.h>
// type "man {rand, random, drand48}" for C functions that produce
@ -18,11 +17,11 @@ CGAL_BEGIN_NAMESPACE
// powers of 2 from 2^0 to 2^53
double
P2[54]={1.0, 2.0, 4.0, 8.0, 16.0, 32.0, 64.0, 128.0, 256.0,
512.0, 1024.0, 2048.0, 4096.0, 8192.0, 16384.0, 32768.0,
512.0, 1024.0, 2048.0, 4096.0, 8192.0, 16384.0, 32768.0,
65536.0, 131072.0, 262144.0, 524288.0, 1048576.0,
2097152.0, 4194304.0, 8388608.0, 16777216.0, 33554432.0,
67108864.0, 134217728.0, 268435456.0, 536870912.0,
1073741824.0, 2147483648.0, 4294967296.0, 8589934592.0,
1073741824.0, 2147483648.0, 4294967296.0, 8589934592.0,
17179869184.0, 34359738368.0, 68719476736.0,
137438953472.0, 274877906944.0, 549755813888.0,
1099511627776.0, 2199023255552.0, 4398046511104.0,
@ -85,7 +84,7 @@ double random_even_integer(Random& r, unsigned int b,
// b is required to be at least 1 and at most 52
// and if allow_negative is true then the range includes negative
// numbers as well and becomes: [-2^b + 1, 2^b - 1).
assert( b >= 0 && b <= 52 );
CGAL_precondition( b >= 0 && b <= 52 );
if ( b == 0 ) { return 0; }

View File

@ -79,7 +79,7 @@ protected:
case (2) : return radical_side(p1, p3, p2, 3);
case (3) : return radical_side(p1, p2, p3, 3);
default :
CGAL_assertion_msg(false, "Case should not hapen");
CGAL_error_msg( "Case should not hapen");
return ZERO;
}
}
@ -153,7 +153,7 @@ protected:
} else if (i == 3) {
ool = ordered_on_line(p1, p3, p2);
} else {
CGAL_assertion_msg(false, "this does not happen.");
CGAL_error_msg( "this does not happen.");
ool = false;
}

View File

@ -136,7 +136,7 @@ protected:
std::vector< Point_2 > compute_points(const FT &d) const
{
assert(d >= 0);
CGAL_assertion(d >= 0);
FT d1 = distance(o, c) + d;
FT d2 = distance(o, l) + d;
d2 = d1;

View File

@ -13,14 +13,14 @@
//
// $URL$
// $Id$
//
//
//
// Author(s) : Kaspar Fischer <fischerk@inf.ethz.ch>
#ifndef CGAL_APPROX_MIN_ELL_CONFIGURE_H
#define CGAL_APPROX_MIN_ELL_CONFIGURE_H
#include <cassert>
#include <CGAL/basic.h>
#include <iostream>
#include <iomanip>
@ -51,7 +51,7 @@
// (Todo: these routines turned out to not be the most useful for
// debugging; one could improve this, but it's only debugging, so who
// cares ...)
//
//
// - CGAL_APPEL_ASSERT(expr): Asserts that the expression expr evaluates
// to true. This only happens when the assertion mode is enabled. This
// macro should only be used for cheap assertions (which do not heavily
@ -91,15 +91,15 @@
//
#ifdef CGAL_APPEL_ASSERTION_MODE
#define CGAL_APPEL_ASSERT(expr) assert(expr)
#define CGAL_APPEL_ASSERT(expr) CGAL_assertion(expr)
#else
#define CGAL_APPEL_ASSERT(expr)
#define CGAL_APPEL_ASSERT(expr)
#endif
#ifdef CGAL_APPEL_EXP_ASSERTION_MODE
#define CGAL_APPEL_ASSERT_EXPENSIVE(expr) CGAL_assertion(expr)
#else
#define CGAL_APPEL_ASSERT_EXPENSIVE(expr)
#define CGAL_APPEL_ASSERT_EXPENSIVE(expr)
#endif
#ifdef CGAL_APPEL_LOG_MODE
@ -111,13 +111,13 @@
Logger::instance().log(channel,s.str()); \
}
#else
#define CGAL_APPEL_LOG(channel,expr)
#define CGAL_APPEL_LOG(channel,expr)
#endif
#if defined(CGAL_APPEL_ASSERTION_MODE)||defined(CGAL_APPEL_EXP_ASSERTION_MODE)
#define CGAL_APPEL_IF_ASSERTIONS(expr) expr
#else
#define CGAL_APPEL_IF_ASSERTIONS(expr)
#define CGAL_APPEL_IF_ASSERTIONS(expr)
#endif
#ifdef CGAL_APPEL_TIMER_MODE
@ -149,16 +149,16 @@
#define CGAL_APPEL_TIMER_STRING(timer) \
CGAL::Approximate_min_ellipsoid_d_impl::Timer::instance().lapse(timer)
#else
#define CGAL_APPEL_TIME(expr)
#define CGAL_APPEL_TIMER_START(timer)
#define CGAL_APPEL_TIMER_PRINT(channel,timer,msg)
#define CGAL_APPEL_TIMER_STRING(timer)
#define CGAL_APPEL_TIME(expr)
#define CGAL_APPEL_TIMER_START(timer)
#define CGAL_APPEL_TIMER_PRINT(channel,timer,msg)
#define CGAL_APPEL_TIMER_STRING(timer)
#endif
#ifdef CGAL_APPEL_STATS_MODE
#define CGAL_APPEL_IF_STATS(expr) expr
#else
#define CGAL_APPEL_IF_STATS(expr)
#define CGAL_APPEL_IF_STATS(expr)
#endif
#include <CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_debug.h>

View File

@ -214,7 +214,7 @@ namespace CGAL {
// fetch current usage:
rusage now;
int status = getrusage(RUSAGE_SELF,&now);
assert(status == 0);
CGAL_assertion(status == 0);
// save it:
timers[std::string(timer_name)] = now.ru_utime;
@ -223,12 +223,12 @@ namespace CGAL {
float lapse(const char *name)
{
// assert that start(name) has been called before:
assert(timers.find(std::string(name)) != timers.end());
CGAL_assertion(timers.find(std::string(name)) != timers.end());
// get current usage:
rusage now;
int status = getrusage(RUSAGE_SELF,&now);
assert(status == 0);
CGAL_assertion(status == 0);
// compute elapsed usage:
now.ru_utime -= (*timers.find(std::string(name))).second;

View File

@ -1357,7 +1357,7 @@ public:
return lm_pl->locate(pt);
// doesnt suppose to reach there
CGAL_assertion(false);
CGAL_error();
return CGAL::Object();
}
@ -1384,7 +1384,7 @@ public:
}
// doesnt suppose to reach there
CGAL_assertion(false);
CGAL_error();
return CGAL::Object();
}
@ -1411,7 +1411,7 @@ public:
}
// doesnt suppose to reach there
CGAL_assertion(false);
CGAL_error();
return CGAL::Object();
}

View File

@ -338,7 +338,7 @@ namespace CGAL {
return object_to_object_variant<CircularKernel, Arc1, Arc2>
(container, res);
}
CGAL_assertion(false);
CGAL_error();
return res;//for no warning
}

View File

@ -143,7 +143,7 @@ protected:
virtual void _create_points_set (Points_set & /* points */)
{
std::cerr << "should not reach here!"<< std::endl;
CGAL_assertion(false);
CGAL_error();
}
};

View File

@ -90,7 +90,7 @@ Object Arr_trapezoid_ric_point_location<Arrangement_2>
return (CGAL::make_object (vh));
}
else
CGAL_assertion(false);
CGAL_error();
break;
}
@ -104,7 +104,7 @@ Object Arr_trapezoid_ric_point_location<Arrangement_2>
{
//ixx
std::cerr << "curve is: "<<cv<<" point is: "<<p <<std::endl;
CGAL_assertion(false);
CGAL_error();
}
break;
}
@ -136,7 +136,7 @@ Object Arr_trapezoid_ric_point_location<Arrangement_2>
}
default:
CGAL_TRAP_PRINT_DEBUG("DEFAULT");
CGAL_assertion(false);
CGAL_error();
break;
}
@ -181,7 +181,7 @@ Object Arr_trapezoid_ric_point_location<Arrangement>
return (CGAL::make_object (vh));
}
else
CGAL_assertion(false);
CGAL_error();
break;
case TD::CURVE:
@ -202,7 +202,7 @@ Object Arr_trapezoid_ric_point_location<Arrangement>
return (_check_isolated_for_vertical_ray_shoot(h, p, shoot_up));
default:
CGAL_assertion(false);
CGAL_error();
break;
}

View File

@ -363,7 +363,7 @@ public:
bool can_refine_pt = can_refine(cp, left, right);
if (!can_refine)
{
CGAL_assertion(false);
CGAL_error();
}
*/
@ -1023,28 +1023,28 @@ private:
res = intersection (skew1a, skew2a);
if (!assign(p, res))
{
CGAL_assertion(false);
CGAL_error();
}
aux_vec.push_back(p);
res = intersection (skew1a, skew2b);
if (!assign(p, res))
{
CGAL_assertion(false);
CGAL_error();
}
aux_vec.push_back(p);
res = intersection (skew1b, skew2a);
if (!assign(p, res))
{
CGAL_assertion(false);
CGAL_error();
}
aux_vec.push_back(p);
res = intersection (skew1b, skew2b);
if (!assign(p, res))
{
CGAL_assertion(false);
CGAL_error();
}
aux_vec.push_back(p);

View File

@ -511,7 +511,7 @@ public:
case NO_BOUNDARY:
default:
// doesn't suppose to reach here at all.
CGAL_assertion(false);
CGAL_error();
}
}

View File

@ -514,7 +514,7 @@ public:
case NO_BOUNDARY:
default:
// doesn't suppose to reach here at all.
CGAL_assertion(false);
CGAL_error();
}
}

View File

@ -142,7 +142,7 @@ PrintInfinityType(Boundary_type x, Boundary_type y)
case AFTER_DISCONTINUITY:
case BEFORE_SINGULARITY:
case AFTER_SINGULARITY:
CGAL_assertion(false);
CGAL_error();
}
}

View File

@ -629,7 +629,7 @@ Print()
case BEFORE_DISCONTINUITY:
case AFTER_DISCONTINUITY:
case BEFORE_SINGULARITY:
case AFTER_SINGULARITY: CGAL_assertion(false); break;
case AFTER_SINGULARITY: CGAL_error(); break;
case MINUS_INFINITY: std::cout<<" X = -00 "; break;
case PLUS_INFINITY: std::cout<<" X = +00 "; break;
@ -639,12 +639,12 @@ Print()
case BEFORE_DISCONTINUITY:
case AFTER_DISCONTINUITY:
case BEFORE_SINGULARITY:
case AFTER_SINGULARITY: CGAL_assertion(false); break;
case AFTER_SINGULARITY: CGAL_error(); break;
case MINUS_INFINITY: std::cout<<" Y = -00 "; break;
case PLUS_INFINITY: std::cout<<" Y = +00 "; break;
case NO_BOUNDARY:
CGAL_assertion(false);
CGAL_error();
}
}
}

View File

@ -204,13 +204,13 @@ public:
CGAL_assertion(boundary_in_y == PLUS_INFINITY);
return LARGER;
default:
CGAL_assertion(false);
CGAL_error();
break;
}
//doesnt suppose to reach here (all options have been handles by now)
CGAL_assertion(false);
CGAL_error();
return SMALLER;
}

View File

@ -1357,7 +1357,7 @@ public:
return lm_pl->locate(pt);
// doesnt suppose to reach there
CGAL_assertion(false);
CGAL_error();
return CGAL::Object();
}
@ -1384,7 +1384,7 @@ public:
}
// doesnt suppose to reach there
CGAL_assertion(false);
CGAL_error();
return CGAL::Object();
}
@ -1411,7 +1411,7 @@ public:
}
// doesnt suppose to reach there
CGAL_assertion(false);
CGAL_error();
return CGAL::Object();
}

View File

@ -338,7 +338,7 @@ namespace CGAL {
return object_to_object_variant<CircularKernel, Arc1, Arc2>
(container, res);
}
CGAL_assertion(false);
CGAL_error();
return res;//for no warning
}

View File

@ -1263,28 +1263,28 @@ private:
res = f_intersect (skew1a, skew2a);
if (! assign (p, res))
{
CGAL_assertion(false);
CGAL_error();
}
aux_vec.push_back(p);
res = f_intersect (skew1a, skew2b);
if (! assign(p, res))
{
CGAL_assertion(false);
CGAL_error();
}
aux_vec.push_back(p);
res = f_intersect (skew1b, skew2a);
if (! assign(p, res))
{
CGAL_assertion(false);
CGAL_error();
}
aux_vec.push_back(p);
res = f_intersect (skew1b, skew2b);
if (!assign(p, res))
{
CGAL_assertion(false);
CGAL_error();
}
aux_vec.push_back(p);

View File

@ -143,7 +143,7 @@ protected:
virtual void _create_points_set (Points_set & /* points */)
{
std::cerr << "should not reach here!"<< std::endl;
CGAL_assertion(false);
CGAL_error();
}
};

View File

@ -90,7 +90,7 @@ Object Arr_trapezoid_ric_point_location<Arrangement_2>
return (CGAL::make_object (vh));
}
else
CGAL_assertion(false);
CGAL_error();
break;
}
@ -104,7 +104,7 @@ Object Arr_trapezoid_ric_point_location<Arrangement_2>
{
//ixx
std::cerr << "curve is: "<<cv<<" point is: "<<p <<std::endl;
CGAL_assertion(false);
CGAL_error();
}
break;
}
@ -136,7 +136,7 @@ Object Arr_trapezoid_ric_point_location<Arrangement_2>
}
default:
CGAL_TRAP_PRINT_DEBUG("DEFAULT");
CGAL_assertion(false);
CGAL_error();
break;
}
@ -181,7 +181,7 @@ Object Arr_trapezoid_ric_point_location<Arrangement>
return (CGAL::make_object (vh));
}
else
CGAL_assertion(false);
CGAL_error();
break;
case TD::CURVE:
@ -202,7 +202,7 @@ Object Arr_trapezoid_ric_point_location<Arrangement>
return (_check_isolated_for_vertical_ray_shoot(h, p, shoot_up));
default:
CGAL_assertion(false);
CGAL_error();
break;
}

View File

@ -554,7 +554,7 @@ public:
const Halfedge * /* e2 */) const
{
// This function is never called in case of an arrangement on a sphere:
CGAL_assertion(false);
CGAL_error();
return false;
}
@ -645,7 +645,7 @@ public:
Halfedge * split_fictitious_edge(Halfedge * /* e */, Vertex * /* v */)
{
// There are no fictitious halfedges:
CGAL_assertion(false);
CGAL_error();
return NULL;
}

View File

@ -13,7 +13,7 @@
//
// $URL$
// $Id$
//
//
//
// Author(s) : Baruch Zukerman <baruchzu@post.tau.ac.il>
// Ron Wein <wein@post.tau.ac.il>
@ -40,30 +40,30 @@ template <class Traits_, class Arrangement_>
class Arr_qdx_batched_pl_helper
{
public:
typedef Traits_ Traits_2;
typedef Arrangement_ Arrangement_2;
typedef typename Arrangement_2::Face_const_handle Face_const_handle;
typedef Sweep_line_empty_visitor<Traits_2> Base_visitor;
typedef typename Base_visitor::Event Event;
typedef typename Base_visitor::Subcurve Subcurve;
protected:
typedef typename Arrangement_2::Topology_traits Topology_traits;
typedef typename Arrangement_2::Halfedge_const_handle
typedef typename Arrangement_2::Halfedge_const_handle
Halfedge_const_handle;
typedef typename Arrangement_2::Vertex_const_handle Vertex_const_handle;
// Data members:
const Topology_traits *m_top_traits;// The topology-traits class.
#if 0
Halfedge_const_handle m_top_fict; // The current top fictitious halfedge.
#endif
public:
/*!
* Constructor.
* \param arr The arrangement.
@ -71,29 +71,27 @@ public:
Arr_qdx_batched_pl_helper (const Arrangement_2 *arr) :
m_top_traits (arr->topology_traits())
{}
/// \name Notification functions.
//@{
/* A notification issued before the sweep process starts. */
void before_sweep ();
/*!
* A notification invoked after the sweep-line finishes handling the given
* event.
*/
void after_handle_event (Event* event);
//@}
/*! Get the current top face. */
Face_const_handle top_face () const
{
#if 0
return (m_top_fict->face());
#endif
std::cout << "Arr_qdx_batched_pl_helper::top_face not yet implemenet"
<< std::endl;
assert(false);
CGAL_error( "Arr_qdx_batched_pl_helper::top_face not yet implemented" );
return;
}
};
@ -112,26 +110,24 @@ void Arr_qdx_batched_pl_helper<Tr, Arr>::before_sweep ()
// Initialize the fictitious halfedge lying on the top edge of the
// fictitious face. We start from the leftmost halfedge, which is
// incident to the top-left vertex and directed from right to left.
Vertex_const_handle v_tl =
Vertex_const_handle v_tl =
Vertex_const_handle (m_top_traits->top_left_vertex());
m_top_fict = v_tl->incident_halfedges();
if (m_top_fict->direction() == LEFT_TO_RIGHT)
m_top_fict = m_top_fict->next()->twin();
CGAL_assertion_code (
Vertex_const_handle v_tr =
Vertex_const_handle v_tr =
Vertex_const_handle (m_top_traits->top_right_vertex());
);
CGAL_assertion ((m_top_fict->source() == v_tr) ||
(m_top_fict->source()->boundary_in_x() == NO_BOUNDARY &&
m_top_fict->source()->boundary_in_y() == PLUS_INFINITY));
return;
#endif
std::cout << "Arr_qdx_batched_pl_helper::before_sweep not yet implemenet"
<< std::endl;
assert(false);
CGAL_error("Arr_qdx_batched_pl_helper::before_sweep not yet implemented" );
return;
}
@ -149,18 +145,16 @@ void Arr_qdx_batched_pl_helper<Tr, Arr>::after_handle_event
// edge we keep.
if (event->is_finite())
return;
if (event->boundary_in_x() != NO_BOUNDARY)
return;
if (event->boundary_in_y() == PLUS_INFINITY)
m_top_fict = m_top_fict->twin()->next()->twin();
return;
#endif
std::cout << "Arr_qdx_batched_pl_helper::after_handle_event not yet implemenet"
<< std::endl;
assert(false);
CGAL_error( "Arr_qdx_batched_pl_helper::after_handle_event not yet implemented" );
return;
}

View File

@ -675,7 +675,7 @@ locate_curve_end (const X_monotone_curve_2& cv, Curve_end ind,
break;
}
default:
CGAL_assertion(false); // cannot happen
CGAL_error(); // cannot happen
break;
}
}
@ -1242,7 +1242,7 @@ bool Arr_qdx_topology_traits_2<GeomTraits, Dcel_>::is_unbounded
}
/* NOT REACHED */
CGAL_assertion(false);
CGAL_error();
return false;
}
case 2:
@ -1251,11 +1251,11 @@ bool Arr_qdx_topology_traits_2<GeomTraits, Dcel_>::is_unbounded
return false;
default:
//std::cout << "More than two outer_ccbs! Not nice!" << std::endl;
CGAL_assertion(false);
CGAL_error();
}
/* should not be reached */
CGAL_assertion(false);
CGAL_error();
return (false);
}

View File

@ -13,7 +13,7 @@
//
// $URL$
// $Id$
//
//
//
// Author(s) : Baruch Zukerman <baruchzu@post.tau.ac.il>
// Ron Wein <wein@post.tau.ac.il>
@ -40,30 +40,30 @@ template <class Traits_, class Arrangement_>
class Arr_torus_batched_pl_helper
{
public:
typedef Traits_ Traits_2;
typedef Arrangement_ Arrangement_2;
typedef typename Arrangement_2::Face_const_handle Face_const_handle;
typedef Sweep_line_empty_visitor<Traits_2> Base_visitor;
typedef typename Base_visitor::Event Event;
typedef typename Base_visitor::Subcurve Subcurve;
protected:
typedef typename Arrangement_2::Topology_traits Topology_traits;
typedef typename Arrangement_2::Halfedge_const_handle
typedef typename Arrangement_2::Halfedge_const_handle
Halfedge_const_handle;
typedef typename Arrangement_2::Vertex_const_handle Vertex_const_handle;
// Data members:
const Topology_traits *m_top_traits;// The topology-traits class.
#if 0
Halfedge_const_handle m_top_fict; // The current top fictitious halfedge.
#endif
public:
/*!
* Constructor.
* \param arr The arrangement.
@ -71,29 +71,27 @@ public:
Arr_torus_batched_pl_helper (const Arrangement_2 *arr) :
m_top_traits (arr->topology_traits())
{}
/// \name Notification functions.
//@{
/* A notification issued before the sweep process starts. */
void before_sweep ();
/*!
* A notification invoked after the sweep-line finishes handling the given
* event.
*/
void after_handle_event (Event* event);
//@}
/*! Get the current top face. */
Face_const_handle top_face () const
{
#if 0
return (m_top_fict->face());
#endif
std::cout << "Arr_torus_batched_pl_helper::top_face not yet implemenet"
<< std::endl;
assert(false);
CGAL_error( "Arr_torus_batched_pl_helper::top_face not yet implemented" );
return;
}
};
@ -112,26 +110,24 @@ void Arr_torus_batched_pl_helper<Tr, Arr>::before_sweep ()
// Initialize the fictitious halfedge lying on the top edge of the
// fictitious face. We start from the leftmost halfedge, which is
// incident to the top-left vertex and directed from right to left.
Vertex_const_handle v_tl =
Vertex_const_handle v_tl =
Vertex_const_handle (m_top_traits->top_left_vertex());
m_top_fict = v_tl->incident_halfedges();
if (m_top_fict->direction() == LEFT_TO_RIGHT)
m_top_fict = m_top_fict->next()->twin();
CGAL_assertion_code (
Vertex_const_handle v_tr =
Vertex_const_handle v_tr =
Vertex_const_handle (m_top_traits->top_right_vertex());
);
CGAL_assertion ((m_top_fict->source() == v_tr) ||
(m_top_fict->source()->boundary_in_x() == NO_BOUNDARY &&
m_top_fict->source()->boundary_in_y() == PLUS_INFINITY));
return;
#endif
std::cout << "Arr_torus_batched_pl_helper::before_sweep not yet implemenet"
<< std::endl;
assert(false);
CGAL_error( "Arr_torus_batched_pl_helper::before_sweep not yet implemented" );
return;
}
@ -149,18 +145,16 @@ void Arr_torus_batched_pl_helper<Tr, Arr>::after_handle_event
// edge we keep.
if (event->is_finite())
return;
if (event->boundary_in_x() != NO_BOUNDARY)
return;
if (event->boundary_in_y() == PLUS_INFINITY)
m_top_fict = m_top_fict->twin()->next()->twin();
return;
#endif
std::cout << "Arr_torus_batched_pl_helper::after_handle_event not yet implemenet"
<< std::endl;
assert(false);
CGAL_error( "Arr_torus_batched_pl_helper::after_handle_event not yet implemenet" );
return;
}

View File

@ -707,7 +707,7 @@ Arr_torus_topology_traits_2<GeomTraits,Dcel_>::hole_creation_after_edge_removal
// status: to implement
std::cout << "Arr_torus_topology_traits_2 hole_creation" << std::endl;
CGAL_assertion(false); // hole_creation not finally implemented for torus
CGAL_error(); // hole_creation not finally implemented for torus
CGAL_precondition (! he->is_on_inner_ccb());
CGAL_precondition (! he->opposite()->is_on_inner_ccb());
@ -844,7 +844,7 @@ bool Arr_torus_topology_traits_2<GeomTraits, Dcel_>::is_in_face
std::cout << "TODO: Arr_torus_topology_traits_2::is_in_face"
<< std::endl;
CGAL_assertion(false); // is_in_face not implemented for torus
CGAL_error(); // is_in_face not implemented for torus
// TODO is_in_face NEEDED for incremental insertion
return false;

View File

@ -329,7 +329,7 @@ before_handle_event (Event* event)
case NO_BOUNDARY:
default:
// We are not supposed to reach here at all.
CGAL_assertion(false);
CGAL_error();
}
return;

View File

@ -547,7 +547,7 @@ protected:
bool /* is_new */,
Tag_false )
{
CGAL_assertion(false);
CGAL_error();
}
#ifdef VERBOSE

View File

@ -109,7 +109,7 @@ void Basic_sweep_line_2<Tr, Visit, Crv, Evnt, Alloc>::PrintInfinityType
return;
case NO_BOUNDARY:
default:
CGAL_assertion(false);
CGAL_error();
}
}

View File

@ -582,7 +582,7 @@ public:
break;
case NO_BOUNDARY:
default:
CGAL_assertion(false);
CGAL_error();
}
}
}

View File

@ -825,7 +825,7 @@ Traits_test<T_Traits>::translate_enumerator(std::string & str_value)
} else if (str_value == "EQUAL" ) {
return static_cast<unsigned int>(CGAL::EQUAL);
}
CGAL_assertion(false);
CGAL_error();
return static_cast<unsigned int>(-220776); // My birthday :-)
}
@ -916,7 +916,7 @@ bool Traits_test<T_Traits>::boundary_in_x_wrapper(std::istringstream & str_strea
template <class T_Traits>
bool Traits_test<T_Traits>::boundary_in_x_wrapper_imp(std::istringstream & , CGAL::Tag_false)
{
CGAL_assertion(false);
CGAL_error();
return false;
}
@ -943,7 +943,7 @@ bool Traits_test<T_Traits>::boundary_in_x_wrapper_imp(std::istringstream & str_s
}
}
//should not get here
CGAL_assertion(false);
CGAL_error();
return false;
}
@ -959,7 +959,7 @@ bool Traits_test<T_Traits>::boundary_in_y_wrapper(std::istringstream & str_strea
template <class T_Traits>
bool Traits_test<T_Traits>::boundary_in_y_wrapper_imp(std::istringstream &, CGAL::Tag_false)
{
CGAL_assertion(false);
CGAL_error();
return false;
}
@ -986,7 +986,7 @@ bool Traits_test<T_Traits>::boundary_in_y_wrapper_imp(std::istringstream & str_s
}
}
//should not get here
CGAL_assertion(false);
CGAL_error();
return false;
}
@ -1179,7 +1179,7 @@ compare_y_at_x_left_wrapper_imp(std::istringstream & ,
CGAL::Tag_false)
{
// std::istringstream dummy_stream(str_stream); //to avoid warnings of unused variable
CGAL_assertion(false);
CGAL_error();
return false;
}
@ -1489,7 +1489,7 @@ Traits_test<T_Traits>::
are_mergeable_wrapper_imp(std::istringstream & , CGAL::Tag_false)
{
// std::istringstream dummy_stream = str_stream; //to avoid warnings of unused variable
CGAL_assertion(false);
CGAL_error();
return false;
}
@ -1525,7 +1525,7 @@ bool Traits_test<T_Traits>::merge_wrapper_imp(std::istringstream & ,
CGAL::Tag_false)
{
// std::istringstream dummy_stream(str_stream); //to avoid warnings of unused variable
CGAL_assertion(false);
CGAL_error();
return false;
}

View File

@ -66,7 +66,7 @@ void Polynomial_visitor::end_polynomial() {
if( assign( coeff, it->coefficient ) ) \
polygon_rep.push_back( std::make_pair( it->exponent_vector, coeff ) ); \
else \
CGAL_error("cannot happen"); \
CGAL_error_msg("cannot happen"); \
} \
object_container.push_back( \
make_object( \
@ -78,7 +78,7 @@ void Polynomial_visitor::end_polynomial() {
CGAL_BENCHMARK_POLYNOMIAL_VISITOR_CHECK_TYPE( int, Integer )
CGAL_BENCHMARK_POLYNOMIAL_VISITOR_CHECK_TYPE( CGAL_Sqrt_extension, Sqrt_ext_int_int )
default:
CGAL_error("if you can read this, something went wrong");
CGAL_error_msg("if you can read this, something went wrong");
}
#undef CGAL_BENCHMARK_POLYNOMIAL_VISITOR_CHECK_TYPE
coefficient_numbertype = Not_supported;
@ -104,7 +104,7 @@ Polynomial_visitor::begin_monom( std::string coefficient )
CGAL_BENCHMARK_POLYNOMIAL_VISITOR_CHECK_TYPE( int, Integer )
CGAL_BENCHMARK_POLYNOMIAL_VISITOR_CHECK_TYPE( CGAL_Sqrt_extension, Sqrt_ext_int_int )
default:
CGAL_error("if you can read this, something went wrong");
CGAL_error_msg("if you can read this, something went wrong");
}
inside_monom = true;

View File

@ -641,7 +641,7 @@ get_boundary_of_polygon(Face_const_iterator f) const
++ccb_circ;
}
while(ccb_circ != ccb_end);
CGAL_assertion(false);
CGAL_error();
return Ccb_halfedge_const_circulator();
}

View File

@ -114,7 +114,7 @@ public:
}
return make_object(res);
}
CGAL_assertion_msg(false,"Cartesian_converter is unable to determine what is wrapped in the Object");
CGAL_error_msg("Cartesian_converter is unable to determine what is wrapped in the Object");
return Object();
}

View File

@ -69,7 +69,7 @@ struct Predicate_checker {
<< a1.first << std::endl;
std::cerr << " Arguments for P2 are : "
<< a1.second << std::endl;
CGAL_assertion(false); // message... a1, a2
CGAL_error(); // message... a1, a2
}
return r1;
@ -98,7 +98,7 @@ struct Predicate_checker {
std::cerr << " Arguments for P2 are : "
<< a1.second << std::endl
<< a2.second << std::endl;
CGAL_assertion(false); // message... a1, a2
CGAL_error(); // message... a1, a2
}
return r1;
@ -131,7 +131,7 @@ struct Predicate_checker {
<< a1.second << std::endl
<< a2.second << std::endl
<< a3.second << std::endl;
CGAL_assertion(false); // message... a1, a2
CGAL_error(); // message... a1, a2
}
return r1;
@ -407,7 +407,7 @@ public:
vp1.push_back(*pp1);
}
else
CGAL_assertion(false);
CGAL_error();
}
for(unsigned i=0; i<v2.size(); ++i) {
@ -421,7 +421,7 @@ public:
vp2.push_back(*pp2);
}
else
CGAL_assertion(false);
CGAL_error();
}

View File

@ -331,7 +331,7 @@ namespace CGAL {
return object_to_object_variant<CircularKernel, Arc1, Arc2>
(container, res);
}
CGAL_assertion(false);
CGAL_error();
return res;//for no warning
}

View File

@ -478,7 +478,7 @@ private:
return cmp_y > 0;
// There remains the case :
assert(cmp_begin == 0 && cmp_end == 0);
CGAL_assertion(cmp_begin == 0 && cmp_end == 0);
return cmp_y != 0; // full circle or half circle.
}

View File

@ -1492,7 +1492,7 @@ template < class CK, class OutputIterator >
}
// We need to split
//assert(!A.is_x_monotone());
//CGAL_assertion(!A.is_x_monotone());
if (cmp_begin_y > 0) {
*res++ = S_pair
@ -1562,7 +1562,7 @@ template < class CK, class OutputIterator >
}
else { // cmp_begin_y == 0
if ( compare(A.source().x(),A.supporting_circle().center().x())< 0) {
assert (cmp_end_y >= 0);
CGAL_assertion(cmp_end_y >= 0);
*res++ = std::make_pair
(make_object(Circular_arc_2 (A.supporting_circle(),
A.source(),
@ -1578,8 +1578,8 @@ template < class CK, class OutputIterator >
true);
}
else {
assert( compare(A.source().x(),A.supporting_circle().center().x())< 0);
assert (cmp_end_y != LARGER);
CGAL_assertion( compare(A.source().x(),A.supporting_circle().center().x())< 0);
CGAL_assertion(cmp_end_y != LARGER);
*res++ = std::make_pair
(make_object(Circular_arc_2 (A.supporting_circle(),
A.source(),

View File

@ -190,7 +190,7 @@ public:
object_cast<typename C1::Line_arc_2>(&obj)) {
return make_object(operator()(*ptr));
}
CGAL_assertion_msg(false,"CircularK_converter is unable to determine what is wrapped in the Object");
CGAL_error_msg("CircularK_converter is unable to determine what is wrapped in the Object");
return Object();
}

View File

@ -666,7 +666,7 @@ class Do_overlap_2
{
const Rcirc_arc_2 *tmp_arc;
tmp_arc=object_cast<Rcirc_arc_2>(&vec.at(i));
assert(tmp_arc!=NULL);
CGAL_assertion(tmp_arc!=NULL);
*res++ = make_object( Circular_arc_2(*tmp_arc) );
}
@ -746,7 +746,7 @@ class Do_overlap_2
{
const std::pair<Rcirc_arc_point_2, unsigned> *tmp_point;
tmp_point=object_cast<std::pair<Rcirc_arc_point_2, unsigned> >(&vec.at(i));
assert(tmp_point!=NULL);
CGAL_assertion(tmp_point!=NULL);
*res++ = make_object( std::make_pair(Circular_arc_point_2(tmp_point->first),tmp_point->second));
}
@ -781,7 +781,7 @@ class Do_overlap_2
{
const std::pair<Rcirc_arc_point_2, unsigned> *tmp_point;
tmp_point=object_cast<std::pair<Rcirc_arc_point_2, unsigned> >(&vec.at(i));
assert(tmp_point!=NULL);
CGAL_assertion(tmp_point!=NULL);
*res++ = make_object( std::make_pair(Circular_arc_point_2(tmp_point->first),tmp_point->second));
}
}
@ -815,7 +815,7 @@ class Do_overlap_2
{
const std::pair<Rcirc_arc_point_2, unsigned> *tmp_point;
tmp_point=object_cast<std::pair<Rcirc_arc_point_2, unsigned> >(&vec.at(i));
assert(tmp_point!=NULL);
CGAL_assertion(tmp_point!=NULL);
*res++ = make_object( std::make_pair(Circular_arc_point_2(tmp_point->first),tmp_point->second));
}

View File

@ -193,7 +193,7 @@ public:
void construct_hexagons() const
{
assert(has_no_hexagons());
CGAL_assertion(has_no_hexagons());
typedef typename boost::mpl::if_<boost::is_same<typename CK::Definition_tag, typename CK::Circular_tag>, \
Hexagon_construction_with_interval_2<CK,Hexagon>, \

View File

@ -508,7 +508,7 @@ class Do_overlap_2
tmp_arc=object_cast<Rcirc_arc_2>(&vec.at(i));
assert(tmp_arc!=NULL);
CGAL_assertion(tmp_arc!=NULL);
*res++ = make_object( Circular_arc_2(*tmp_arc) );
}

View File

@ -137,8 +137,8 @@ CGAL::Polygon_2 < CGAL::Simple_cartesian< double > >
// For these and the is_on_ booleans it is required to use a lazy nt
assert(a->is_x_monotone());
assert(a->is_y_monotone());
CGAL_assertion(a->is_x_monotone());
CGAL_assertion(a->is_y_monotone());
CGAL::Bbox_2 left_bb(a->left().bbox()),

View File

@ -37,13 +37,13 @@ public:
typedef typename K::FT FT;
typedef typename K::Point_2 Point_2;
typedef typename K::Circle_2 Circle_2;
typedef std::list<std::pair<Point_2, double> > Polygon;
typedef std::list<Polygon> Polygons;
typedef std::list<Circle_2> Circles;
typedef std::list<std::pair<Point_2, FT> > Centers_and_radii;
private:
void
@ -53,102 +53,102 @@ private:
double xmin, ymin;
double xmax, ymax;
is >> n;
assert(n == 9);
CGAL_assertion(n == 9);
char c;
is >> c;
assert(c == '$');
CGAL_assertion(c == '$');
std::string str;
is >> str;
if(str == std::string("EXTMIN")){
is >> n;
assert(n == 10);
CGAL_assertion(n == 10);
is >> xmin;
is >> n;
assert(n == 20);
CGAL_assertion(n == 20);
is >> ymin;
}
is >> n;
assert(n == 9);
CGAL_assertion(n == 9);
is >> c;
assert(c == '$');
CGAL_assertion(c == '$');
is >> str;
if(str == "EXTMAX"){
is >> n;
assert(n == 10);
CGAL_assertion(n == 10);
is >> xmax;
is >> n;
assert(n == 20);
CGAL_assertion(n == 20);
is >> ymax;
}
}
void
skip_header(std::istream& is)
{
int n;
is >> n;
assert(n == 0);
CGAL_assertion(n == 0);
std::string str;
is >> str;
assert(str == "SECTION");
CGAL_assertion(str == "SECTION");
is >> n;
assert(n == 2);
CGAL_assertion(n == 2);
is >> str;
if(str == "HEADER"){
header(is);
}
is >> n;
assert(n == 0);
CGAL_assertion(n == 0);
is >> str;
assert(str == "ENDSEC");
CGAL_assertion(str == "ENDSEC");
}
void
void
read_circle(std::istream& is, Circle_2& circ)
{
int n;
double cx, cy, r;
std::string str;
is >> n;
assert(n == 8);
CGAL_assertion(n == 8);
is >> n;
assert(n == 0);
CGAL_assertion(n == 0);
is >> n;
assert(n == 10);
CGAL_assertion(n == 10);
is >> cx;
is >> n;
assert(n == 20);
CGAL_assertion(n == 20);
is >> cy;
is >> n;
assert(n == 40);
CGAL_assertion(n == 40);
is >> r;
FT rft(r);
circ = typename K::Construct_circle_2()(Point_2(cx,cy), rft);
}
void
void
read_center_and_radius(std::istream& is, Point_2& center, FT& rft)
{
int n;
double cx, cy, r;
std::string str;
is >> n;
assert(n == 8);
CGAL_assertion(n == 8);
is >> n;
assert(n == 0);
CGAL_assertion(n == 0);
is >> n;
assert(n == 10);
CGAL_assertion(n == 10);
is >> cx;
is >> n;
assert(n == 20);
CGAL_assertion(n == 20);
is >> cy;
is >> n;
assert(n == 40);
CGAL_assertion(n == 40);
is >> r;
center = typename K::Construct_point_2()(cx,cy);
@ -167,7 +167,7 @@ read_polygon(std::istream& is, Polygon& poly)
is >> n;
if(n != 0){
int m;
is >> m;
is >> m;
}
} while(n != 0);
@ -175,30 +175,30 @@ read_polygon(std::istream& is, Polygon& poly)
is >> str;
if(str == "VERTEX"){
is >> n;
assert(n == 8);
CGAL_assertion(n == 8);
is >> n;
assert(n == 0);
CGAL_assertion(n == 0);
is >> n;
assert(n == 10);
CGAL_assertion(n == 10);
is >> x;
is >> n;
assert(n == 20);
CGAL_assertion(n == 20);
is >> y;
is >> n;
len = 0;
if(n == 42){
is >> len;
} else {
assert(n == 0);
CGAL_assertion(n == 0);
}
poly.push_back(std::make_pair(typename K::Construct_point_2()(x,y), len));
}
} while (str != "SEQEND");
is >> n;
assert(n == 8);
CGAL_assertion(n == 8);
is >> n;
assert(n == 0);
CGAL_assertion(n == 0);
}
@ -211,15 +211,15 @@ read_entities(std::istream& is, Polygons& polys, Circles& circles)
//double x, y;
std::string str;
is >> n;
assert(n == 0);
CGAL_assertion(n == 0);
is >> str;
assert(str == "SECTION");
CGAL_assertion(str == "SECTION");
is >> n;
is >> str;
assert(str == "ENTITIES");
CGAL_assertion(str == "ENTITIES");
do {
is >> n;
assert(n == 0);
CGAL_assertion(n == 0);
is >> str;
if(str == "POLYLINE"){
Polygon p;
@ -227,19 +227,18 @@ read_entities(std::istream& is, Polygons& polys, Circles& circles)
read_polygon(is, polys.back());
} else if(str == "CIRCLE"){
Circle_2 c;
read_circle(is,c);
read_circle(is,c);
circles.push_back(c);
} else if(str == "ENDSEC"){
} else {
std::cerr << "unknown entity" << std::endl;
std::exit(0);
CGAL_error_msg( "unknown entity" );
}
} while(str != "ENDSEC");
is >> n;
assert(n == 0);
CGAL_assertion(n == 0);
is >> str;
assert(str == "EOF");
CGAL_assertion(str == "EOF");
}
void
@ -249,15 +248,15 @@ read_entities(std::istream& is, Polygons& polys, Centers_and_radii& car)
//double x, y;
std::string str;
is >> n;
assert(n == 0);
CGAL_assertion(n == 0);
is >> str;
assert(str == "SECTION");
CGAL_assertion(str == "SECTION");
is >> n;
is >> str;
assert(str == "ENTITIES");
CGAL_assertion(str == "ENTITIES");
do {
is >> n;
assert(n == 0);
CGAL_assertion(n == 0);
is >> str;
if(str == "POLYLINE"){
Polygon p;
@ -266,19 +265,18 @@ read_entities(std::istream& is, Polygons& polys, Centers_and_radii& car)
} else if(str == "CIRCLE"){
Point_2 center;
FT radius;
read_center_and_radius(is,center, radius);
read_center_and_radius(is,center, radius);
car.push_back(std::make_pair(center, radius));
} else if(str == "ENDSEC"){
} else {
std::cerr << "unknown entity" << std::endl;
std::exit(0);
CGAL_error_msg( "unknown entity" );
}
} while(str != "ENDSEC");
is >> n;
assert(n == 0);
CGAL_assertion(n == 0);
is >> str;
assert(str == "EOF");
CGAL_assertion(str == "EOF");
}
public:

View File

@ -39,12 +39,12 @@ public:
typedef CGAL::Triple<double, double,double> Triple;
typedef Triple Point_2_and_bulge;
typedef Triple Circle_2;
typedef std::list<Triple > Polygon;
typedef std::list<Polygon> Polygons;
typedef std::list<Circle_2> Circles;
private:
@ -55,81 +55,81 @@ private:
double xmin, ymin;
double xmax, ymax;
is >> n;
assert(n == 9);
CGAL_assertion(n == 9);
char c;
is >> c;
assert(c == '$');
CGAL_assertion(c == '$');
std::string str;
is >> str;
if(str == std::string("EXTMIN")){
is >> n;
assert(n == 10);
CGAL_assertion(n == 10);
is >> xmin;
is >> n;
assert(n == 20);
CGAL_assertion(n == 20);
is >> ymin;
}
is >> n;
assert(n == 9);
CGAL_assertion(n == 9);
is >> c;
assert(c == '$');
CGAL_assertion(c == '$');
is >> str;
if(str == "EXTMAX"){
is >> n;
assert(n == 10);
CGAL_assertion(n == 10);
is >> xmax;
is >> n;
assert(n == 20);
CGAL_assertion(n == 20);
is >> ymax;
}
}
void
skip_header(std::istream& is)
{
int n;
is >> n;
assert(n == 0);
CGAL_assertion(n == 0);
std::string str;
is >> str;
assert(str == "SECTION");
CGAL_assertion(str == "SECTION");
is >> n;
assert(n == 2);
CGAL_assertion(n == 2);
is >> str;
if(str == "HEADER"){
header(is);
}
is >> n;
assert(n == 0);
CGAL_assertion(n == 0);
is >> str;
assert(str == "ENDSEC");
CGAL_assertion(str == "ENDSEC");
}
void
void
read_circle(std::istream& is, Circle_2& circ)
{
int n;
double cx, cy, r;
std::string str;
is >> n;
assert(n == 8);
CGAL_assertion(n == 8);
is >> n;
assert(n == 0);
CGAL_assertion(n == 0);
is >> n;
assert(n == 10);
CGAL_assertion(n == 10);
is >> cx;
is >> n;
assert(n == 20);
CGAL_assertion(n == 20);
is >> cy;
is >> n;
assert(n == 40);
CGAL_assertion(n == 40);
is >> r;
FT rft(r);
circ = Circle_2(cx,cy,rft);
}
@ -145,7 +145,7 @@ read_polygon(std::istream& is, Polygon& poly)
is >> n;
if(n != 0){
int m;
is >> m;
is >> m;
}
} while(n != 0);
@ -153,30 +153,30 @@ read_polygon(std::istream& is, Polygon& poly)
is >> str;
if(str == "VERTEX"){
is >> n;
assert(n == 8);
CGAL_assertion(n == 8);
is >> n;
assert(n == 0);
CGAL_assertion(n == 0);
is >> n;
assert(n == 10);
CGAL_assertion(n == 10);
is >> x;
is >> n;
assert(n == 20);
CGAL_assertion(n == 20);
is >> y;
is >> n;
len = 0;
if(n == 42){
is >> len;
} else {
assert(n == 0);
CGAL_assertion(n == 0);
}
poly.push_back(Point_2_and_bulge(x,y, len));
}
} while (str != "SEQEND");
is >> n;
assert(n == 8);
CGAL_assertion(n == 8);
is >> n;
assert(n == 0);
CGAL_assertion(n == 0);
}
@ -189,15 +189,15 @@ read_entities(std::istream& is, Polygons& polys, Circles& circles)
//double x, y;
std::string str;
is >> n;
assert(n == 0);
CGAL_assertion(n == 0);
is >> str;
assert(str == "SECTION");
CGAL_assertion(str == "SECTION");
is >> n;
is >> str;
assert(str == "ENTITIES");
CGAL_assertion(str == "ENTITIES");
do {
is >> n;
assert(n == 0);
CGAL_assertion(n == 0);
is >> str;
if(str == "POLYLINE"){
Polygon p;
@ -205,19 +205,18 @@ read_entities(std::istream& is, Polygons& polys, Circles& circles)
read_polygon(is, polys.back());
} else if(str == "CIRCLE"){
Circle_2 c;
read_circle(is,c);
read_circle(is,c);
circles.push_back(c);
} else if(str == "ENDSEC"){
} else {
std::cerr << "unknown entity" << std::endl;
std::exit(0);
CGAL_error_msg( "unknown entity" );
}
} while(str != "ENDSEC");
is >> n;
assert(n == 0);
CGAL_assertion(n == 0);
is >> str;
assert(str == "EOF");
CGAL_assertion(str == "EOF");
}

View File

@ -121,7 +121,7 @@ public:
} else{
std::cout << "UNEXPECTED CONSTRUCT_INTERSECTIONS_2 PRODUCT" << std::endl;
std::cout << lv.approx()[i].type().name() << std::endl;
CGAL_assertion(false);
CGAL_error();
}
}
@ -189,7 +189,7 @@ public:
++it;
}
else {
CGAL_assertion_msg(false, "UNEXPECTED MAKE_X_MONOTONE PRODUCT");
CGAL_error_msg( "UNEXPECTED MAKE_X_MONOTONE PRODUCT");
}
}
@ -258,7 +258,7 @@ public:
++it;
}
else{
CGAL_assertion_msg(false, "UNEXPECTED ADVANCED_MAKE_X_MONOTONE PRODUCT");
CGAL_error_msg( "UNEXPECTED ADVANCED_MAKE_X_MONOTONE PRODUCT");
}
}
@ -271,7 +271,7 @@ public:
for (std::vector<Object>::iterator oit = exact_objects.begin();
oit != exact_objects.end();
++oit){
CGAL_assertion_msg(false, "Unfinished code !!!");
CGAL_error_msg( "Unfinished code !!!");
//*it = std::make_pair(make_lazy_CK<LK>((*oit).first),(*oit).second);
++it;
}

View File

@ -51,7 +51,7 @@ namespace CGAL {
private:
const Sphere_3& get_ref_sphere(const typename SK::Circle_on_reference_sphere_3& C){return C.reference_sphere();}
Sphere_3 get_ref_sphere(const typename SK::Circle_3& C){CGAL_assertion(false);}
Sphere_3 get_ref_sphere(const typename SK::Circle_3& C){CGAL_error();}
typedef Triple<Circle_3, Circular_arc_point_3,
Circular_arc_point_3> Rep;

View File

@ -166,8 +166,8 @@ namespace CGAL {
CGAL_kernel_precondition(!SK().has_on_3_object()(p2,l));
typename SK::Point_3 point1, point2;
// l must intersect p1 and p2
assert(assign(point1,SK().intersect_3_object()(l, p1)));
assert(assign(point2,SK().intersect_3_object()(l, p2)));
CGAL_assertion(assign(point1,SK().intersect_3_object()(l, p1)));
CGAL_assertion(assign(point2,SK().intersect_3_object()(l, p2)));
assign(point1,SK().intersect_3_object()(l, p1));
assign(point2,SK().intersect_3_object()(l, p2));
// the source and target must be different

View File

@ -250,7 +250,7 @@ template <class R_> struct Convex_hull_d_traits_3
if(s == e){
pl = Hyperplane_d( A[0], A[1], A[2] );
} else {
CGAL_assertion(false);
CGAL_error();
}
}
}

View File

@ -562,7 +562,7 @@ public:
CGAL_precondition(bnd1_y * bnd2_y < 0 || bnd1_y == bnd2_y);
if(is_singular(bnd1_y) != is_singular(bnd2_y)) {
// only one curve end lies at singularity (another at +/-oo)
CGAL_error("SINGULARITY + INF comparison is not yet implemented");
CGAL_error_msg("SINGULARITY + INF comparison is not yet implemented");
}
Curve_kernel_2 kernel_2;
if(is_singular(bnd1_y) && is_singular(bnd2_y)) {
@ -668,7 +668,7 @@ public:
// report x-range assert violation if the point lies on disc in
// x but neither of arc's ends do
if(!(eq_min || eq_max))
CGAL_error("Target point is not within the arc's x-range");
CGAL_error_msg("Target point is not within the arc's x-range");
} else // we should be able to access x-coord when point is on disc
in_x_range = is_in_x_range(p.x(), &eq_min, &eq_max);
@ -801,7 +801,7 @@ public:
return CGAL::LARGER;
if(is_singular(bndp_y)) // singularity in y
CGAL_error("Handling singularity in y is not yet implemented");
CGAL_error_msg("Handling singularity in y is not yet implemented");
// vertical line immediately to the left of p: if p lies on boundary
// get the vertical line over the last interval; otherwise
@ -867,7 +867,7 @@ public:
return CGAL::SMALLER;
if(is_singular(bndp_y)) // singularity in y
CGAL_error("Handling singularity in y is not yet implemented");
CGAL_error_msg("Handling singularity in y is not yet implemented");
// vertical line immediately to the right of p: if p lies on boundary
// get the vertical line over the first interval; otherwise
@ -1069,7 +1069,7 @@ public:
return false;
if(!curve().is_identical(cv2.curve()))
CGAL_error("Not yet implemented");
CGAL_error_msg("Not yet implemented");
// LARGER source and smaller target
Point_2 src = (_same_arc_compare_xy(_minpoint(), cv2._minpoint(),
@ -1267,7 +1267,7 @@ public:
return true;
if(!curve().is_identical(cv2.curve())) {
CGAL_error("do_overlap() for non-coprime curves is not yet "
CGAL_error_msg("do_overlap() for non-coprime curves is not yet "
"implemented for ");
}
if(is_vertical() != cv2.is_vertical())
@ -1311,7 +1311,7 @@ public:
return (_same_arc_compare_xy(_minpoint(), cv2._maxpoint(), false,
true) == CGAL::SMALLER);
}
CGAL_error("bogus comparison result");
CGAL_error_msg("bogus comparison result");
return false;
}

View File

@ -322,7 +322,7 @@ private:
if(type != CGAL::NO_BOUNDARY &&
this->ptr()->_m_boundary_in_y != CGAL::NO_BOUNDARY)
CGAL_error("Denied to set the boundary condition in x while the "
CGAL_error_msg("Denied to set the boundary condition in x while the "
"boundary condition in y is set");
this->ptr()->_m_boundary_in_x = type;
}
@ -334,7 +334,7 @@ private:
if(type != CGAL::NO_BOUNDARY &&
this->ptr()->_m_boundary_in_x != CGAL::NO_BOUNDARY)
CGAL_error("Denied to set the boundary condition in y while the "
CGAL_error_msg("Denied to set the boundary condition in y while the "
"boundary condition in x is set");
this->ptr()->_m_boundary_in_y = type;
}

View File

@ -25,7 +25,7 @@ Much of the {\cgal} code contains checks. Some are there to check if
the code behaves correctly, others check if the user calls routines in
an acceptable manner. We describe the different categories of checks
(Section~\ref{sec:checks_categories}), the usage of checks
(Section~\ref{sec:checks_using}), and a more selective means of controlling
(Section~\ref{sec:checks_using}), and a more selective means of controlling
checks (Section~\ref{sec:checks_controlling}). Finally, a statement
about exception handling is given
(Section~\ref{sec:exception_handling}).
@ -39,38 +39,48 @@ react after the error (application processes are killed).
\section{Categories of checks\label{sec:checks_categories}}
\ccIndexSubitemBegin{checks}{types of}
There are four types of checks.
There are four types of checks.
%
\begin{itemize}
\item \textbf{Preconditions}\ccIndexMainItemDef{preconditions}
\item \textbf{Preconditions}\ccIndexMainItemDef{preconditions}
check if a routine has been called
in a proper fashion. If a precondition fails it is the
responsibility of the caller (usually the user of the library) to fix
the problem.
\item \textbf{Postconditions}\ccIndexMainItemDef{postconditions}
\item \textbf{Postconditions}\ccIndexMainItemDef{postconditions}
check if a routine does what it promises
to do. If a postcondition fails it is the fault of this routine, so
the author of the code is responsible.
\item \textbf{Assertions}\ccIndexMainItemDef{assertions}
\item \textbf{Assertions}\ccIndexMainItemDef{assertions}
are other checks that do not fit in the above
two categories, \eg~they can be used to check invariants.
\item \textbf{Warnings}\ccIndexMainItemDef{warnings}
are checks for which it is not so severe if they fail.
\end{itemize}
The addording macro names all have the format \ccc{CGAL_<check_type>} where
\ccc{<check_type>} can be one of
\begin{itemize}
\item \ccc{precondition}
\item \ccc{postcondition}
\item \ccc{assertion}
\item \ccc{warning}
\end{itemize}
%
Failures of the first three types are errors and lead to a halt of the
program, failures of the last one only lead to a warning. Checks of
all four categories can be marked with one or both of the following
attributes.
attributes:
%
\begin{itemize}
\item \emph{Expensive}\ccIndexSubitemDef{checks}{expensive}
\item \textbf{Expensive}\ccIndexSubitemDef{checks}{expensive}
checks take considerable time to compute.
``Considerable'' is an imprecise phrase. Checks that add less than 10
percent to the execution time of their routine are not expensive.
Checks that can double the execution time are. Somewhere in between
lies the border line.
\item \emph{Exactness}\ccIndexSubitemDef{checks}{exactness}%
\item \textbf{Exactness}\ccIndexSubitemDef{checks}{exactness}%
\ccIndexSubitem{exactness}{checking}
checks rely on exact arithmetic. For example,
if the intersection of two lines is computed, the postcondition of
@ -78,7 +88,14 @@ attributes.
lines. However, if the computation is done with \ccc{double}s as
the number type, this may not be the case, due to roundoff errors.
\end{itemize}
%
The format is one of
\begin{itemize}
\item \ccc{CGAL_expensive_<check_type>}
\item \ccc{CGAL_exactness_<check_type>}
\item \ccc{CGAL_expensive_exactness_<check_type>}
\end{itemize}
\ccIndexSubitem{checks}{default}
By default, all standard checks (without any attribute) are enabled,
while expensive and exactness checks are disabled. How this can be
@ -86,6 +103,10 @@ changed and how checks are actually used in the code are described in
the next section.
\ccIndexSubitemEnd{checks}{types of}
Additionally, we provide macros \ccc{CGAL_error()} and \ccc{CGAL_error_msg(MSG_TEXT)}
which are equivalent to always-failing assertions. However,
they cannot be disabled.
% -----------------------------------------------------------------------------
\section{Using checks\label{sec:checks_using}}
@ -112,7 +133,7 @@ the check fails, an error message similar to
%
is written to the standard error stream and the program is aborted. If
an additional explanantion should be given to the user,%
\ccIndexSubitem{checks}{adding failure message to}
\ccIndexSubitem{checks}{adding failure message to}
macros \ccc{CGAL_<check_type>_msg(<Cond>,<Msg>)} can be used. The text in
\ccc{<Msg>} is just appended to the failure message given above.
@ -149,12 +170,12 @@ The flag \ccc{CGAL_NDEBUG} disables all checks in \cgal\ but does not affect
the standard \ccc{assert} macro.
\ccIndexSubitemEnd{checks}{disabling}
To enable expensive and exactness checks, respectively, the compile-time
To enable expensive and exactness checks, respectively, the compile-time
flags \ccc{CGAL_CHECK_EXPENSIVE}%
\index{CGAL_CHECK_EXPENSIVE flag@{\tt CGAL\_CHECK\_EXPENSIVE} flag}
\index{CGAL_CHECK_EXPENSIVE flag@{\tt CGAL\_CHECK\_EXPENSIVE} flag}
\ccIndexSubsubitem{checks}{expensive}{enabling}
and \ccc{CGAL_CHECK_EXACTNESS}
\index{CGAL_CHECK_EXACTNESS flag@{\tt CGAL\_CHECK\_EXACTNESS} flag}
and \ccc{CGAL_CHECK_EXACTNESS}
\index{CGAL_CHECK_EXACTNESS flag@{\tt CGAL\_CHECK\_EXACTNESS} flag}
\ccIndexSubsubitem{checks}{exactness}{enabling}
have to be supplied. However, exactness checks should only be turned on if
the computation is done with some exact number type.%
@ -252,12 +273,12 @@ Requirements:
\begin{itemize}
\item Write pre- and postcondition checkers for your functions wherever
possible.
\item Use the \cgal\ preprocessor macros (Sections~\ref{sec:checks_using}
\item Use the \cgal\ preprocessor macros (Sections~\ref{sec:checks_using}
and~\ref{sec:checks_controlling})
exclusively throughout your code (instead of,
for example, the \ccc{assert} macro or the \ccc{std::abort} or
\ccc{std::exit} functions) for all checks
to assure that all \cgal\ invariant tests can be handled in a uniform
\ccc{std::exit} functions) for all checks
to assure that all \cgal\ invariant tests can be handled in a uniform
way.
\end{itemize}

View File

@ -1049,7 +1049,7 @@ public:
return SMALLER;
}
else
CGAL_assertion(false);
CGAL_error();
return EQUAL;
}

View File

@ -1281,7 +1281,7 @@ public:
points_on_plane[n_points_on_plane++] = i;
}
assert (n_points_on_plane +
CGAL_assertion(n_points_on_plane +
n_points_on_positive + n_points_on_negative == 3);
// if all vertices of tri lie on the same size (positive/negative) of pl,
@ -1330,10 +1330,10 @@ public:
}
assert( n_points_on_plane == 0 );
assert( n_points_on_positive + n_points_on_negative == 3 );
assert( n_points_on_positive != 0 );
assert( n_points_on_negative != 0 );
CGAL_assertion( n_points_on_plane == 0 );
CGAL_assertion( n_points_on_positive + n_points_on_negative == 3 );
CGAL_assertion( n_points_on_positive != 0 );
CGAL_assertion( n_points_on_negative != 0 );
// now it known that there is an intersection between 2 segments of tri
// and pl, it is also known which segments are those.
@ -1352,7 +1352,7 @@ public:
inter_points[n_inter_points++] = inter_point;
}
assert( n_inter_points == 2 );
CGAL_assertion( n_inter_points == 2 );
return make_object(Segment_3(inter_points[0], inter_points[1]));
}

View File

@ -79,7 +79,7 @@ Object half_plane_half_plane_proj_intersection(const typename K::Plane_3 &h1,
if(assign(ray, obj))
return ray_under_linear_constraint(ray, l1, k);
CGAL_assertion(false); // doesnt suppose to reach here
CGAL_error(); // doesnt suppose to reach here
return Object();
}

View File

@ -135,7 +135,7 @@ protected:
return true;
if (res == LARGER)
return false;
CGAL_assertion(false);
CGAL_error();
return (p1.second == true || p2.third == true);
}
};
@ -290,7 +290,7 @@ public:
insert (copied_face_arr, curve.first, pl, zone_visitor);
}
else
CGAL_assertion_msg(false, "wrong projected intersection type");
CGAL_error_msg( "wrong projected intersection type");
}
zone_visitor.finish();
@ -567,7 +567,7 @@ public:
}
else
CGAL_assertion_msg(false, "wrong projected intersection type");
CGAL_error_msg( "wrong projected intersection type");
}
// if there aren't any split points, we can finish
@ -976,7 +976,7 @@ protected:
const Xy_monotone_surface_3&,
Tag_false)
{
CGAL_assertion(false); // doesnt' suppose to reach here at all!!!
CGAL_error(); // doesnt' suppose to reach here at all!!!
return SMALLER;
}

View File

@ -374,7 +374,7 @@ protected:
}
else
// this cannot happen, since we need to touch an edge
CGAL_assertion(false);
CGAL_error();
}
// update halfedge-target flags of new_h that is created inside face in_face

View File

@ -465,7 +465,7 @@ protected:
shoot_target = (env.non_const_handle(shoot_vh))->point();
}
else
CGAL_assertion(false); // it cannot be the unbounded face
CGAL_error(); // it cannot be the unbounded face
Point_2 res_point = traits.construct_middle_point(shoot_source, shoot_target);

View File

@ -620,7 +620,7 @@ protected:
shoot_target = (env.non_const_handle(shoot_vh))->point();
}
else
CGAL_assertion(false); // it cannot be the unbounded face
CGAL_error(); // it cannot be the unbounded face
Point_2 res_point = traits.construct_middle_point(shoot_source, shoot_target);

View File

@ -1330,7 +1330,7 @@ struct Ith {
else if(const Pair_type_2 *p2 = object_cast<Pair_type_2>(&v[i]))
return p2->first;
CGAL_assertion_msg(false, " Unexpected encapsulated type ");
CGAL_error_msg( " Unexpected encapsulated type ");
}
};

View File

@ -112,7 +112,7 @@ struct Static_filter_error
Sfe operator- (const Sfe &f) const { return *this + f; }
Sfe operator- () const { return *this; }
// Sfe operator/ (const Sfe &) const { CGAL_assertion(false); }
// Sfe operator/ (const Sfe &) const { CGAL_error(); }
// Division not supported.
Sfe& operator+=(const Sfe &f) { return *this = *this + f; }
@ -128,7 +128,7 @@ struct Static_filter_error
{
Sfe e = *this + f;
std::cerr << "Static error is : " << e.error() << std::endl;
CGAL_assertion(false);
CGAL_error();
return false;
}
bool operator> (const Sfe &f) const { return *this < f; }

View File

@ -17,7 +17,7 @@
//
// $URL$
// $Id$
//
//
//
// Author(s) : Andreas Fabri, Herve Bronnimann, Sylvain Pion
@ -68,19 +68,16 @@ void Geomview_stream::setup_geomview(const char *machine, const char *login)
std::cout << "Starting Geomview..." << std::flush;
if (pipe(pipe_out) < 0) {
std::cerr << "out pipe failed" << std::endl;
std::exit(-1);
CGAL_error_msg( "out pipe failed" );
}
if (pipe(pipe_in) < 0) {
std::cerr << "in pipe failed" << std::endl;
std::exit(-1);
CGAL_error_msg( "in pipe failed" );
}
switch (pid = fork()){
case -1:
std::cerr << "fork failed" << std::endl;
std::exit(-1);
CGAL_error_msg( "fork failed" );
case 0: // The child process
close(pipe_out[1]); // does not write to the out pipe,
close(pipe_in[0]); // does not read from the in pipe.
@ -105,9 +102,9 @@ void Geomview_stream::setup_geomview(const char *machine, const char *login)
std::cerr << "execl geomview failed" << std::endl;
switch(errno) {
case EACCES:
std::cerr << "please check your environment variable PATH"
std::cerr << "please check your environment variable PATH"
<< std::endl;
std::cerr << "make sure the file `geomview' is contained in it"
std::cerr << "make sure the file `geomview' is contained in it"
<< std::endl;
std::cerr << "and is executable" << std::endl;
break;
@ -115,10 +112,10 @@ void Geomview_stream::setup_geomview(const char *machine, const char *login)
std::cerr << "too many links for filename `geomview'" << std::endl;
break;
default:
std::cerr << "error number " << errno << " (check `man execlp')"
std::cerr << "error number " << errno << " (check `man execlp')"
<< std::endl;
};
std::exit(-1);
CGAL_error();
default: // The parent process
close(pipe_out[0]); // does not read from the out pipe,
close(pipe_in[1]); // does not write to the in pipe.
@ -217,9 +214,7 @@ Geomview_stream&
Geomview_stream::operator<<(const std::string & s)
{
if ((int)s.length() != ::write(out, s.data(), s.length())) {
std::cerr << "write problem in the pipe while sending data to geomview"
<< std::endl;
std::exit(-1);
CGAL_error_msg( "write problem in the pipe while sending data to geomview" );
}
trace(s);
@ -501,7 +496,7 @@ char*
Geomview_stream::nth(char* s, int count)
{
s++; // skip first character (always a parenthesis)
// Skip "count" words.
for(; count != 0; count--) {
while (*s == ' ') // skip whitespaces
@ -512,7 +507,7 @@ Geomview_stream::nth(char* s, int count)
}
while (*s == ' ') // skip whitespaces
s++;
// Now we have the beginning of the searched sub-expression.
int j = 1;
if (*s == '(') // Case of a well-parenthesed expression.
@ -529,7 +524,7 @@ Geomview_stream::nth(char* s, int count)
else // Case of a word terminated by ' ' or ')'.
while (s[j] != ' ' && s[j] != ')')
j++;
s[j] = '\0';
return s;
}

View File

@ -295,7 +295,7 @@ natural_neighbor_coordinates_2(const Dt& dt,
Vertex_circulator vc = dt.incident_vertices(vh),
done(vc);
do{
assert(!dt.is_infinite(vc));
CGAL_assertion(!dt.is_infinite(vc));
t2.insert(vc->point());
}
while(++vc!=done);

View File

@ -387,7 +387,7 @@ regular_neighbor_coordinates_2(const Rt& rt,
Vertex_circulator vc = rt.incident_vertices(vh),
done(vc);
do{
assert(!rt.is_infinite(vc));
CGAL_assertion(!rt.is_infinite(vc));
t2.insert(vc->point());
}
while(++vc!=done);

View File

@ -76,7 +76,7 @@ surface_neighbors_3(InputIterator first, InputIterator beyond,
done(vc);
do{
*out++= vc->point();
assert(! it.is_infinite(vc));
CGAL_assertion(! it.is_infinite(vc));
}
while(vc++!=done);

View File

@ -13,13 +13,14 @@
//
// $URL$
// $Id$
//
//
//
// Author(s) : Andreas Fabri
#ifndef CGAL_INTERVAL_SKIP_LIST_INTERVAL_H
#define CGAL_INTERVAL_SKIP_LIST_INTERVAL_H
#include <CGAL/basic.h>
#include <cstdlib>
#include <iostream>
@ -40,8 +41,8 @@ namespace CGAL {
public:
Interval_skip_list_interval(){}
Interval_skip_list_interval(const Value& inf_,
const Value& sup_,
Interval_skip_list_interval(const Value& inf_,
const Value& sup_,
bool lb = true,
bool rb = true);
@ -56,15 +57,15 @@ namespace CGAL {
bool contains(const Value& V) const;
// true iff this contains (l,r)
bool contains_interval(const Value& l, const Value& r) const;
bool contains_interval(const Value& l, const Value& r) const;
bool operator==(const Interval_skip_list_interval& I) const
bool operator==(const Interval_skip_list_interval& I) const
{
return ( (inf() == I.inf()) && (sup() == I.sup()) &&
return ( (inf() == I.inf()) && (sup() == I.sup()) &&
(inf_closed() == I.inf_closed()) && (sup_closed() == I.sup_closed()) );
}
bool operator!=(const Interval_skip_list_interval& I) const
bool operator!=(const Interval_skip_list_interval& I) const
{
return ! (*this == I);
}
@ -73,7 +74,7 @@ namespace CGAL {
template <class V>
std::ostream& operator<<(std::ostream& os,
std::ostream& operator<<(std::ostream& os,
const Interval_skip_list_interval<V>& i)
{
os << (i.inf_closed()?"[":"(") << i.inf() << ", " << i.sup() << (i.sup_closed()?"]":")");
@ -83,22 +84,18 @@ namespace CGAL {
template <class V>
Interval_skip_list_interval<V>::Interval_skip_list_interval(
const Value& i,
const Value& s,
const Value& i,
const Value& s,
bool lb, bool rb)
: lbound_(lb), rbound_(rb), inf_(i), sup_(s)
{
if ( inf_ > sup_ )
{
std::cerr << "Error: " << *this << std::endl;
std::exit(1);
}
CGAL_precondition( !(inf_ > sup_) );
}
template <class V>
bool
Interval_skip_list_interval<V>::contains_interval(const Value& i,
Interval_skip_list_interval<V>::contains_interval(const Value& i,
const Value& s) const
// true iff this contains (l,r)
{

View File

@ -136,7 +136,7 @@ public:
LAPACK::dgelss(&m, &n, &nrhs, M.matrix(), &lda, B.vector(), &ldb, sing_values,
&rcond, &rank, work, &lwork, &info);
assert(info==0);
CGAL_assertion(info==0);
FT cond_nb = sing_values[0]/sing_values[n-1];

View File

@ -95,7 +95,7 @@ class Object
#ifdef _MSC_VER
}
catch (...) {
CGAL_assertion_msg(false, "ERROR : YOUR COMPILER MUST SUPPORT RTTI");
CGAL_error_msg( "Your compiler must support RTTI");
}
#endif
return true;

View File

@ -89,7 +89,7 @@ namespace {
std::cerr << " COND: " << #cond << std::endl; \
std::cerr << " POSITION: " << __FILE__ << " at line "<< __LINE__ \
<< std::endl; \
CGAL_assertion(false); \
CGAL_error(); \
}
#endif

View File

@ -64,7 +64,7 @@ template <class IndirectKernel>
struct Updatable_Delaunay_triangulation_2 {
typedef typename IndirectKernel::Point_2 Point_key;
typedef typename Kinetic::Suggested_exact_simulation_traits_base SimTraits_base;
@ -73,7 +73,7 @@ struct Updatable_Delaunay_triangulation_2 {
typedef CGAL::Interval_nt_advanced INT;
/*typedef CGAL::Gmpq NT;
typedef CGAL::POLYNOMIAL::Polynomial<NT> Function;
@ -90,7 +90,7 @@ struct Updatable_Delaunay_triangulation_2 {
typedef typename CGAL::Kinetic::Cartesian_kinetic_kernel<KK_function_kernel> Kinetic_kernel;
typedef IndirectKernel Indirect_kernel;
typedef Updatable_delaunay_triangulation_table_2<Indirect_kernel, Kinetic_kernel> Update_information;
@ -122,7 +122,7 @@ struct Updatable_Delaunay_triangulation_2 {
struct Simulation_traits {
typedef SimTraits_base P;
struct Sillyness {
typedef Kinetic_kernel KK;
typedef Simulator S;
@ -130,7 +130,7 @@ struct Updatable_Delaunay_triangulation_2 {
};
typedef typename Sillyness::KK Kinetic_kernel;
typedef typename Sillyness::S Simulator;
typedef Update_information Active_points_2_table;
Active_points_2_table* active_points_2_table_handle() {
return ap_.get();
@ -138,14 +138,14 @@ struct Updatable_Delaunay_triangulation_2 {
const Active_points_2_table* active_points_2_table_handle() const {
return ap_.get();
}
typedef CGAL::Simple_cartesian<NT> Static_kernel;
typedef typename Kinetic::Cartesian_instantaneous_kernel<Active_points_2_table, Static_kernel> Instantaneous_kernel;
Instantaneous_kernel instantaneous_kernel_object() const {
return Instantaneous_kernel(ap_, Static_kernel());
}
typename Simulator::Handle simulator_handle() {
return sim_;
}
@ -159,7 +159,7 @@ struct Updatable_Delaunay_triangulation_2 {
typedef typename Simulator::Time Time;
Simulation_traits(Indirect_kernel ik,
Simulation_traits(Indirect_kernel ik,
double lb,
double ub): sim_(new Simulator(lb, ub)){
ap_=new Active_points_2_table(ik, kinetic_kernel_object());
@ -231,10 +231,10 @@ struct Updatable_Delaunay_triangulation_2 {
struct Traits: public Default_traits {
typedef Default_traits P;
typedef typename Simulation_traits::Simulator::Time Time;
struct Certificate_data{};
typedef std::pair<Time, Certificate_data> Certificate_pair;
@ -251,7 +251,7 @@ struct Updatable_Delaunay_triangulation_2 {
Cert_tuple tuple(Point_key ks[4]) const {
return Cert_tuple(ks);
}
#ifndef NDEBUG
Cert_tuple tuple(typename Default_traits::Edge e) const {
Point_key ks[4];
@ -264,7 +264,7 @@ struct Updatable_Delaunay_triangulation_2 {
else return Cert_tuple(ks);
}
#endif
void point_changed(Point_key ){
//ui()->point_changed(k);
}
@ -281,7 +281,7 @@ struct Updatable_Delaunay_triangulation_2 {
Certificate_pair return_pair(Time rt) const {
return Certificate_pair(rt, Certificate_data());
}
double rational_current_time() const {
return CGAL::to_interval(current_time()).first;
@ -293,9 +293,9 @@ struct Updatable_Delaunay_triangulation_2 {
Update_information* ui() {
return P::active_points_2_table_handle().get();
}
bool hull_certificate_failure_time(typename Default_traits::Edge, Point_key [3],
bool hull_certificate_failure_time(typename Default_traits::Edge, Point_key [3],
Time, Certificate_data) {
return false;
}
@ -343,10 +343,10 @@ struct Updatable_Delaunay_triangulation_2 {
} else {
ect= current_time().refiner().check_.failure_time();
}
check_cert= ui()->in_circle_object()(ui()->exact_point(ct[0]),
ui()->exact_point(ct[1]),
ui()->exact_point(ct[2]),
ui()->exact_point(ct[2]),
ui()->exact_point(ct[3]),
ect, 1);
check_failure_time= check_cert.failure_time();
@ -363,7 +363,7 @@ struct Updatable_Delaunay_triangulation_2 {
//if (bt <0) {
bt= CGAL::to_interval(current_time()).first;
//}
#ifdef MOVE_ALL
if (!disable_filter_1_ && !ui()->can_fail(ct, bt)) {
CGAL_postcondition(check_failure_time > 1);
@ -384,7 +384,7 @@ struct Updatable_Delaunay_triangulation_2 {
if (found) {
CGAL_UD_DEBUG("Will activate " << std::endl);
return false;
}
}
}
} else {
end_time= check_activation(ct, end_time);
@ -394,10 +394,10 @@ struct Updatable_Delaunay_triangulation_2 {
CGAL_postcondition(check_failure_time > 1);
return false;
}
#endif
typename Update_information::Certificate_function cf;
typename Update_information::Certificate_derivitive cfp;
@ -408,7 +408,7 @@ struct Updatable_Delaunay_triangulation_2 {
if (!(ui()->is_active(ct[0]) || ui()->is_active(ct[1])
|| ui()->is_active(ct[2]) || ui()->is_active(ct[3]))) {
isc= Update_information::NO_FAILURE;
} else
} else
#endif
#endif
{
@ -425,7 +425,7 @@ struct Updatable_Delaunay_triangulation_2 {
}
//typename Update_information::Certificate_evaluator se(cf);
typename Update_information::Certificate_acceleration cfpp= cfp.prime();
if (!disable_filter_3_) {
isc= ui()->Newton_isolate(cf, cfp, cfpp,
@ -445,7 +445,7 @@ struct Updatable_Delaunay_triangulation_2 {
CGAL_UD_DEBUG("Refining current time to " << current_time() << std::endl);
bt= CGAL::to_interval(current_time()).first;
if (!disable_filter_3_) {
isc= ui()->Newton_isolate(cf, cfp, cfpp,
isc= ui()->Newton_isolate(cf, cfp, cfpp,
bt > CGAL::to_interval(current_time()).second,
bt, end_time, ft);
}
@ -457,7 +457,7 @@ struct Updatable_Delaunay_triangulation_2 {
}
}
if (isc == Update_information::NO_FAILURE) {
if (isc == Update_information::NO_FAILURE) {
CGAL_UD_DEBUG("No root" << std::endl << std::endl);
CGAL_assertion(check_failure_time >=1);
return false;
@ -470,7 +470,7 @@ struct Updatable_Delaunay_triangulation_2 {
/* Check if the curren time is exact, if so check if I am positive at it*/
if (isc == Update_information::CERTAIN_FAILURE
if (isc == Update_information::CERTAIN_FAILURE
&& CGAL::compare(rett, current_time()) == CGAL::LARGER) {
#ifndef NDEBUG
@ -520,30 +520,30 @@ struct Updatable_Delaunay_triangulation_2 {
++stat_unfailing_exact_certificate_functions_;
return false;
}
#if 0
CGAL_UD_DEBUG("Initial points are " << std:: endl);
typename Indirect_kernel::Current_coordinates ic= ui()->initial_coordinates_object();
typename Indirect_kernel::Current_coordinates fc= ui()->final_coordinates_object();
{
CGAL::Protect_FPU_rounding<true> prot;
CGAL_UD_DEBUG(ic(ct[0]) << ": "
<< ic(ct[1]) << ": "
<< ic(ct[2]) << ": "
<< ic(ct[1]) << ": "
<< ic(ct[2]) << ": "
<< ic(ct[3]) << std::endl);
CGAL_UD_DEBUG("Final points are " << std:: endl);
CGAL_UD_DEBUG(fc(ct[0]) << ": "
<< fc(ct[1]) << ": "
<< fc(ct[2]) << ": "
<< fc(ct[1]) << ": "
<< fc(ct[2]) << ": "
<< fc(ct[3]) << std::endl);
CGAL_UD_DEBUG("Initial incircle is "
CGAL_UD_DEBUG("Initial incircle is "
<< ui()->eval_incircle(INT(ic(ct[0])[0]), INT(ic(ct[0])[1]),
INT(ic(ct[1])[0]), INT(ic(ct[1])[1]),
INT(ic(ct[2])[0]), INT(ic(ct[2])[1]),
INT(ic(ct[3])[0]), INT(ic(ct[3])[1])) << std::endl);
CGAL_UD_DEBUG("Final incircle is "
CGAL_UD_DEBUG("Final incircle is "
<< ui()->eval_incircle(INT(fc(ct[0])[0]), INT(fc(ct[0])[1]),
INT(fc(ct[1])[0]), INT(fc(ct[1])[1]),
INT(fc(ct[2])[0]), INT(fc(ct[2])[1]),
@ -555,9 +555,9 @@ struct Updatable_Delaunay_triangulation_2 {
bool certificate_failure_time(
#ifndef NDEBUG
typename Default_traits::Edge e,
typename Default_traits::Edge e,
#else
typename Default_traits::Edge,
typename Default_traits::Edge,
#endif
Certificate_data , Time &rett, Certificate_data) {
++stat_certificate_advances_;
@ -591,7 +591,7 @@ struct Updatable_Delaunay_triangulation_2 {
// this depends on being the last event of the batch whose time is computed
const Time& net= P::simulator_handle()->next_event_time();
double lb= CGAL::to_interval(net).first;
CGAL_UD_DEBUG("Advancing certificate for " << ct << " to " << lb
@ -600,10 +600,10 @@ struct Updatable_Delaunay_triangulation_2 {
#ifndef MOVE_ALL
//end_time= check_activation(ct, end_time);
#endif
typename Update_information::Certificate_function cf(curt.refiner().certificate_function(), true);
bool wrap_this_into_newton;
// done twiceish
CGAL::Protect_FPU_rounding<true> prot;
@ -611,12 +611,12 @@ struct Updatable_Delaunay_triangulation_2 {
//CGAL::Sign sn= curt.refiner().sign_at(INT(lb,lb));
{
INT lbv= cf(lb);
//ui()->sign_at(ct[0],ct[1],ct[2],ct[3], INT(lb, lb));
if (lbv.inf()<=0) {
CGAL_UD_DEBUG("Not positive at " << lb << std::endl);
lb= CGAL::to_interval(curt).first;
}
}
}
{
@ -627,7 +627,7 @@ struct Updatable_Delaunay_triangulation_2 {
CGAL_UD_DEBUG("No root in interval." << std::endl);
CGAL_postcondition(check_failure_time > 1);
return false;
}
}
}
typename Update_information::Certificate_derivitive cfp(curt.refiner().certificate_derivitive(), true);
@ -639,7 +639,7 @@ struct Updatable_Delaunay_triangulation_2 {
}
}
INT ft;
typename Update_information::Isolate_result isc;
{
@ -647,10 +647,10 @@ struct Updatable_Delaunay_triangulation_2 {
//ui()->certificate_function(ct[0], ct[1], ct[2], ct[3], cf);
;
//typename Update_information::Certificate_evaluator se(cf);
typename Update_information::Certificate_acceleration cfpp(cfp.prime());
if (!disable_filter_3_) {
isc= ui()->Newton_isolate(cf, cfp, cfpp,
isc= ui()->Newton_isolate(cf, cfp, cfpp,
lb > CGAL::to_interval(current_time()).second,
lb, end_time, ft);
} else {
@ -662,10 +662,10 @@ struct Updatable_Delaunay_triangulation_2 {
}
CGAL_UD_DEBUG("Newton isolate got " << isc << " with interval " << ft << std::endl);
}
if (isc == Update_information::NO_FAILURE) {
if (isc == Update_information::NO_FAILURE) {
CGAL_UD_DEBUG("No root there." << std::endl);
CGAL_postcondition(check_failure_time > 1);
return false;
@ -680,7 +680,7 @@ struct Updatable_Delaunay_triangulation_2 {
&& ft.inf() <= CGAL::to_interval(curt).second
|| isc == Update_information::POSSIBLE_FAILURE
|| curt.refiner().has_exact_root()) {
curt.exact_root();
CGAL_UD_DEBUG("Have to generate exact certificate" << std::endl);
Exact_certificate ec= curt.refiner().exact_certificate();
@ -707,7 +707,7 @@ struct Updatable_Delaunay_triangulation_2 {
}
}
CGAL::Comparison_result compare_concurrent(Event_key a,
Edge,
@ -738,10 +738,10 @@ struct Updatable_Delaunay_triangulation_2 {
struct Visitor: public CGAL::Kinetic::Delaunay_triangulation_visitor_base_2 {
Visitor(Simulation_traits tr): tr_(tr) {
}
}
Update_information* ui() {
return tr_.active_points_2_table_handle();
@ -751,7 +751,7 @@ struct Updatable_Delaunay_triangulation_2 {
return tr_.active_points_2_table_handle();
}
#ifndef MOVE_ALL
#if 0
@ -768,9 +768,9 @@ struct Updatable_Delaunay_triangulation_2 {
vhs[2]= TDS_helper::destination(e);
vhs[3]= TDS_helper::mirror_vertex(e);
CGAL_UD_DEBUG("Trying " << pts[0] << " " << pts[1] << " " << pts[2] << " " << pts[3] << std::endl);
if ( active.find(pts[0]) != active.end()
&& active.find(pts[1]) != active.end()
if ( active.find(pts[0]) != active.end()
&& active.find(pts[1]) != active.end()
&& active.find(pts[2]) != active.end()
&& active.find(pts[3]) != active.end()) {
return false;
@ -795,7 +795,7 @@ struct Updatable_Delaunay_triangulation_2 {
} else {
CGAL::Protect_FPU_rounding<true> prot;
++stat_interval_predicate_evaluations_;
ok= ( ui()->sign_at(pts[0], pts[1], pts[2], pts[3], active) == CGAL::POSITIVE);
}
if (!ok) {
@ -811,7 +811,7 @@ struct Updatable_Delaunay_triangulation_2 {
}
}
#else
// fix update
// fix update
bool test_and_add(Edge e) {
++stat_point_predicate_evaluations_;
if (!compute_ok(e, ui()->final_kernel_object())) {
@ -822,7 +822,7 @@ struct Updatable_Delaunay_triangulation_2 {
return true;
} else return false;
}
/*bool test_and_add_one(Edge e, std::vector<Point_key> &active) const {
++stat_point_predicate_evaluations_;
if (!compute_ok(e, ui()->final_kernel_object())) {
@ -836,7 +836,7 @@ struct Updatable_Delaunay_triangulation_2 {
#endif
#endif
template <class TDS>
template <class TDS>
void initialize_events(const TDS &triangulation,
Indirect_kernel fk) {
if (stat_number_of_edges_==0) {
@ -852,7 +852,7 @@ struct Updatable_Delaunay_triangulation_2 {
std::set<Point_key> active;
std::vector<typename TDS::Vertex_handle> new_active;
std::vector<typename TDS::Edge> edges;
for (typename TDS::Finite_edges_iterator it= triangulation.finite_edges_begin();
for (typename TDS::Finite_edges_iterator it= triangulation.finite_edges_begin();
it != triangulation.finite_edges_end(); ++it){
if (test_and_add<0>(*it, active, new_active)) {
++stat_number_of_bad_edges_;
@ -883,7 +883,7 @@ struct Updatable_Delaunay_triangulation_2 {
#else*/
//std::vector<Point_key> active;
for (typename TDS::Finite_edges_iterator it= triangulation.finite_edges_begin();
for (typename TDS::Finite_edges_iterator it= triangulation.finite_edges_begin();
it != triangulation.finite_edges_end(); ++it){
if (test_and_add(*it)) {
++stat_number_of_bad_edges_;
@ -897,15 +897,15 @@ struct Updatable_Delaunay_triangulation_2 {
}
void after_flip(Edge ) {
}
#ifndef MOVE_ALL
bool is_active(Point_key k) const {
return ui()->is_active(k);
@ -921,7 +921,7 @@ struct Updatable_Delaunay_triangulation_2 {
void reset() {
ui()->reset();
}
Static_point_2 initial(Point_key pk) const {
return ui()->ik_.current_coordinates_object()(pk);
}
@ -936,7 +936,7 @@ struct Updatable_Delaunay_triangulation_2 {
ui()->write_stats(out);
}
Simulation_traits tr_;
Simulation_traits tr_;
};
@ -977,7 +977,7 @@ struct Updatable_Delaunay_triangulation_2 {
struct Final_event: public CGAL::Kinetic::Free_event_base {
typedef typename Simulation_traits::Active_points_2_table::Key Table_key;
@ -986,31 +986,31 @@ struct Updatable_Delaunay_triangulation_2 {
tr_(tr), kdel_(kdel){
}
std::ostream & write(std::ostream&out) const {
out << "Final event ";
return out;
}
void process() {
void process() {
kdel_->write_stats(std::cout);
kdel_->visitor().stats_write(std::cout);
tr_.simulator_handle()->set_interval(1,2);
tr_.active_points_2_table_handle()->set_is_editing(Update_information::LOGGED);
for (typename Simulation_traits::Active_points_2_table::Key_iterator
it = tr_.active_points_2_table_handle()->keys_begin();
for (typename Simulation_traits::Active_points_2_table::Key_iterator
it = tr_.active_points_2_table_handle()->keys_begin();
it != tr_.active_points_2_table_handle()->keys_end(); ++it) {
if (!kdel_->visitor().is_active(*it)) {
if (!kdel_->visitor().is_active(*it)) {
tr_.active_points_2_table_handle()->set(*it, interpolate_12(initial(*it),
final(*it)));
} else {
Kinetic_point_2 np(ENT(final(*it).x()),
ENT(final(*it).y()));
tr_.active_points_2_table_handle()->set(*it,np);
}
}
@ -1033,21 +1033,21 @@ struct Updatable_Delaunay_triangulation_2 {
#endif
template <class It>
template <class It>
Updatable_Delaunay_triangulation_2(It b, It e) {
typename Indirect_kernel::Key_range rg= ik_.new_point_2s(b,e);
tr_= Simulation_traits(ik_, 0,0);
Triangulation tr(ik_);
tr.insert(rg.first, rg.second);
Traits traits(tr_);
kdel_= new KDel(traits, tr, Visitor(tr_));
kdel_->clear_stats();
kdel_->visitor().stats_clear();
@ -1056,7 +1056,7 @@ struct Updatable_Delaunay_triangulation_2 {
kdel_->set_has_certificates(true, KDel::HAS_NO_FAILURES);
#endif
}
const Triangulation &triangulation() const {
return kdel_->triangulation(0);
}
@ -1080,12 +1080,12 @@ struct Updatable_Delaunay_triangulation_2 {
char *argv[1]={"UpdateDel"};
typename Qt_gui::Handle qtsim= new Qt_gui(1, argv,
tr_.simulator_handle());
typename Qt_mps::Handle qtmps= new Qt_mps(qtsim, tr_);
//qtmps->set_point_size(10);
typename Qt_triangulation::Handle qtdel
= new Qt_triangulation(kdel_,
tr_.instantaneous_kernel_object(),
tr_.instantaneous_kernel_object(),
qtsim);
#ifndef MOVE_ALL
tr_.simulator_handle()->new_final_event(Final_event(tr_,
@ -1094,7 +1094,7 @@ struct Updatable_Delaunay_triangulation_2 {
std::cout << "Green edges just flipped, grey edges will not flip until"
<< " their certificate changes and black edges will flip." << std::endl;
qtsim->begin_event_loop();
kdel_->visitor().stats_write(std::cout);
ik_.swap(fk);
@ -1134,10 +1134,10 @@ struct Updatable_Delaunay_triangulation_2 {
typename Indirect_kernel::Current_coordinates cc
= ik_.current_coordinates_object();
for (typename KDel::Triangulation::Edge_iterator it
= kdel_->triangulation().edges_begin();
= kdel_->triangulation().edges_begin();
it != kdel_->triangulation().edges_end(); ++it){
if (!compute_ok(*it, ik_)) {
std::cout << "Problem with edge "
std::cout << "Problem with edge "
<< it->first->vertex((it->second+1)%3)->point() << " "
<< it->first->vertex((it->second+2)%3)->point() << " "
<< cc(it->first->vertex((it->second+1)%3)->point()) << ": "
@ -1150,10 +1150,9 @@ struct Updatable_Delaunay_triangulation_2 {
static void read(std::string name, Points &points) {
std::ifstream in(name.c_str());
if (!in) {
std::cerr << "Error opening file " << name << std::endl;
exit(1);
CGAL_error_msg( std::string("Error opening file ") + name );
}
while (true) {
char ln[10000];
in.getline(ln, 10000);
@ -1178,9 +1177,9 @@ struct Updatable_Delaunay_triangulation_2 {
};
}
static bool compute_ok(const Edge &e, Indirect_kernel sk) {
//typename Indirect_kernel::Current_coordinates
//typename Indirect_kernel::Current_coordinates
//cc= sk.current_coordinates_object();
Point_key ks[4];
ks[0]= TDS_helper::origin(e)->point();
@ -1192,27 +1191,27 @@ struct Updatable_Delaunay_triangulation_2 {
return true;
}
}
typename Indirect_kernel::Side_of_oriented_circle_2 soc
= sk.side_of_oriented_circle_2_object();
CGAL::Oriented_side s=soc(ks[0], ks[1], ks[2], ks[3]);
if (s== CGAL::ON_ORIENTED_BOUNDARY) {
CGAL_UD_DEBUG("Degeneracy with edge "
CGAL_UD_DEBUG("Degeneracy with edge "
<< ks[0] << " " << ks[2] << std::endl);
}
return s!= CGAL::ON_NEGATIVE_SIDE;
}
static int run(int , char *[], int , int ,
static int run(int , char *[], int , int ,
int , std::string ifile, std::string ffile) {
//typedef CGAL::Kinetic::Inexact_simulation_traits_2 Traits;
CGAL_SET_LOG_LEVEL(CGAL::Kinetic::Log::SOME);

View File

@ -752,7 +752,7 @@ protected:
int count=0;
Iterator it= source.begin();
while (it != source.end()) {
// assert(it->time() >= a);
// CGAL_assertion(it->time() >= a);
if (leq_ub(it->time())) {
Item *i= &*it;
@ -908,7 +908,7 @@ protected:
void grow_front() {
//++growth__;
//std::cout << "Growing front from " << ub_ << std::endl;
//assert(is_valid());
//CGAL_assertion(is_valid());
CGAL_precondition(!back_.empty());
CGAL_precondition(front_.empty());
CGAL_assertion_code(unsigned int sz= front_.size()+back_.size()+ inf_.size());

View File

@ -14,7 +14,7 @@
//
// $URL$
// $Id$
//
//
//
// Author(s) : Daniel Russel <drussel@alumni.princeton.edu>

View File

@ -82,7 +82,7 @@ Qt_widget_style_editor::Qt_widget_style_editor(Style* style,
this, SLOT(pointstyle(int)));
break;
default:
CGAL_assertion(false);
CGAL_error();
break;
}

View File

@ -1059,7 +1059,7 @@ public slots:
emit( insertedInput() );
}
else // obj should be a polygon or a point!
CGAL_assertion(false);
CGAL_error();
updatePointCounter();
widget->redraw();
}

View File

@ -66,7 +66,7 @@
// Define some assertion macros used in the code.
#ifdef CGAL_MINIBALL_DEBUG
#define CGAL_MINIBALL_ASSERT(expr) assert(expr)
#define CGAL_MINIBALL_ASSERT(expr) CGAL_assertion(expr)
#define CGAL_MINIBALL_DO_DEBUG(expr) expr
#else
#define CGAL_MINIBALL_ASSERT(expr) ;

View File

@ -750,7 +750,7 @@ private:
return (*it).N;
++it;
}
CGAL_assertion(false);
CGAL_error();
return Nef_polyhedron(); // kill warning.
}

View File

@ -107,7 +107,7 @@ public:
Point_2 epoint(const Standard_FT& m1, const Standard_FT& n1,
const Standard_FT& m2, const Standard_FT& n2) const
{
CGAL_assertion_msg(false, "Bounded_kernel::epoint(..) should not be called");
CGAL_error_msg( "Bounded_kernel::epoint(..) should not be called");
return Point_2();
}
@ -122,7 +122,7 @@ public:
Point_2
construct_point(const Standard_line_2& , Point_type& ) const
{
CGAL_assertion_msg(false, "Bounded_kernel::construct_point(Line,Point_type) should not be called");
CGAL_error_msg( "Bounded_kernel::construct_point(Line,Point_type) should not be called");
return Point_2();
}
@ -131,14 +131,14 @@ public:
const Standard_point_2& ,
Point_type& t) const
{
CGAL_assertion_msg(false, "Bounded_kernel::construct_point(Point,Point) should not be called");
CGAL_error_msg( "Bounded_kernel::construct_point(Point,Point) should not be called");
return Point_2();
}
Point_2
construct_point(const Standard_line_2& ) const
{
CGAL_assertion_msg(false, "Bounded_kernel::construct_point(Line) should not be called");
CGAL_error_msg( "Bounded_kernel::construct_point(Line) should not be called");
return Point_2();
}
@ -146,21 +146,21 @@ public:
construct_point(const Standard_point_2& ,
const Standard_point_2& ) const
{
CGAL_assertion_msg(false, "Bounded_kernel::construct_point(Point,Point) should not be called");
CGAL_error_msg( "Bounded_kernel::construct_point(Point,Point) should not be called");
return Point_2();
}
Point_2 construct_point(const Standard_point_2& ,
const Standard_direction_2& ) const
{
CGAL_assertion_msg(false, "Bounded_kernel::construct_point(Point,Direction) should not be called");
CGAL_error_msg( "Bounded_kernel::construct_point(Point,Direction) should not be called");
return Point_2();
}
Point_2
construct_opposite_point(const Standard_line_2& l) const
{
CGAL_assertion_msg(false, "Bounded_kernel::construct_opposite_point(..) should not be called");
CGAL_error_msg( "Bounded_kernel::construct_opposite_point(..) should not be called");
return Point_2();
}
@ -186,21 +186,21 @@ public:
Standard_line_2
standard_line(const Point_2& p) const
{
CGAL_assertion_msg(false, "Bounded_kernel::standard_line(..) should not be called");
CGAL_error_msg( "Bounded_kernel::standard_line(..) should not be called");
return Standard_line_2();
}
Standard_ray_2
standard_ray(const Point_2& p) const
{
CGAL_assertion_msg(false, "Bounded_kernel::standard_ray(..) should not be called");
CGAL_error_msg( "Bounded_kernel::standard_ray(..) should not be called");
return Standard_ray_2();
}
Point_2
NE() const
{
CGAL_assertion_msg(false, "Bounded_kernel::NE(..) should not be called");
CGAL_error_msg( "Bounded_kernel::NE(..) should not be called");
return Point_2();
}
@ -208,7 +208,7 @@ public:
Point_2
SE() const
{
CGAL_assertion_msg(false, "Bounded_kernel::SE(..) should not be called");
CGAL_error_msg( "Bounded_kernel::SE(..) should not be called");
return Point_2();
}
@ -216,7 +216,7 @@ public:
Point_2
NW() const
{
CGAL_assertion_msg(false, "Bounded_kernel::NW(..) should not be called");
CGAL_error_msg( "Bounded_kernel::NW(..) should not be called");
return Point_2();
}
@ -224,7 +224,7 @@ public:
Point_2
SW() const
{
CGAL_assertion_msg(false, "Bounded_kernel::SW(..) should not be called");
CGAL_error_msg( "Bounded_kernel::SW(..) should not be called");
return Point_2();
}
@ -232,7 +232,7 @@ public:
Line_2
upper() const
{
CGAL_assertion_msg(false, "Bounded_kernel::upper(..) should not be called");
CGAL_error_msg( "Bounded_kernel::upper(..) should not be called");
return Line_2();
}
@ -240,7 +240,7 @@ public:
Line_2
lower() const
{
CGAL_assertion_msg(false, "Bounded_kernel::lower(..) should not be called");
CGAL_error_msg( "Bounded_kernel::lower(..) should not be called");
return Line_2();
}
@ -248,7 +248,7 @@ public:
Line_2
left() const
{
CGAL_assertion_msg(false, "Bounded_kernel::left(..) should not be called");
CGAL_error_msg( "Bounded_kernel::left(..) should not be called");
return Line_2();
}
@ -257,7 +257,7 @@ public:
Line_2
right() const
{
CGAL_assertion_msg(false, "Bounded_kernel::right(..) should not be called");
CGAL_error_msg( "Bounded_kernel::right(..) should not be called");
return Line_2();
}
@ -367,7 +367,7 @@ public:
CGAL::Object result =
_intersect(l1, l2);
if ( !CGAL::assign(p, result) )
CGAL_assertion_msg(false,"intersection: no intersection.");
CGAL_error_msg("intersection: no intersection.");
return p;
}

View File

@ -369,7 +369,7 @@ and |s2|.}*/
CGAL::Object result =
_intersect(l1, l2);
if ( !CGAL::assign(p, result) )
CGAL_assertion_msg(false,"intersection: no intersection.");
CGAL_error_msg("intersection: no intersection.");
return p;
}

View File

@ -432,7 +432,7 @@ on the extended geometric objects.}*/
CGAL::Object result =
_intersect(_line(s1),_line(s2));
if ( !CGAL::assign(p, result) )
CGAL_assertion_msg(false,"intersection: no intersection.");
CGAL_error_msg("intersection: no intersection.");
simplify(p);
return p;
}

View File

@ -1039,7 +1039,7 @@ Point_type determine_type(const Standard_line_2& l) const
abscissa_distance(l) > Standard_FT(0))) {
return TOPFRAME;
}
CGAL_assertion_msg(false," determine_type: degenerate line.");
CGAL_error_msg(" determine_type: degenerate line.");
return (Point_type)-1; // never come here
}

View File

@ -37,11 +37,11 @@ class Bounding_box_2 {
public:
template<typename Vertex_iterator>
Bounding_box_2(Vertex_iterator , Vertex_iterator ) {
CGAL_assertion_msg(false, "dummy interface");
CGAL_error_msg( "dummy interface");
}
Point intersection_ray_bbox(const SPoint& , const SDirection& ) {
CGAL_assertion_msg(false, "dummy interface");
CGAL_error_msg( "dummy interface");
return Point();
}
};
@ -104,7 +104,7 @@ class Bounding_box_2<Tag_false,Kernel>
Kernel K;
return K.construct_point(minmax);
}
CGAL_assertion_msg(false, "code not robust - l2 must be constructed to"
CGAL_error_msg( "code not robust - l2 must be constructed to"
" be non-collinear with l1");
return Point();
}

View File

@ -38,11 +38,6 @@
CGAL_BEGIN_NAMESPACE
inline void CGAL_error_handler(int n, const char* s)
{ std::cerr << s << std::endl;
std::exit(n);
}
struct Do_nothing {
Do_nothing() {}
template <typename ARG>
@ -105,11 +100,11 @@ public:
int s = 0;
if ( p == point(source(e1)) ) s = orientation(e2,p);
else if ( p == point(source(e2)) ) s = - orientation(e1,p);
else CGAL_error_handler(1,"compare error in sweep.");
else CGAL_error_msg("compare error in sweep.");
if ( s || source(e1) == target(e1) || source(e2) == target(e2) )
return ( s < 0 );
s = orientation(e2,point(target(e1)));
if (s==0) CGAL_error_handler(1,"parallel edges not allowed.");
if (s==0) CGAL_error_msg("parallel edges not allowed.");
return ( s < 0 );
}
@ -236,7 +231,7 @@ public:
{
// we triangulate the interior of the whole chain between
// target(e_upper) and target(e_lower)
assert(source(e_upper)==source(e_lower));
CGAL_assertion(source(e_upper)==source(e_lower));
CGAL_NEF_TRACE("triangulate_between\n "<<seg(e_upper));
CGAL_NEF_TRACEN("\n "<<seg(e_lower));
Halfedge_handle e_end = twin(e_lower);

View File

@ -60,7 +60,7 @@ struct Line_to_epoint {
ordinate_distance(l) > FT(0))) {
return TOPFRAME;
}
CGAL_assertion_msg(false," determine_type: degenerate line.");
CGAL_error_msg(" determine_type: degenerate line.");
return (Point_type)-1; // never come here
}

View File

@ -82,7 +82,7 @@ struct PM_persistent_PL_traits
if ( cmpX > 0 ) return EndingNonVertical;
int cmpY = pK->compare_y(p_u, p_v);
assert(cmpY != 0);
CGAL_assertion(cmpY != 0);
if ( cmpY < 0 ) return StartingVertical;
return EndingVertical;
}
@ -173,14 +173,14 @@ struct PM_persistent_PL_traits
{ /* we only get an L_plus (non-nil) if L is ABOVE a vertex
in which case we want to extract the face from the edge
below (p+epsilon) available via L_plus. */
if (!L_plus.is_nil()) { assert(L_plus.is_edge());
if (!L_plus.is_nil()) { CGAL_assertion(L_plus.is_edge());
return Object_handle(Edge(L_plus));
} else {
if ( L.is_edge() ) {
return Object_handle(Edge(L));
}
if ( L.is_node() ) {
Node v(L); assert( v != Node() );
Node v(L); CGAL_assertion( v != Node() );
return Object_handle(v);
}
return Object_handle();

View File

@ -13,7 +13,7 @@
//
// $URL$
// $Id$
//
//
//
// Author(s) : Michael Seel <seel@mpi-sb.mpg.de>
#ifndef CGAL_PM_POINT_LOCATOR_H
@ -31,7 +31,7 @@
#include <CGAL/Nef_2/geninfo.h>
#ifdef CGAL_USE_LEDA
#include <CGAL/LEDA_basic.h>
#include <CGAL/LEDA_basic.h>
# if __LEDA__ > 410 && __LEDA__ < 441
# define CGAL_USING_PPL
# include <CGAL/Nef_2/PM_persistent_PL.h>
@ -46,16 +46,16 @@ template < class Node, class Object>
struct Project_halfedge_point {
typedef Node argument_type;
typedef Object result_type;
Object& operator()( Node& x) const {
Object& operator()( Node& x) const {
return x.vertex()->point();
}
const Object& operator()( const Node& x) const {
return x.vertex()->point();
const Object& operator()( const Node& x) const {
return x.vertex()->point();
}
};
/*{\Moptions print_title=yes }*/
/*{\Msubst
/*{\Moptions print_title=yes }*/
/*{\Msubst
PM_decorator_#PMD
Geometry_#GEO
}*/
@ -86,7 +86,7 @@ public:
typedef typename Decorator::Plane_map Plane_map;
/*{\Mtypemember the plane map type decorated by |Decorator|.}*/
typedef typename Decorator::Mark Mark;
/*{\Mtypemember the attribute of all objects (vertices, edges,
/*{\Mtypemember the attribute of all objects (vertices, edges,
faces).}*/
typedef Geometry_ Geometry;
@ -98,26 +98,26 @@ public:
/*{\Mtypemember the segment type of the geometry kernel.}*/
typedef typename Geometry_::Direction_2 Direction;
/*{\Mtext Local types are handles, iterators and circulators of the
following kind: |Vertex_const_handle|, |Vertex_const_iterator|,
|Halfedge_const_handle|, |Halfedge_const_iterator|, |Face_const_handle|,
/*{\Mtext Local types are handles, iterators and circulators of the
following kind: |Vertex_const_handle|, |Vertex_const_iterator|,
|Halfedge_const_handle|, |Halfedge_const_iterator|, |Face_const_handle|,
|Face_const_iterator|.}*/
typedef CGAL::Object_handle Object_handle;
/*{\Mtypemember a generic handle to an object of the underlying plane
map. The kind of the object |(vertex, halfedge,face)| can be determined and
the object assigned by the three functions:\\
|bool assign(Vertex_const_handle& h, Object_handle o)|\\
|bool assign(Halfedge_const_handle& h, Object_handle o)|\\
|bool assign(Face_const_handle& h, Object_handle o)|\\ where each
the object assigned by the three functions:\\
|bool assign(Vertex_const_handle& h, Object_handle o)|\\
|bool assign(Halfedge_const_handle& h, Object_handle o)|\\
|bool assign(Face_const_handle& h, Object_handle o)|\\ where each
function returns |true| iff the assignment of |o| to |h| was valid.}*/
typedef typename PM_decorator_::Vertex_handle Vertex_handle;
typedef typename PM_decorator_::Halfedge_handle Halfedge_handle;
typedef typename PM_decorator_::Face_handle Face_handle;
typedef typename PM_decorator_::Vertex_const_handle Vertex_const_handle;
typedef typename PM_decorator_::Halfedge_const_handle Halfedge_const_handle;
typedef typename PM_decorator_::Face_const_handle Face_const_handle;
typedef typename PM_decorator_::Vertex_handle Vertex_handle;
typedef typename PM_decorator_::Halfedge_handle Halfedge_handle;
typedef typename PM_decorator_::Face_handle Face_handle;
typedef typename PM_decorator_::Vertex_const_handle Vertex_const_handle;
typedef typename PM_decorator_::Halfedge_const_handle Halfedge_const_handle;
typedef typename PM_decorator_::Face_const_handle Face_const_handle;
typedef typename PM_decorator_::Vertex_iterator Vertex_iterator;
typedef typename PM_decorator_::Halfedge_iterator Halfedge_iterator;
typedef typename PM_decorator_::Face_iterator Face_iterator;
@ -140,7 +140,7 @@ public:
using Base::number_of_halfedges;
using Base::number_of_faces;
Halfedge_const_handle out_wedge(Vertex_const_handle v,
Halfedge_const_handle out_wedge(Vertex_const_handle v,
const Direction& d, bool& collinear) const
/*{\Xop returns a halfedge |e| bounding a wedge in between two
neighbored edges in the adjacency list of |v| which contains |d|.
@ -148,7 +148,7 @@ public:
into the interior of such a wedge then |e| is the first edge hit
when |d| is rotated clockwise. \precond |v| is not isolated.}*/
{ CGAL_NEF_TRACEN("out_wedge "<<PV(v));
assert(!is_isolated(v));
CGAL_assertion(!is_isolated(v));
collinear=false;
Point p = point(v);
Halfedge_const_handle e_res = first_out_edge(v);
@ -178,7 +178,7 @@ public:
PM_naive_point_locator() : Base() {}
/*{\Moptions constref=yes}*/
PM_naive_point_locator(const Plane_map& P, const Geometry& k = Geometry()) :
PM_naive_point_locator(const Plane_map& P, const Geometry& k = Geometry()) :
Base(const_cast<Plane_map&>(P)), K(k) {}
/*{\Mcreate constructs a point locator working on |P|.}*/
/*{\Moptions constref=no}*/
@ -186,28 +186,27 @@ public:
const Mark& mark(Object_handle h) const
/*{\Mop returns the mark associated to the object |h|.}*/
{ Vertex_const_handle v;
Halfedge_const_handle e;
{ Vertex_const_handle v;
Halfedge_const_handle e;
Face_const_handle f;
if ( assign(v,h) ) return mark(v);
if ( assign(e,h) ) return mark(e);
if ( assign(f,h) ) return mark(f);
CGAL_assertion_msg(0,
"PM_point_locator::mark: Object_handle holds no object.");
CGAL_error_msg("PM_point_locator::mark: Object_handle holds no object.");
#if !defined(__BORLANDC__)
return mark(v); // never reached
#endif
}
Object_handle locate(const Segment& s) const
/*{\Mop returns a generic handle |h| to an object (vertex, halfedge,
face) of the underlying plane map |P| which contains the point |p =
s.source()| in its relative interior. |s.target()| must be a point
such that |s| intersects the $1$-skeleton of |P|.}*/
{ CGAL_NEF_TRACEN("locate naivly "<<s);
if (this->number_of_vertices() == 0)
CGAL_assertion_msg(0,"PM_naive_point_locator: plane map is empty.");
if (this->number_of_vertices() == 0)
CGAL_error_msg("PM_naive_point_locator: plane map is empty.");
Point p = K.source(s);
Vertex_const_iterator vit;
for(vit = this->vertices_begin(); vit != this->vertices_end(); ++vit) {
@ -216,7 +215,7 @@ public:
Halfedge_const_iterator eit;
for(eit = this->halfedges_begin(); eit != this->halfedges_end(); ++(++eit)) {
// we only have to check each second halfedge
if ( K.contains(segment(eit),p) )
if ( K.contains(segment(eit),p) )
return Object_handle(eit);
}
Vertex_const_handle v_res;
@ -235,7 +234,7 @@ public:
bool dummy;
e_res = out_wedge(vit,dso,dummy);
Halfedge_around_vertex_const_circulator el(e_res),ee(el);
CGAL_For_all(el,ee)
CGAL_For_all(el,ee)
visited[el] = visited[twin(el)] = true;
/* e_res is now the counterclockwise maximal halfedge out
of v just before s */
@ -254,11 +253,11 @@ public:
int o1 = K.orientation(ss,se);
int o2 = K.orientation(ss,te);
if ( o1 == -o2 && // internal intersection
K.orientation(se,te,K.source(ss)) !=
K.orientation(se,te,K.target(ss)) ) {
K.orientation(se,te,K.source(ss)) !=
K.orientation(se,te,K.target(ss)) ) {
CGAL_NEF_TRACEN(" location via halfedge "<<segment(eit));
Point p_res = K.intersection(s,segment(eit));
ss = K.construct_segment(p,p_res);
ss = K.construct_segment(p,p_res);
e_res = (o2 > 0 ? eit : twin(eit));
// o2>0 => te left of s and se right of s => p left of e
visited[eit] = visited[twin(eit)] = true;
@ -273,7 +272,7 @@ public:
return Object_handle((Face_const_handle)(face(v_res)));
}
template <typename Object_predicate>
Object_handle ray_shoot(const Segment& s, const Object_predicate& M) const
/*{\Mop returns an |Object_handle o| which can be converted to a
@ -286,18 +285,18 @@ public:
object. The operation returns the null handle |NULL| if the ray shoot
along |s| does not hit any object |h| of |P| with |M(h)|.}*/
{ CGAL_NEF_TRACEN("naive ray_shoot "<<s);
assert( !K.is_degenerate(s) );
CGAL_assertion( !K.is_degenerate(s) );
Point p = K.source(s);
Segment ss(s);
Direction d = K.construct_direction(K.source(s),K.target(s));
Object_handle h = locate(s);
Vertex_const_handle v;
Halfedge_const_handle e;
Vertex_const_handle v;
Halfedge_const_handle e;
Face_const_handle f;
if ( assign(v,h) && M(v) ||
assign(e,h) && M(e) ||
assign(f,h) && M(f) ) return h;
h = Object_handle();
h = Object_handle();
CGAL_NEF_TRACEN("not contained");
for (v = this->vertices_begin(); v != this->vertices_end(); ++v) {
Point pv = point(v);
@ -311,7 +310,7 @@ public:
// now we know that v is not marked but on s
bool collinear;
Halfedge_const_handle e = out_wedge(v,d,collinear);
if ( collinear ) {
if ( collinear ) {
if ( M(e) ) {
h = Object_handle(e);
ss = K.construct_segment(p,pv);
@ -339,10 +338,10 @@ public:
// o2 > 0 => te left of s and se right of s => p left of e
if ( M(e_res) ) {
h = Object_handle(e_res);
ss = K.construct_segment(p,p_res);
ss = K.construct_segment(p,p_res);
} else if ( M(face(twin(e_res))) ) {
h = Object_handle(face(twin(e_res)));
ss = K.construct_segment(p,p_res);
ss = K.construct_segment(p,p_res);
}
}
}
@ -369,13 +368,13 @@ public:
}; // PM_naive_point_locator<PM_decorator_,Geometry_>
/*{\Moptions print_title=yes }*/
/*{\Msubst
/*{\Moptions print_title=yes }*/
/*{\Msubst
PM_decorator_#PMD
Geometry_#GEO
}*/
/*{\Manpage {PM_point_locator}{PMD,GEO}
{Point location in plane maps via LMWT}{PL}}*/
/*{\Manpage {PM_point_locator}{PMD,GEO}
{Point location in plane maps via LMWT}{PL}}*/
/*{\Mdefinition An instance |\Mvar| of data type |\Mname|
encapsulates point location queries within a plane map |P|. The two
template parameters are specified via concepts. |PMD| must be a model
@ -387,14 +386,14 @@ appendix. For a specification of plane maps see also the concept of
/*{\Mgeneralization PMD^#PM_naive_point_locator<PMD,GEO>}*/
template <typename PM_decorator_, typename Geometry_>
class PM_point_locator : public
class PM_point_locator : public
PM_naive_point_locator<PM_decorator_,Geometry_> {
protected:
typedef PM_naive_point_locator<PM_decorator_,Geometry_> Base;
typedef PM_point_locator<PM_decorator_,Geometry_> Self;
Base CT;
#ifdef CGAL_USING_PPL
typedef PM_persistent_PL_traits<Base> PMPPLT;
typedef PM_persistent_PL_traits<Base> PMPPLT;
typedef PointLocator<PMPPLT> PMPP_locator;
PMPP_locator* pPPL;
#define LOCATE_IN_TRIANGULATION pPPL->locate_down
@ -412,12 +411,12 @@ public:
typedef typename Base::Segment Segment;
typedef typename Base::Direction Direction;
typedef typename Base::Object_handle Object_handle;
typedef typename Base::Vertex_handle Vertex_handle;
typedef typename Base::Halfedge_handle Halfedge_handle;
typedef typename Base::Face_handle Face_handle;
typedef typename Base::Vertex_const_handle Vertex_const_handle;
typedef typename Base::Halfedge_const_handle Halfedge_const_handle;
typedef typename Base::Face_const_handle Face_const_handle;
typedef typename Base::Vertex_handle Vertex_handle;
typedef typename Base::Halfedge_handle Halfedge_handle;
typedef typename Base::Face_handle Face_handle;
typedef typename Base::Vertex_const_handle Vertex_const_handle;
typedef typename Base::Halfedge_const_handle Halfedge_const_handle;
typedef typename Base::Face_const_handle Face_const_handle;
typedef typename Base::Vertex_iterator Vertex_iterator;
typedef typename Base::Halfedge_iterator Halfedge_iterator;
typedef typename Base::Face_iterator Face_iterator;
@ -440,13 +439,13 @@ public:
struct CT_link_to_original : Decorator { // CT decorator
const Decorator& Po;
CT_link_to_original(const Decorator& P, const Decorator& Poi)
CT_link_to_original(const Decorator& P, const Decorator& Poi)
: Decorator(P), Po(Poi) {}
void operator()(Vertex_handle vn, Vertex_const_handle vo) const
{ Face_const_handle f;
if ( Po.is_isolated(vo) ) f = Po.face(vo);
geninfo<VF_pair>::create(info(vn));
geninfo<VF_pair>::access(info(vn)) = VF_pair(vo,f);
geninfo<VF_pair>::access(info(vn)) = VF_pair(vo,f);
CGAL_NEF_TRACEN("linking to org "<<PV(vn));
}
void operator()(Halfedge_handle hn, Halfedge_const_handle ho) const
@ -470,7 +469,7 @@ protected:
Object_handle input_object(Vertex_const_handle v) const
{ return Object_handle(input_vertex(v)); }
Object_handle input_object(Halfedge_const_handle e) const
Object_handle input_object(Halfedge_const_handle e) const
{ Halfedge_const_handle e_org = input_halfedge(e);
if ( e_org != Halfedge_const_handle() )
return Object_handle( e_org );
@ -478,7 +477,7 @@ protected:
return Object_handle( input_face(e) );
}
/*{\Mimplementation
/*{\Mimplementation
The efficiency of this point location module is mostly based on
heuristics. Therefore worst case bounds are not very expressive. The
query operations take up to linear time for subsequent query
@ -508,9 +507,9 @@ protected:
ray shot is expected to be $O( \sqrt{n} )$.}*/
struct CT_new_edge : Decorator {
struct CT_new_edge : Decorator {
const Decorator& _DP;
CT_new_edge(const Decorator& CT, const Decorator& DP) :
CT_new_edge(const Decorator& CT, const Decorator& DP) :
Decorator(CT), _DP(DP) {}
void operator()(Halfedge_handle& e) const
{ Halfedge_handle e_from = previous(e);
@ -523,11 +522,11 @@ protected:
geninfo<EF_pair>::create(info(e));
geninfo<EF_pair>::create(info(twin(e)));
geninfo<EF_pair>::access(info(e)).first =
geninfo<EF_pair>::access(info(twin(e))).first =
geninfo<EF_pair>::access(info(e)).first =
geninfo<EF_pair>::access(info(twin(e))).first =
Halfedge_const_handle();
geninfo<EF_pair>::access(info(e)).second =
geninfo<EF_pair>::access(info(e)).second =
geninfo<EF_pair>::access(info(twin(e))).second = f;
CGAL_NEF_TRACEN("CT_new_edge "<<PE(e));
}
@ -547,13 +546,13 @@ protected:
{ CGAL_NEF_TRACEN("minimize_weight_CT");
if ( this->number_of_vertices() < 2 ) return;
std::list<Halfedge_handle> S;
/* We maintain a stack |S| of edges containing diagonals
/* We maintain a stack |S| of edges containing diagonals
which might have to be flipped. */
int flip_count = 0;
Halfedge_iterator e;
for (e = CT.halfedges_begin(); e != CT.halfedges_end(); ++(++e)) {
Halfedge_const_handle e_org = input_halfedge(e);
if ( e_org != Halfedge_const_handle() )
if ( e_org != Halfedge_const_handle() )
continue;
S.push_back(e);
}
@ -562,7 +561,7 @@ protected:
Halfedge_handle e = S.front(); S.pop_front();
Halfedge_handle r = twin(e);
Halfedge_const_handle e_org = input_halfedge(e);
if ( e_org != Halfedge_const_handle() )
if ( e_org != Halfedge_const_handle() )
continue;
Halfedge_handle e1 = next(r);
Halfedge_handle e3 = next(e);
@ -581,11 +580,11 @@ protected:
CGAL_NEF_TRACEN("flipping diagonal of quadilateral"<<a<<b<<c<<d);
Halfedge_handle e2 = next(e1);
Halfedge_handle e4 = next(e3);
S.push_back(e1);
S.push_back(e2);
S.push_back(e3);
S.push_back(e4);
flip_diagonal(e);
S.push_back(e1);
S.push_back(e2);
S.push_back(e3);
S.push_back(e4);
flip_diagonal(e);
flip_count++;
}
@ -597,11 +596,11 @@ protected:
public:
/*{\Mcreation 3}*/
PM_point_locator() {
PM_point_locator() {
#ifdef CGAL_USING_PPL
pPPL = 0;
#endif
}
/*{\Moptions constref=yes}*/
@ -617,41 +616,41 @@ public:
is superimposed to |P|.}*/
/*{\Moptions constref=no}*/
Object_handle locate(const Point& p) const
/*{\Mop returns a generic handle |h| to an object (vertex, halfedge,
face) of |P| which contains the point |p| in its relative
interior.}*/
{
{
Object_handle h = LOCATE_IN_TRIANGULATION(p);
Vertex_const_handle v_triang;
if ( assign(v_triang,h) ) {
return input_object(v_triang);
}
}
Halfedge_const_handle e_triang;
if ( assign(e_triang,h) ) {
Halfedge_const_handle e = input_halfedge(e_triang);
if ( e == Halfedge_const_handle() ) // inserted during triangulation
return Object_handle(input_face(e_triang));
return Object_handle(input_face(e_triang));
int orientation_ = this->K.orientation(segment(e),p);
if ( orientation_ == 0 ) return Object_handle(e);
if ( orientation_ < 0 ) return Object_handle(face(twin(e)));
if ( orientation_ > 0 ) return Object_handle(face(e));
}
}
CGAL_assertion(!check_tag(typename Is_extended_kernel<Geometry>::value_type()));
return Face_const_handle(faces_begin());
// assert(0); return h; // compiler warning
// CGAL_assertion(0); return h; // compiler warning
}
bool ray_shoot_from_outer_facet(Segment& , object_kind& ,
Vertex_const_handle &,
bool ray_shoot_from_outer_facet(Segment& , object_kind& ,
Vertex_const_handle &,
Halfedge_const_handle& ,
const Tag_true& ) const {
return false;
}
bool ray_shoot_from_outer_facet(Segment& s, object_kind& current,
Vertex_const_handle &v,
bool ray_shoot_from_outer_facet(Segment& s, object_kind& current,
Vertex_const_handle &v,
Halfedge_const_handle& e,
const Tag_false& ) const {
CGAL_NEF_TRACEN("target on outer facet");
@ -665,7 +664,7 @@ public:
CGAL_For_all(circ, end) {
// std::cerr << s << std::endl;
// std::cerr << point(source(circ)) << "->" << point(target(circ)) << std::endl;
Object o = intersection(s, Segment(point(source(circ)),
Object o = intersection(s, Segment(point(source(circ)),
point(target(circ))));
if(assign(i,o)) {
@ -678,7 +677,7 @@ public:
} else if(i == point(target(circ))) {
current = VERTEX;
v = target(circ);
} else {
} else {
current = EDGE_CROSSING;
e = circ;
}
@ -696,7 +695,7 @@ public:
Object_handle ray_shoot(const Segment& ss, const Object_predicate& M) const
/*{\Mop returns an |Object_handle o| which can be converted to a
|Vertex_const_handle|, |Halfedge_const_handle|, |Face_const_handle|
|h| as described above. The object predicate |M| has to have
|h| as described above. The object predicate |M| has to have
function operators\\
|bool operator() (const Vertex_/ Halfedge_/Face_const_handle&) const|.\\
The object returned is intersected by the segment |s| and has minimal
@ -707,7 +706,7 @@ public:
CGAL_NEF_TRACEN("ray_shoot "<<s);
CGAL_assertion( !this->K.is_degenerate(s) );
Point p = this->K.source(s);
Direction d = this->K.construct_direction(p,s.target());
Direction d = this->K.construct_direction(p,s.target());
Vertex_const_handle v;
Halfedge_const_handle e;
object_kind current;
@ -720,14 +719,14 @@ public:
int orientation_ = this->K.orientation( segment(e), p);
if ( orientation_ == 0 ) { // p on segment
CGAL_NEF_TRACEN("on edge "<<PE(e));
if ( d == CT.direction(e) )
if ( d == CT.direction(e) )
{ current = EDGE_COLLINEAR; }
else if ( d == CT.direction(CT.twin(e)) )
else if ( d == CT.direction(CT.twin(e)) )
{ e = CT.twin(e); current = EDGE_COLLINEAR; }
else { // crossing
current = EDGE_CROSSING;
if ( !(this->K.orientation(CT.segment(e),s.target())>0) ) // not left_turn
e = CT.twin(e);
e = CT.twin(e);
}
} else { // p not on segment, thus in triangle
@ -737,8 +736,8 @@ public:
if ( M(input_face(e)) ) // face mark
return Object_handle(input_face(e));
Point p1 = CT.point(CT.source(e)),
p2 = CT.point(CT.target(e)),
Point p1 = CT.point(CT.source(e)),
p2 = CT.point(CT.target(e)),
p3 = CT.point(CT.target(next(e)));
int or1 = this->K.orientation(p,s.target(),p1);
int or2 = this->K.orientation(p,s.target(),p2);
@ -761,7 +760,7 @@ public:
} else {
if(check_tag(typename Is_extended_kernel<Geometry>::value_type())) {
CGAL_assertion_msg(false, "code is only for Bounded_kernel");
CGAL_error_msg( "code is only for Bounded_kernel");
}
if(!ray_shoot_from_outer_facet(s,current,v,e,typename Is_extended_kernel<Geometry>::value_type()))
return Object_handle();
@ -792,7 +791,7 @@ public:
break;
case EDGE_CROSSING:
{ CGAL_NEF_TRACEN("crossing edge "<<segment(e));
if ( this->K.orientation(CT.segment(e),s.target()) == 0 )
if ( this->K.orientation(CT.segment(e),s.target()) == 0 )
return Object_handle();
Halfedge_const_handle e_org = input_halfedge(e);
if ( e_org != Halfedge_const_handle() ) { // not a CT edge
@ -803,11 +802,11 @@ public:
CGAL_NEF_TRACEN("v_cand "<<PV(v_cand));
int orientation_ = this->K.orientation(p,s.target(),CT.point(v_cand));
switch( orientation_ ) {
case 0:
case 0:
v = v_cand; current = VERTEX; break;
case +1:
case +1:
e = CT.twin(CT.next(e)); current = EDGE_CROSSING; break;
case -1:
case -1:
e = CT.twin(CT.previous(e)); current = EDGE_CROSSING; break;
}
}
@ -817,43 +816,43 @@ public:
{ CGAL_NEF_TRACEN("collinear edge "<<CT.segment(e));
Halfedge_const_handle e_org = input_halfedge(e);
if ( e_org == Halfedge_const_handle() ) { // a CT edge
if ( M(input_face(e)) )
if ( M(input_face(e)) )
return Object_handle(input_face(e));
} else { // e_org is not a CT edge
if ( M(e_org) )
return Object_handle(e_org);
}
if ( this->K.strictly_ordered_along_line(
CT.point(CT.source(e)),s.target(),CT.point(CT.target(e))) )
CT.point(CT.source(e)),s.target(),CT.point(CT.target(e))) )
return Object_handle();
v = CT.target(e); current = VERTEX;
}
break;
}
// assert(0); return h; // compiler warning
}
// CGAL_error(); return h; // compiler warning
}
bool within_outer_cycle(Vertex_const_handle ,
bool within_outer_cycle(Vertex_const_handle ,
const Point& , const Tag_true& ) const {
return true;
}
bool within_outer_cycle(Vertex_const_handle v,
bool within_outer_cycle(Vertex_const_handle v,
const Point& q, const Tag_false& ) const {
typedef Project_halfedge_point<typename Decorator::Halfedge, Point> Project;
typedef Circulator_project<Halfedge_around_face_const_circulator,
typedef Circulator_project<Halfedge_around_face_const_circulator,
Project, const Point&, const Point*> Circulator;
typedef Container_from_circulator<Circulator> Container;
Halfedge_const_handle e_min = CT.twin(CT.first_out_edge(v));
Halfedge_around_face_const_circulator circ(e_min);
Circulator c(circ);
Container ct(c);
Container ct(c);
if(is_empty_range(ct.begin(), ct.end()) ||
bounded_side_2(ct.begin(), ct.end(),q) == CGAL::ON_UNBOUNDED_SIDE)
return false;
return true;
}
@ -898,14 +897,14 @@ PM_point_locator<PMD,GEO>::
CT.clear();
delete &(CT.plane_map());
#ifdef CGAL_USING_PPL
delete pPPL; pPPL=0;
delete pPPL; pPPL=0;
#endif
}
template <typename PMD, typename GEO>
typename PM_point_locator<PMD,GEO>::Object_handle
typename PM_point_locator<PMD,GEO>::Object_handle
PM_point_locator<PMD,GEO>::walk_in_triangulation(const Point& q) const
{
{
CGAL_NEF_TRACEN("walk in triangulation "<<q);
Vertex_const_handle v = CT.vertices_begin();
@ -922,9 +921,9 @@ PM_point_locator<PMD,GEO>::walk_in_triangulation(const Point& q) const
object_kind current = VERTEX;
while (true) switch ( current ) {
case VERTEX:
{
{
CGAL_NEF_TRACEN("vertex "<<CT.point(v));
if ( CT.point(v) == q )
if ( CT.point(v) == q )
return Object_handle(v); // stop walking at q
bool collinear;
Halfedge_const_handle e_out = CT.out_wedge(v,dir,collinear);
@ -942,13 +941,13 @@ PM_point_locator<PMD,GEO>::walk_in_triangulation(const Point& q) const
Vertex_const_handle v_cand = CT.target(CT.next(e));
int orientation_ = this->K.orientation(p,q,CT.point(v_cand));
switch( orientation_ ) {
case 0: // collinear
if ( this->K.strictly_ordered_along_line(p,q,CT.point(v_cand)) )
case 0: // collinear
if ( this->K.strictly_ordered_along_line(p,q,CT.point(v_cand)) )
return Object_handle(e);
v = v_cand; current = VERTEX; break;
case +1: // left_turn
e = twin(next(e)); current = EDGE_CROSSING; break;
case -1:
case -1:
e = twin(previous(e)); current = EDGE_CROSSING; break;
}
}
@ -957,7 +956,7 @@ PM_point_locator<PMD,GEO>::walk_in_triangulation(const Point& q) const
case EDGE_COLLINEAR:
{ CGAL_NEF_TRACEN("collinear edge "<<CT.segment(e));
if ( this->K.strictly_ordered_along_line(
CT.point(CT.source(e)),q,CT.point(CT.target(e))) )
CT.point(CT.source(e)),q,CT.point(CT.target(e))) )
return Object_handle(e);
v = CT.target(e); current = VERTEX;
}

View File

@ -350,7 +350,7 @@ public:
} // if (sit != nil)
assert(sit_pred);
CGAL_assertion(sit_pred);
GO.halfedge_below(v,Edge_of[sit_pred]);
if ( Isos_of[event] != 0 ) {
const IsoList& IL = *(Isos_of[event]);
@ -375,13 +375,13 @@ public:
sit = YS.insert_at(s_sit, next_seg, s_sit);
else
sit = YS.insert_at(s_sit, next_seg, CGAL_LEDA_SCOPE::seq_item(nil));
assert(YS.succ(sit)==s_sit);
CGAL_assertion(YS.succ(sit)==s_sit);
if ( YS.min_item() != p_sit &&
orientation(p_sit, source(next_seg) ) == 0 &&
orientation(p_sit, target(next_seg) ) == 0 )
YS.change_inf(p_sit, sit);
assert(YS.succ(p_sit)==sit);
CGAL_assertion(YS.succ(p_sit)==sit);
XS.insert(target(next_seg), sit);
GO.starting_segment(v,original(next_seg));
@ -404,7 +404,7 @@ public:
sit_first = YS.succ(sit_pred);
assert(sit_pred); assert(sit_pred_succ);
CGAL_assertion(sit_pred); CGAL_assertion(sit_pred_succ);
CGAL_LEDA_SCOPE::seq_item xit = YS.inf(sit_pred);
if ( xit ) {
ISegment s1 = YS.key(sit_pred);
@ -757,7 +757,7 @@ public:
} // if (sit != ss_iterator() )
assert( sit_pred != YS.end() );
CGAL_assertion( sit_pred != YS.end() );
GO.halfedge_below(v,sit_pred->second);
if ( event->second != 0 ) {
const IsoList& IL = *(event->second);

View File

@ -869,7 +869,7 @@ public:
void init_locator() const
{ const_cast<Self*>(this)->ptr()->init_locator(); }
const Locator& locator() const
{ assert(ptr()->pl_); return *(ptr()->pl_); }
{ CGAL_assertion(ptr()->pl_); return *(ptr()->pl_); }
bool contains(Object_handle h) const

View File

@ -128,7 +128,7 @@ class Ray_hit_generator : public Modifier_base<typename Nef_::SNC_and_PL> {
return v;
}
CGAL_assertion_msg(false, "ray should hit vertex, edge, or facet");
CGAL_error_msg( "ray should hit vertex, edge, or facet");
return Vertex_handle();
}

View File

@ -143,7 +143,7 @@ class Ray_hit_generator2 : public Modifier_base<typename Nef_::SNC_and_PL> {
return v;
}
CGAL_assertion_msg(false, "ray should hit vertex, edge, or facet");
CGAL_error_msg( "ray should hit vertex, edge, or facet");
return Vertex_handle();
}

View File

@ -106,7 +106,7 @@ class Reflex_edge_searcher : public Modifier_base<typename Nef_::SNC_structure>
void handle_new_edge(Halfedge_handle e) {
if(normalized(e->point()) == dir ||
normalized(e->twin()->point()) == dir) {
CGAL_assertion_msg(false, "should not happen");
CGAL_error_msg( "should not happen");
return;
}

View File

@ -101,7 +101,7 @@ class SNC_walls : public SNC_decorator<SNC_> {
SM_walls SW(new_vertex(ip),fh->mark());
SW.extend_vertex_by_inner_walls(vh, vi, Sphere_point(CGAL::ORIGIN-vec));
break;
default : CGAL_assertion_msg(false, "not implemented yet");
default : CGAL_error_msg( "not implemented yet");
}
return Vertex_handle();
}

View File

@ -154,7 +154,7 @@ class Single_wall_creator : public Modifier_base<typename Nef_::SNC_and_PL> {
"->" << sh1->twin()->source()->point() );
return false;
}
CGAL_assertion_msg(false, "should not happen on one side only");
CGAL_error_msg( "should not happen on one side only");
}
}

View File

@ -33,7 +33,7 @@ public:
case 0: return CGAL::compare_x(v1, v2) == SMALLER;
case 1: return CGAL::compare_y(v1, v2) == SMALLER;
case 2: return CGAL::compare_z(v1, v2) == SMALLER;
default: CGAL_assertion(false);
default: CGAL_error();
}
return false;
}
@ -57,7 +57,7 @@ public:
CGAL::to_interval(v2.y()).first;
case 2: return CGAL::to_interval(v1.z()).second <
CGAL::to_interval(v2.z()).first;
default: CGAL_assertion(false);
default: CGAL_error();
}
return false;
}

View File

@ -1146,7 +1146,7 @@ class Gausian_map :
return Object_handle(SVertex_const_handle(sfc->source()));
}
}
CGAL_assertion_msg(false,"line should not be executed");
CGAL_error_msg("line should not be executed");
return Object_handle();
}
@ -1189,7 +1189,7 @@ class Gausian_map :
return Object_handle(SVertex_const_handle(sfc->source()));
}
}
CGAL_assertion_msg(false,"line should not be executed");
CGAL_error_msg("line should not be executed");
return Object_handle();
}

Some files were not shown because too many files have changed in this diff Show More