mirror of https://github.com/CGAL/cgal
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:
parent
80f14be579
commit
fdeedcf8b0
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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() ->
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -440,7 +440,7 @@ operator >> (std::istream& is,
|
|||
break;
|
||||
}
|
||||
default:{
|
||||
CGAL_error("ALGEBRAIC_TYPE unexpected!" );
|
||||
CGAL_error_msg("ALGEBRAIC_TYPE unexpected!" );
|
||||
}
|
||||
}
|
||||
return is;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@
|
|||
#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 {
|
||||
|
||||
|
|
@ -35,7 +37,7 @@ namespace CGAL {
|
|||
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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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; }
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#ifndef CGAL_APPROX_MIN_ELL_CONFIGURE_H
|
||||
#define CGAL_APPROX_MIN_ELL_CONFIGURE_H
|
||||
|
||||
#include <cassert>
|
||||
#include <CGAL/basic.h>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
|
||||
|
|
@ -91,7 +91,7 @@
|
|||
//
|
||||
|
||||
#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)
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -511,7 +511,7 @@ public:
|
|||
case NO_BOUNDARY:
|
||||
default:
|
||||
// doesn't suppose to reach here at all.
|
||||
CGAL_assertion(false);
|
||||
CGAL_error();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -514,7 +514,7 @@ public:
|
|||
case NO_BOUNDARY:
|
||||
default:
|
||||
// doesn't suppose to reach here at all.
|
||||
CGAL_assertion(false);
|
||||
CGAL_error();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,9 +91,7 @@ public:
|
|||
#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;
|
||||
}
|
||||
};
|
||||
|
|
@ -129,9 +127,7 @@ void Arr_qdx_batched_pl_helper<Tr, Arr>::before_sweep ()
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
@ -158,9 +154,7 @@ void Arr_qdx_batched_pl_helper<Tr, Arr>::after_handle_event
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,9 +91,7 @@ public:
|
|||
#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;
|
||||
}
|
||||
};
|
||||
|
|
@ -129,9 +127,7 @@ void Arr_torus_batched_pl_helper<Tr, Arr>::before_sweep ()
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
@ -158,9 +154,7 @@ void Arr_torus_batched_pl_helper<Tr, Arr>::after_handle_event
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -547,7 +547,7 @@ protected:
|
|||
bool /* is_new */,
|
||||
Tag_false )
|
||||
{
|
||||
CGAL_assertion(false);
|
||||
CGAL_error();
|
||||
}
|
||||
|
||||
#ifdef VERBOSE
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -582,7 +582,7 @@ public:
|
|||
break;
|
||||
case NO_BOUNDARY:
|
||||
default:
|
||||
CGAL_assertion(false);
|
||||
CGAL_error();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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>, \
|
||||
|
|
|
|||
|
|
@ -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) );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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()),
|
||||
|
|
|
|||
|
|
@ -53,31 +53,31 @@ 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;
|
||||
}
|
||||
}
|
||||
|
|
@ -88,20 +88,20 @@ private:
|
|||
{
|
||||
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");
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -113,18 +113,18 @@ private:
|
|||
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);
|
||||
|
|
@ -137,18 +137,18 @@ private:
|
|||
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);
|
||||
|
|
@ -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;
|
||||
|
|
@ -232,14 +232,13 @@ read_entities(std::istream& is, Polygons& polys, Circles& circles)
|
|||
} 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;
|
||||
|
|
@ -271,14 +270,13 @@ read_entities(std::istream& is, Polygons& polys, Centers_and_radii& car)
|
|||
} 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:
|
||||
|
|
|
|||
|
|
@ -55,31 +55,31 @@ 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;
|
||||
}
|
||||
}
|
||||
|
|
@ -90,20 +90,20 @@ private:
|
|||
{
|
||||
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");
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -115,18 +115,18 @@ private:
|
|||
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);
|
||||
|
||||
|
|
@ -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;
|
||||
|
|
@ -210,14 +210,13 @@ read_entities(std::istream& is, Polygons& polys, Circles& circles)
|
|||
} 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");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,20 +57,30 @@ There are four types of checks.
|
|||
\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}}
|
||||
|
|
|
|||
|
|
@ -1049,7 +1049,7 @@ public:
|
|||
return SMALLER;
|
||||
}
|
||||
else
|
||||
CGAL_assertion(false);
|
||||
CGAL_error();
|
||||
|
||||
return EQUAL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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]));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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 ");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -118,7 +115,7 @@ void Geomview_stream::setup_geomview(const char *machine, const char *login)
|
|||
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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
#ifndef CGAL_INTERVAL_SKIP_LIST_INTERVAL_H
|
||||
#define CGAL_INTERVAL_SKIP_LIST_INTERVAL_H
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
|
||||
|
|
@ -88,11 +89,7 @@ namespace CGAL {
|
|||
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_) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -1150,8 +1150,7 @@ 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) {
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) ;
|
||||
|
|
|
|||
|
|
@ -750,7 +750,7 @@ private:
|
|||
return (*it).N;
|
||||
++it;
|
||||
}
|
||||
CGAL_assertion(false);
|
||||
CGAL_error();
|
||||
return Nef_polyhedron(); // kill warning.
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
@ -192,8 +192,7 @@ public:
|
|||
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
|
||||
|
|
@ -207,7 +206,7 @@ public:
|
|||
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.");
|
||||
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) {
|
||||
|
|
@ -286,7 +285,7 @@ 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));
|
||||
|
|
@ -640,7 +639,7 @@ public:
|
|||
}
|
||||
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& ,
|
||||
|
|
@ -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();
|
||||
|
|
@ -831,7 +830,7 @@ public:
|
|||
|
||||
break;
|
||||
}
|
||||
// assert(0); return h; // compiler warning
|
||||
// CGAL_error(); return h; // compiler warning
|
||||
}
|
||||
|
||||
bool within_outer_cycle(Vertex_const_handle ,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ class SM_walls : SM_decorator<SMap> {
|
|||
if(seg.has_on(c.orthogonal_vector()))
|
||||
return sh;
|
||||
}
|
||||
CGAL_assertion_msg(false, "should not be executed");
|
||||
CGAL_error_msg( "should not be executed");
|
||||
return SHalfedge_handle();
|
||||
}
|
||||
|
||||
|
|
@ -197,11 +197,11 @@ class SM_walls : SM_decorator<SMap> {
|
|||
|
||||
SHalfloop_handle sl;
|
||||
if(assign(sl, o))
|
||||
CGAL_assertion_msg(false, "not implemented yet");
|
||||
CGAL_error_msg( "not implemented yet");
|
||||
|
||||
SFace_handle sf;
|
||||
if(assign(sf, o))
|
||||
CGAL_assertion_msg(false, "wrong handle");
|
||||
CGAL_error_msg( "wrong handle");
|
||||
|
||||
CGAL_NEF_TRACEN("did not find anything");
|
||||
|
||||
|
|
@ -237,10 +237,10 @@ class SM_walls : SM_decorator<SMap> {
|
|||
|
||||
/*
|
||||
if(assign(se,o))
|
||||
CGAL_assertion_msg(false,"wrong handle");
|
||||
CGAL_error_msg("wrong handle");
|
||||
|
||||
if(assign(sl,o))
|
||||
CGAL_assertion_msg(false,"wrong handle");
|
||||
CGAL_error_msg("wrong handle");
|
||||
*/
|
||||
// CGAL_NEF_SETDTHREAD(1);
|
||||
return true;
|
||||
|
|
@ -273,9 +273,9 @@ class SM_walls : SM_decorator<SMap> {
|
|||
|
||||
SHalfloop_handle sl;
|
||||
if(assign(sl, o))
|
||||
CGAL_assertion_msg(false, "not implemented yet");
|
||||
CGAL_error_msg( "not implemented yet");
|
||||
|
||||
CGAL_assertion_msg(false, "wrong handle");
|
||||
CGAL_error_msg( "wrong handle");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -331,7 +331,7 @@ class SM_walls : SM_decorator<SMap> {
|
|||
return sv;
|
||||
}
|
||||
|
||||
CGAL_assertion_msg(false, "wrong handle");
|
||||
CGAL_error_msg( "wrong handle");
|
||||
return SVertex_handle();
|
||||
}
|
||||
|
||||
|
|
@ -409,7 +409,7 @@ class SM_walls : SM_decorator<SMap> {
|
|||
return sv;
|
||||
}
|
||||
|
||||
CGAL_assertion_msg(false, "wrong handle");
|
||||
CGAL_error_msg( "wrong handle");
|
||||
return SVertex_handle();
|
||||
}
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue