mirror of https://github.com/CGAL/cgal
Merge e1762f476d into 26a5fc70e4
This commit is contained in:
commit
7e3ae12e1b
|
|
@ -1252,9 +1252,7 @@ void Scene::cutting_plane(bool override)
|
|||
return;
|
||||
}
|
||||
|
||||
// Should not be here
|
||||
std::cerr << "Unknown cut_plane type" << std::endl;
|
||||
CGAL_assertion(false);
|
||||
CGAL_unreachable();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1665,13 +1665,8 @@ public:
|
|||
const Polynomial_2& f = ca1.polynomial_2();
|
||||
const Polynomial_2& g = ca2.polynomial_2();
|
||||
|
||||
if(f == g) {
|
||||
// both curves are equal, but have different representations!
|
||||
// std::cout <<"f: " << f <<std::endl;
|
||||
// std::cout <<"g: " << g <<std::endl;
|
||||
CGAL_assertion(false);
|
||||
return false;
|
||||
}
|
||||
CGAL_assertion_msg(f != g, "both curves are equal, but have different representations!");
|
||||
|
||||
Gcd_cache_2& gcd_cache = _m_kernel->gcd_cache_2();
|
||||
typedef typename Curve_analysis_2::size_type size_type;
|
||||
Polynomial_2 gcd = gcd_cache(std::make_pair(f,g));
|
||||
|
|
|
|||
|
|
@ -890,7 +890,7 @@ private:
|
|||
break;
|
||||
}
|
||||
default:{
|
||||
CGAL_assertion(false); // !!! Never reached
|
||||
CGAL_unreachable();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ public:
|
|||
exact_ = Exact_squared_radius()( to_exact(*data().p0),to_exact(*data().p1),to_exact(*data().p2) );
|
||||
break;
|
||||
default:
|
||||
CGAL_assertion(false);
|
||||
CGAL_unreachable();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -229,7 +229,7 @@ public:
|
|||
approx_ = Approx_squared_radius()( to_approx(*data().p0),to_approx(*data().p1),to_approx(*data().p2) );
|
||||
break;
|
||||
default:
|
||||
CGAL_assertion(false);
|
||||
CGAL_unreachable();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ public:
|
|||
exact_ = Exact_squared_radius()( to_exact(*data().p0),to_exact(*data().p1),to_exact(*data().p2),to_exact(*data().p3) );
|
||||
break;
|
||||
default:
|
||||
CGAL_assertion(false);
|
||||
CGAL_unreachable();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -224,7 +224,7 @@ public:
|
|||
approx_ = Approx_squared_radius()( to_approx(*data().p0),to_approx(*data().p1),to_approx(*data().p2),to_approx(*data().p3) );
|
||||
break;
|
||||
default:
|
||||
CGAL_assertion(false);
|
||||
CGAL_unreachable();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -605,10 +605,9 @@ public:
|
|||
case CGAL_TD_VERTEX:
|
||||
return TD_VERTEX;
|
||||
default:
|
||||
CGAL_assertion(false);
|
||||
return TD_TRAPEZOID;
|
||||
}
|
||||
CGAL_unreachable();
|
||||
}
|
||||
}
|
||||
|
||||
/*! Access trapezoid type flag. */
|
||||
CGAL_TD_INLINE unsigned char type_flag() const
|
||||
|
|
|
|||
|
|
@ -80,13 +80,6 @@ bool is_index_map_valid(const CGAL::internal_np::face_index_t, FaceIndexProperty
|
|||
return is_index_map_valid(face_index_map, num_faces(g), faces(g));
|
||||
}
|
||||
|
||||
template <typename PropertyTag, typename IndexPropertyMap, typename Graph>
|
||||
void initialize_index_map(const PropertyTag, IndexPropertyMap, const Graph&)
|
||||
{
|
||||
// Unknown parameter; should never be here.
|
||||
CGAL_assertion(false);
|
||||
}
|
||||
|
||||
template <typename IndexPropertyMap,
|
||||
typename Graph,
|
||||
bool is_writable = CGAL::internal::Is_writable_property_map<IndexPropertyMap>::value>
|
||||
|
|
@ -120,12 +113,6 @@ struct Index_map_initializer
|
|||
put(face_index_map, fd, i++);
|
||||
}
|
||||
|
||||
template <typename PropertyTag>
|
||||
void operator()(const PropertyTag, IndexPropertyMap, const Graph&)
|
||||
{
|
||||
// Unknown parameter; should never be here.
|
||||
CGAL_assertion(false);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename IndexPropertyMap, typename Graph>
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public:
|
|||
// https://github.com/boostorg/core/issues/148
|
||||
Image(const Image&)
|
||||
{
|
||||
CGAL_assertion(false);
|
||||
CGAL_unreachable();
|
||||
}
|
||||
|
||||
Image () : m_width(0), m_height(0), m_depth(0)
|
||||
|
|
|
|||
|
|
@ -169,13 +169,8 @@ namespace CGAL {
|
|||
{
|
||||
// Allocate a dart for null_dart_descriptor
|
||||
CGAL_assertion(mdarts.empty()); // the compact container is empty
|
||||
Dart_index local_null_dart_descriptor = mdarts.emplace();
|
||||
if(local_null_dart_descriptor!=0)
|
||||
{
|
||||
std::cerr<<"[ERROR] fatal in Combinatorial_map_storage_with_index::init_storage"
|
||||
<<std::endl;
|
||||
CGAL_assertion(false);
|
||||
}
|
||||
CGAL_assertion_code( Dart_index local_null_dart_descriptor = ) mdarts.emplace();
|
||||
CGAL_assertion_msg(local_null_dart_descriptor ==0, "[ERROR] fatal in Combinatorial_map_storage_with_index::init_storage");
|
||||
}
|
||||
|
||||
void clear_storage()
|
||||
|
|
|
|||
|
|
@ -91,10 +91,8 @@ public:
|
|||
DirectionOutputIterator operator()(const unsigned int cone_number,
|
||||
const Direction_2& initial_direction,
|
||||
DirectionOutputIterator result) {
|
||||
if (cone_number<2) {
|
||||
std::cout << "The number of cones must be larger than 1!" << std::endl;
|
||||
CGAL_assertion(false);
|
||||
}
|
||||
|
||||
CGAL_assertion_msg(cone_number>1, "The number of cones must be larger than 1");
|
||||
|
||||
*result++ = initial_direction;
|
||||
|
||||
|
|
|
|||
|
|
@ -99,10 +99,7 @@ public:
|
|||
): cone_number(k), cones_choice(cones_selected), rays(std::vector<Direction_2>(k))
|
||||
|
||||
{
|
||||
if (k<2) {
|
||||
std::cout << "The number of cones must be larger than 1!" << std::endl;
|
||||
CGAL_assertion(false);
|
||||
}
|
||||
CGAL_assertion_msg(k>1, "The number of cones must be larger than 1");
|
||||
|
||||
/* Initialize a functor, specialization will happen here depending on the kernel type to
|
||||
compute the cone boundaries either exactly or inexactly */
|
||||
|
|
|
|||
|
|
@ -93,10 +93,7 @@ public:
|
|||
): cone_number(k), cones_choice(cones_selected), rays(std::vector<Direction_2>(k))
|
||||
|
||||
{
|
||||
if (k<2) {
|
||||
std::cout << "The number of cones must be larger than 1!" << std::endl;
|
||||
CGAL_assertion(false);
|
||||
}
|
||||
CGAL_assertion_msg(k>1, "The number of cones must be larger than 1");
|
||||
|
||||
/* Initialize a functor, specialization will happen here depending on the kernel type to
|
||||
compute the cone boundaries either exactly or inexactly */
|
||||
|
|
|
|||
|
|
@ -876,7 +876,6 @@ Aff_transformation_repH2<R>::homogeneous(int i, int j) const
|
|||
}
|
||||
}
|
||||
CGAL_unreachable();
|
||||
return RT(0);
|
||||
}
|
||||
|
||||
template < class R >
|
||||
|
|
@ -920,7 +919,6 @@ Translation_repH2<R>::homogeneous(int i, int j) const
|
|||
}
|
||||
}
|
||||
CGAL_unreachable();
|
||||
return RT(0);
|
||||
}
|
||||
|
||||
template < class R >
|
||||
|
|
@ -955,7 +953,6 @@ Translation_repH2<R>::cartesian(int i, int j) const
|
|||
}
|
||||
}
|
||||
CGAL_unreachable();
|
||||
return FT(0);
|
||||
}
|
||||
|
||||
template < class R >
|
||||
|
|
@ -991,7 +988,6 @@ homogeneous(int i, int j) const
|
|||
}
|
||||
}
|
||||
CGAL_unreachable();
|
||||
return RT(0);
|
||||
}
|
||||
|
||||
template < class R >
|
||||
|
|
@ -1027,7 +1023,6 @@ cartesian(int i, int j) const
|
|||
}
|
||||
}
|
||||
CGAL_unreachable();
|
||||
return FT(0);
|
||||
}
|
||||
|
||||
template < class R >
|
||||
|
|
@ -1063,7 +1058,6 @@ homogeneous(int i, int j) const
|
|||
}
|
||||
}
|
||||
CGAL_unreachable();
|
||||
return RT(0);
|
||||
}
|
||||
|
||||
template <class R>
|
||||
|
|
@ -1099,7 +1093,6 @@ cartesian(int i, int j) const
|
|||
}
|
||||
}
|
||||
CGAL_unreachable();
|
||||
return FT(0);
|
||||
}
|
||||
|
||||
template < class R >
|
||||
|
|
@ -1136,7 +1129,6 @@ homogeneous(int i, int j) const
|
|||
}
|
||||
}
|
||||
CGAL_unreachable();
|
||||
return RT(0);
|
||||
}
|
||||
|
||||
template <class R>
|
||||
|
|
@ -1173,7 +1165,6 @@ cartesian(int i, int j) const
|
|||
}
|
||||
}
|
||||
CGAL_unreachable();
|
||||
return FT(0);
|
||||
}
|
||||
|
||||
} //namespace CGAL
|
||||
|
|
|
|||
|
|
@ -737,7 +737,6 @@ homogeneous(int i, int j) const
|
|||
}
|
||||
}
|
||||
CGAL_unreachable();
|
||||
return RT0;
|
||||
}
|
||||
|
||||
template < class R >
|
||||
|
|
@ -895,7 +894,6 @@ Translation_repH3<R>::homogeneous(int i, int j) const
|
|||
}
|
||||
}
|
||||
CGAL_unreachable();
|
||||
return RT0;
|
||||
}
|
||||
|
||||
template < class R >
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
#include <CGAL/Segment_2.h>
|
||||
#include <CGAL/Point_2.h>
|
||||
#include <CGAL/kernel_assertions.h>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <CGAL/number_utils.h>
|
||||
#include <CGAL/Intersections_2/Line_2_Line_2.h>
|
||||
#include <CGAL/Intersection_traits_2.h>
|
||||
|
|
@ -185,8 +186,7 @@ Ray_2_Ray_2_pair<K>::intersection_type() const
|
|||
}
|
||||
}
|
||||
default:
|
||||
CGAL_kernel_assertion(false); // should not be reached:
|
||||
return _result;
|
||||
CGAL_unreachable();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
#include <CGAL/Point_2.h>
|
||||
#include <CGAL/Line_2.h>
|
||||
#include <CGAL/kernel_assertions.h>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <CGAL/number_utils.h>
|
||||
#include <CGAL/Intersections_2/Line_2_Line_2.h>
|
||||
#include <CGAL/Intersection_traits_2.h>
|
||||
|
|
@ -203,8 +204,7 @@ Ray_2_Segment_2_pair<K>::intersection_type() const
|
|||
}
|
||||
}
|
||||
default:
|
||||
CGAL_kernel_assertion(false); // should not be reached:
|
||||
return _result;
|
||||
CGAL_unreachable();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#include <CGAL/Segment_2.h>
|
||||
#include <CGAL/Point_2.h>
|
||||
#include <CGAL/kernel_assertions.h>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <CGAL/number_utils.h>
|
||||
#include <CGAL/predicates_on_points_2.h>
|
||||
#include <CGAL/Line_2.h>
|
||||
|
|
@ -141,8 +142,7 @@ seg_seg_do_intersect_crossing(
|
|||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
CGAL_kernel_assertion(false);
|
||||
return S2S2_inter_info(false);
|
||||
CGAL_unreachable();
|
||||
}
|
||||
|
||||
// used internally by Arr_segment_traits_2template <class K>
|
||||
|
|
@ -202,8 +202,7 @@ seg_seg_do_intersect_contained(
|
|||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
CGAL_kernel_assertion(false);
|
||||
return S2S2_inter_info(false);
|
||||
CGAL_unreachable();
|
||||
}
|
||||
|
||||
// used internally by Arr_segment_traits_2
|
||||
|
|
@ -319,8 +318,7 @@ do_intersect_with_info(const typename K::Segment_2 &seg1,
|
|||
CGAL_unreachable();
|
||||
}
|
||||
|
||||
CGAL_kernel_assertion(false);
|
||||
return S2S2_inter_info(false);
|
||||
CGAL_unreachable();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
#include <CGAL/enum.h>
|
||||
#include <CGAL/kernel_assertions.h>
|
||||
#include <CGAL/assertions.h>
|
||||
|
||||
namespace CGAL {
|
||||
namespace Intersections {
|
||||
|
|
@ -57,13 +58,11 @@ do_intersect(const typename K::Triangle_3& t,
|
|||
case POSITIVE: return (orientation(p,q,c,a) != NEGATIVE);
|
||||
case NEGATIVE: return (orientation(p,q,c,a) != POSITIVE);
|
||||
case COPLANAR: return true;
|
||||
default: // should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return false;
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
default: // should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return false;
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
#include <CGAL/enum.h>
|
||||
#include <CGAL/kernel_assertions.h>
|
||||
#include <CGAL/assertions.h>
|
||||
|
||||
namespace CGAL {
|
||||
namespace Intersections {
|
||||
|
|
@ -43,8 +44,7 @@ do_intersect(const typename K::Triangle_3& t,
|
|||
case ON_ORIENTED_BOUNDARY:
|
||||
return true;
|
||||
default:// should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return false;
|
||||
CGAL_unreachable();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
#include <CGAL/enum.h>
|
||||
#include <CGAL/kernel_assertions.h>
|
||||
#include <CGAL/assertions.h>
|
||||
|
||||
namespace CGAL {
|
||||
namespace Intersections {
|
||||
|
|
@ -59,12 +60,10 @@ do_intersect(const typename K::Triangle_3& t,
|
|||
return (coplanar_orientation(c,a,p) != POSITIVE);
|
||||
case COLLINEAR: return true;
|
||||
default: // should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return false;
|
||||
CGAL_unreachable();
|
||||
}
|
||||
default: // should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return false;
|
||||
CGAL_unreachable();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
#include <CGAL/enum.h>
|
||||
#include <CGAL/kernel_assertions.h>
|
||||
#include <CGAL/assertions.h>
|
||||
|
||||
namespace CGAL {
|
||||
namespace Intersections {
|
||||
|
|
@ -139,9 +140,8 @@ do_intersect_coplanar(const typename K::Triangle_3& t,
|
|||
// a is isolated on the positive side
|
||||
return visitor.result(coplanar_orientation(*a,*c,p) != POSITIVE);
|
||||
|
||||
default: // should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return visitor.result(false);
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
|
||||
case NEGATIVE:
|
||||
|
|
@ -165,9 +165,8 @@ do_intersect_coplanar(const typename K::Triangle_3& t,
|
|||
// a is isolated on the negative side
|
||||
return visitor.result(coplanar_orientation(*b,*a,p) != POSITIVE);
|
||||
|
||||
default: // should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return visitor.result(false);
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
|
||||
case COLLINEAR:
|
||||
|
|
@ -190,14 +189,12 @@ do_intersect_coplanar(const typename K::Triangle_3& t,
|
|||
return visitor.result(coplanar_orientation(*a,*c,p) != POSITIVE);
|
||||
// case pqc == COLLINEAR is imposiible
|
||||
|
||||
default: // should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return visitor.result(false);
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
|
||||
default: // should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return visitor.result(false);
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -262,9 +259,8 @@ do_intersect(const typename K::Triangle_3& t,
|
|||
return visitor.result(true);
|
||||
}
|
||||
// case COPLANAR: should not happen
|
||||
default: // should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return visitor.result(false);
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
|
||||
case NEGATIVE:
|
||||
|
|
@ -292,9 +288,8 @@ do_intersect(const typename K::Triangle_3& t,
|
|||
|
||||
// case COPLANAR: should not happen
|
||||
|
||||
default: // should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return visitor.result(false);
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
|
||||
case COPLANAR: // p belongs to the triangle's supporting plane
|
||||
|
|
@ -316,14 +311,12 @@ do_intersect(const typename K::Triangle_3& t,
|
|||
|
||||
// case COPLANAR: should not happen
|
||||
|
||||
default: // should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return visitor.result(false);
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
|
||||
default: // should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return visitor.result(false);
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#include <CGAL/enum.h>
|
||||
#include <CGAL/kernel_assertions.h>
|
||||
|
||||
#include <CGAL/assertions.h>
|
||||
namespace CGAL {
|
||||
namespace Intersections {
|
||||
namespace internal {
|
||||
|
|
@ -79,9 +79,8 @@ bool do_intersect_coplanar(const typename K::Point_3& A,
|
|||
// a is isolated on the positive side
|
||||
return coplanar_orientation(*a,*b,q) != NEGATIVE
|
||||
&& coplanar_orientation(*c,*a,p) != NEGATIVE;
|
||||
default:// should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return false;
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
case NEGATIVE:
|
||||
switch ( pqb ) {
|
||||
|
|
@ -109,9 +108,8 @@ bool do_intersect_coplanar(const typename K::Point_3& A,
|
|||
return coplanar_orientation(*a,*b,p) != NEGATIVE
|
||||
&& coplanar_orientation(*c,*a,q) != NEGATIVE;
|
||||
|
||||
default:// should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return false;
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
case COLLINEAR:
|
||||
switch ( pqb ) {
|
||||
|
|
@ -139,14 +137,11 @@ bool do_intersect_coplanar(const typename K::Point_3& A,
|
|||
// case pqc == COLLINEAR is impossible since the triangle is
|
||||
// assumed to be non flat
|
||||
|
||||
default:// should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return false;
|
||||
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
default:// should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return false;
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -215,9 +210,8 @@ do_intersect(const typename K::Triangle_3& t,
|
|||
return orientation(p,q,a,b) != POSITIVE
|
||||
&& orientation(p,q,b,c) != POSITIVE
|
||||
&& orientation(p,q,c,a) != POSITIVE;
|
||||
default: // should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return false;
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
case NEGATIVE:
|
||||
switch ( abcq ) {
|
||||
|
|
@ -237,9 +231,8 @@ do_intersect(const typename K::Triangle_3& t,
|
|||
&& orientation(q,p,b,c) != POSITIVE
|
||||
&& orientation(q,p,c,a) != POSITIVE;
|
||||
|
||||
default: // should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return false;
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
case COPLANAR: // p belongs to the triangle's supporting plane
|
||||
switch ( abcq ) {
|
||||
|
|
@ -259,13 +252,11 @@ do_intersect(const typename K::Triangle_3& t,
|
|||
// supporting plane
|
||||
return do_intersect_coplanar(t,s,k);
|
||||
|
||||
default: // should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return false;
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
default: // should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return false;
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
#include <CGAL/enum.h>
|
||||
#include <CGAL/kernel_assertions.h>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <CGAL/Uncertain.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
|
@ -304,21 +305,18 @@ do_intersect(const typename K::Triangle_3& t1,
|
|||
|
||||
case COPLANAR:
|
||||
return do_intersect_coplanar(t1,t2,k);
|
||||
default: // should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return false;
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
break;
|
||||
|
||||
default: // should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return false;
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
break;
|
||||
|
||||
default: // should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return false;
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
|
||||
const Point_3* s_min2;
|
||||
|
|
@ -429,21 +427,18 @@ do_intersect(const typename K::Triangle_3& t1,
|
|||
// since the triangles are assumed to be non-flat
|
||||
|
||||
return do_intersect_coplanar(t1,t2,k);
|
||||
default: // should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return false;
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
break;
|
||||
|
||||
default: // should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return false;
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
break;
|
||||
|
||||
default: // should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return false;
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
|
||||
return (orientation(*s_min1,*t_min1,*s_min2,*t_min2) != POSITIVE) &&
|
||||
|
|
|
|||
|
|
@ -418,8 +418,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
CGAL_assertion(false);
|
||||
return false;
|
||||
CGAL_unreachable();
|
||||
}
|
||||
|
||||
IVertex non_collinear_vertex(const PFace& pface, const IEdge& iedge) const {
|
||||
|
|
|
|||
|
|
@ -728,7 +728,7 @@ end()
|
|||
endPolygonMesh(transform_matrix);
|
||||
break;
|
||||
default:
|
||||
CGAL_assertion(false);
|
||||
CGAL_unreachable();
|
||||
}
|
||||
|
||||
dockWidget->hide();
|
||||
|
|
|
|||
|
|
@ -379,11 +379,6 @@ public Q_SLOTS:
|
|||
selection_item->poly_item_changed();
|
||||
selection_item->changed_with_poly_item();
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "Something's gone wrong.\n";
|
||||
CGAL_assertion(false);
|
||||
}
|
||||
|
||||
QApplication::restoreOverrideCursor();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -190,13 +190,9 @@ namespace CGAL {
|
|||
{
|
||||
// Allocate a dart for null_dart_descriptor
|
||||
CGAL_assertion(mdarts.empty()); // the compact container is empty
|
||||
Dart_index local_null_dart_descriptor = mdarts.emplace();
|
||||
if(local_null_dart_descriptor!=0)
|
||||
{
|
||||
std::cerr<<"[ERROR] fatal in CMap_linear_cell_complex_storage_with_index::init_storage"
|
||||
<<std::endl;
|
||||
CGAL_assertion(false);
|
||||
}
|
||||
CGAL_assertion_code( Dart_index local_null_dart_descriptor = ) mdarts.emplace();
|
||||
CGAL_assertion_msg(local_null_dart_descriptor==0,
|
||||
"[ERROR] fatal in CMap_linear_cell_complex_storage_with_index::init_storage");
|
||||
}
|
||||
|
||||
void clear_storage()
|
||||
|
|
|
|||
|
|
@ -73,10 +73,8 @@ public:
|
|||
}
|
||||
|
||||
|
||||
Intrusive_list(const Intrusive_list& )
|
||||
{
|
||||
CGAL_assertion(false);
|
||||
}
|
||||
Intrusive_list(const Intrusive_list& ) = delete;
|
||||
|
||||
|
||||
#ifdef CGAL_CONSTRUCT_INTRUSIVE_LIST_RANGE_CONSTRUCTOR
|
||||
template <typename IT>
|
||||
|
|
|
|||
|
|
@ -100,9 +100,7 @@ public:
|
|||
break;
|
||||
default:
|
||||
// Should not happen
|
||||
CGAL_assertion(false);
|
||||
return CGAL::NULL_VECTOR;
|
||||
break;
|
||||
CGAL_unreachable();
|
||||
}
|
||||
|
||||
return CGAL::NULL_VECTOR;
|
||||
|
|
|
|||
|
|
@ -387,9 +387,8 @@ ts_intersection(const typename K::Triangle_3 &t,
|
|||
// Mesh_3, because if the intersection is not a point, it is
|
||||
// ignored anyway.
|
||||
return result_type();
|
||||
default: // should not happen.
|
||||
CGAL_kernel_assertion(false);
|
||||
return result_type();
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -976,12 +976,7 @@ Mesh_domain_with_polyline_features_3<MD_>::
|
|||
point_corner_index(const Point_3& p) const
|
||||
{
|
||||
typename Corners::const_iterator p_index_it = corners_.find(p);
|
||||
if ( p_index_it == corners_.end() )
|
||||
{
|
||||
CGAL_assertion(false);
|
||||
return Index();
|
||||
}
|
||||
|
||||
CGAL_assertion( p_index_it != corners_.end());
|
||||
return p_index_it->second;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -169,6 +169,7 @@ void optimize_along_OBB_axes(typename Traits::Matrix& rot,
|
|||
|
||||
auto it = std::min_element(volumes.begin(), volumes.end());
|
||||
typename std::iterator_traits<decltype(it)>::difference_type d = std::distance(volumes.begin(), it);
|
||||
CGAL_assertion(d == 0 || d == 1 || d == 2);
|
||||
|
||||
#ifdef CGAL_OPTIMAL_BOUNDING_BOX_DEBUG_PP
|
||||
std::cout << "volumes: " << volumes[0] << " " << volumes[1] << " " << volumes[2] << std::endl;
|
||||
|
|
@ -212,10 +213,6 @@ void optimize_along_OBB_axes(typename Traits::Matrix& rot,
|
|||
|
||||
rot = opt * rot;
|
||||
}
|
||||
else
|
||||
{
|
||||
CGAL_assertion(false);
|
||||
}
|
||||
}
|
||||
|
||||
// This operation makes no sense if an exact number type is used, so skip it, if so
|
||||
|
|
|
|||
|
|
@ -1137,11 +1137,7 @@ private:
|
|||
}
|
||||
while(circ != done);
|
||||
|
||||
if(voronoi_points.size() < 3)
|
||||
{
|
||||
CGAL_assertion(false);
|
||||
return 0.0;
|
||||
}
|
||||
CGAL_assertion(! (voronoi_points.size() < 3));
|
||||
|
||||
// sum up areas
|
||||
FT area = 0.0;
|
||||
|
|
|
|||
|
|
@ -126,9 +126,8 @@ intersection_type(
|
|||
// p sees the triangle in counterclockwise order
|
||||
return find_intersection(p,q,a,b,c,h_2,tm2,false,true);
|
||||
|
||||
default: // should not happen.
|
||||
CGAL_assertion(false);
|
||||
return result_type(EMPTY,GT::null_halfedge(),false,false);
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
case NEGATIVE:
|
||||
switch ( abcq ) {
|
||||
|
|
@ -143,9 +142,8 @@ intersection_type(
|
|||
// q belongs to the triangle's supporting plane
|
||||
// p sees the triangle in clockwise order
|
||||
return find_intersection(q,p,a,b,c,h_2,tm2,false,true);
|
||||
default: // should not happen.
|
||||
CGAL_assertion(false);
|
||||
return result_type(EMPTY,GT::null_halfedge(),false,false);
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
case COPLANAR: // p belongs to the triangle's supporting plane
|
||||
switch ( abcq ) {
|
||||
|
|
@ -163,13 +161,11 @@ intersection_type(
|
|||
return result_type(COPLANAR_TRIANGLES,GT::null_halfedge(),true,true);
|
||||
return result_type(EMPTY,GT::null_halfedge(),true,true);
|
||||
|
||||
default: // should not happen.
|
||||
CGAL_assertion(false);
|
||||
return result_type(EMPTY,GT::null_halfedge(),false,false);
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
default: // should not happen.
|
||||
CGAL_assertion(false);
|
||||
return result_type(EMPTY,GT::null_halfedge(),false,false);
|
||||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1961,7 +1961,7 @@ private:
|
|||
else if(is_on_mesh(h)) nb_mesh++;
|
||||
else if(is_on_border(h)) nb_border++;
|
||||
else if(is_an_isolated_constraint(h)) nb_isolated++;
|
||||
else CGAL_assertion(false);
|
||||
else CGAL_unreachable();
|
||||
}
|
||||
CGAL_USE(nb_border);
|
||||
CGAL_USE(nb_mesh);
|
||||
|
|
|
|||
|
|
@ -641,9 +641,7 @@ public:
|
|||
CGAL_SDG_DEBUG(std::cout << "ON_BOUNDED_SIDE" << std::endl;);
|
||||
return ON_BOUNDED_SIDE;
|
||||
default:
|
||||
CGAL_SDG_DEBUG(std::cout << "error: should never reach here";);
|
||||
CGAL_assertion( false );
|
||||
return ON_BOUNDARY;
|
||||
CGAL_unreachable();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -780,7 +780,7 @@ private:
|
|||
|
||||
// philaris: execution should never reach here
|
||||
// philaris: code added to avoid warnings on some compilers
|
||||
CGAL_assertion( false );
|
||||
CGAL_assertion(false);
|
||||
return ZERO;
|
||||
|
||||
} // end of case where segment is neither horizontal nor vertical
|
||||
|
|
@ -877,7 +877,7 @@ private:
|
|||
otherpnt = seg.source();
|
||||
} else {
|
||||
// unreachable
|
||||
CGAL_assertion( false );
|
||||
CGAL_assertion(false);
|
||||
}
|
||||
|
||||
lhor = compute_horizontal_side_line(
|
||||
|
|
@ -1138,7 +1138,7 @@ private:
|
|||
otherpnt = seg.source();
|
||||
} else {
|
||||
// unreachable
|
||||
CGAL_assertion( false );
|
||||
CGAL_assertion(false);
|
||||
}
|
||||
|
||||
lhor = compute_horizontal_side_line(
|
||||
|
|
|
|||
|
|
@ -592,8 +592,8 @@ private:
|
|||
const unsigned int bq = bearing(lq);
|
||||
const unsigned int br = bearing(lr);
|
||||
const unsigned int bdiff = bearing_diff(bq, br);
|
||||
CGAL_assertion( bdiff != 0 );
|
||||
CGAL_assertion( bdiff != 7 );
|
||||
CGAL_assertion( bdiff > 0 );
|
||||
CGAL_assertion( bdiff < 7 );
|
||||
|
||||
if (bdiff == 1) {
|
||||
compute_pss_corner_and_pt(p, q, r, lq, lr, bq, br);
|
||||
|
|
@ -605,8 +605,6 @@ private:
|
|||
compute_pss_side_p_known(p, q, r, lq, lr, bq, br);
|
||||
} else if (bdiff == 6) {
|
||||
compute_pss_lines_side(p, lq, lr, (br+1)%8);
|
||||
} else {
|
||||
CGAL_assertion( false );
|
||||
}
|
||||
CGAL_assertion_code( is_v_computed = true );
|
||||
CGAL_assertion( oriented_side_of_line(lq, this->point()) != ZERO );
|
||||
|
|
|
|||
|
|
@ -1106,8 +1106,7 @@ private:
|
|||
const Bearing bq = bearing(lq);
|
||||
const Bearing br = bearing(lr);
|
||||
const Bearing bdiff = bearing_diff(bq, br);
|
||||
CGAL_assertion( bdiff != 0 );
|
||||
CGAL_assertion( bdiff != 7 );
|
||||
CGAL_assertion( bdiff > 0 && bdiff < 7 );
|
||||
|
||||
if (bdiff == 1) {
|
||||
compute_pss_corner_and_pt(p, lq, lr, bq, br);
|
||||
|
|
@ -1119,9 +1118,8 @@ private:
|
|||
compute_pss_side_p_known(p, q, r, lq, lr, bq, br);
|
||||
} else if (bdiff == 6) {
|
||||
compute_pss_lines_side(p, lq, lr, (br+1)%8);
|
||||
} else {
|
||||
CGAL_assertion( false );
|
||||
}
|
||||
|
||||
CGAL_assertion( oriented_side_of_line(lq, this->point()) != ZERO );
|
||||
CGAL_assertion( oriented_side_of_line(lr, this->point()) != ZERO );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ public:
|
|||
case TRISEGMENT_COLLINEARITY_02:
|
||||
return e(2);
|
||||
default:
|
||||
CGAL_assertion(false);
|
||||
CGAL_unreachable();
|
||||
return e(0); // arbitrary, meaningless value because a const& is expected
|
||||
}
|
||||
}
|
||||
|
|
@ -166,8 +166,7 @@ public:
|
|||
case TRISEGMENT_COLLINEARITY_02:
|
||||
return w(2);
|
||||
default:
|
||||
CGAL_assertion(false);
|
||||
return w(0); // arbitrary, meaningless value because a const& is expected
|
||||
CGAL_unreachable();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -556,6 +556,7 @@ public:
|
|||
erase_control_vertex(vd); // also erase from being control
|
||||
|
||||
typename std::vector<vertex_descriptor>::iterator it = std::find(roi.begin(), roi.end(), vd);
|
||||
CGAL_assertion_msg(it != roi.end(), "inconsistency between is_roi_map, and roi vector");
|
||||
if(it != roi.end())
|
||||
{
|
||||
is_roi_map[id(vd)] = false;
|
||||
|
|
@ -564,8 +565,6 @@ public:
|
|||
need_preprocess_both();
|
||||
return true;
|
||||
}
|
||||
|
||||
CGAL_assertion(false); // inconsistency between is_roi_map, and roi vector!
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ public:
|
|||
V1_max = zmax;
|
||||
break;
|
||||
default:
|
||||
CGAL_assertion(false);
|
||||
CGAL_unreachable();
|
||||
}
|
||||
switch (second_longest_axis)
|
||||
{
|
||||
|
|
@ -225,7 +225,7 @@ public:
|
|||
V2_max = zmax;
|
||||
break;
|
||||
default:
|
||||
CGAL_assertion(false);
|
||||
CGAL_unreachable();
|
||||
}
|
||||
|
||||
// Project onto longest bounding box axes,
|
||||
|
|
|
|||
|
|
@ -122,8 +122,7 @@ void find_start_cone(const ConeMap& cmap,
|
|||
return;
|
||||
}
|
||||
|
||||
std::cerr << "Error: did not find first cone" << std::endl;
|
||||
CGAL_postcondition(false);
|
||||
CGAL_postcondition_msg(false,"Error: did not find first cone");
|
||||
}
|
||||
|
||||
// Locate the cone tagged 'First_unique_cone' in the seam mesh.
|
||||
|
|
@ -143,8 +142,7 @@ void find_start_cone(const ConeMap& cmap,
|
|||
return;
|
||||
}
|
||||
|
||||
std::cerr << "Error: did not find first cone" << std::endl;
|
||||
CGAL_postcondition(false);
|
||||
CGAL_postcondition_msg(false,"Error: did not find first cone");
|
||||
}
|
||||
|
||||
/// Check the validity of the input cones in the `Seam_mesh` mesh.
|
||||
|
|
|
|||
|
|
@ -35,17 +35,8 @@ namespace internal {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Get_beta
|
||||
template<typename HEG, unsigned int i>
|
||||
struct Get_beta
|
||||
{
|
||||
typedef typename boost::graph_traits<HEG>::halfedge_descriptor Dart_const_descriptor;
|
||||
struct Get_beta;
|
||||
|
||||
static Dart_const_descriptor value(const HEG& /*heg*/, Dart_const_descriptor /*dh*/)
|
||||
{
|
||||
std::cout<<"ERROR Get_beta<HEG, "<<i<<">"<<std::endl;
|
||||
CGAL_assertion(false);
|
||||
return nullptr;
|
||||
}
|
||||
};
|
||||
template<typename HEG>
|
||||
struct Get_beta<HEG, 0>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1118,8 +1118,8 @@ insert_dim_up(Vertex_handle w, bool orient)
|
|||
}
|
||||
break;
|
||||
default:
|
||||
CGAL_assertion(false);
|
||||
break; }
|
||||
CGAL_unreachable();
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -880,13 +880,9 @@ std::size_t smooth_vertices_on_surfaces(C3t3& c3t3,
|
|||
{
|
||||
const auto intersection = proj.value().first;
|
||||
using Segment = typename Tr::Geom_traits::Segment_3;
|
||||
if (const Segment* s = std::get_if<Segment>(&intersection))
|
||||
return CGAL::midpoint(s->source(), s->target());
|
||||
else
|
||||
{
|
||||
CGAL_assertion(false);
|
||||
return std::nullopt;
|
||||
}
|
||||
const Segment* s = std::get_if<Segment>(&intersection);
|
||||
CGAL_assertion(s != nullptr);
|
||||
return CGAL::midpoint(s->source(), s->target());
|
||||
};
|
||||
|
||||
const auto n = vertices_normals.at(v).at(si);
|
||||
|
|
|
|||
|
|
@ -844,7 +844,7 @@ void set_index(typename C3t3::Vertex_handle v, const C3t3& c3t3)
|
|||
case -1://far points from concurrent Mesh_3
|
||||
break;
|
||||
default:
|
||||
CGAL_assertion(false);
|
||||
CGAL_unreachable();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -496,8 +496,7 @@ public:
|
|||
pit = propagate_conflicts(p,fh,2,pit);
|
||||
return pit;
|
||||
}
|
||||
CGAL_assertion(false);
|
||||
return std::make_pair(fit,eit);
|
||||
CGAL_unreachable();
|
||||
}
|
||||
|
||||
template <class OutputItFaces>
|
||||
|
|
|
|||
|
|
@ -417,8 +417,7 @@ public:
|
|||
pit = propagate_conflicts(p,fh,2,pit);
|
||||
return pit;
|
||||
}
|
||||
CGAL_assertion(false);
|
||||
return std::make_pair(fit,eit);
|
||||
CGAL_unreachable();
|
||||
}
|
||||
|
||||
template <class OutputItFaces>
|
||||
|
|
|
|||
|
|
@ -640,8 +640,7 @@ public:
|
|||
}
|
||||
return make_triple(fit, eit, vit);
|
||||
}
|
||||
CGAL_assertion(false);
|
||||
return make_triple(fit, eit, vit);
|
||||
CGAL_unreachable();
|
||||
}
|
||||
|
||||
template <class OutputItFaces, class OutputItBoundaryEdges>
|
||||
|
|
|
|||
|
|
@ -1497,8 +1497,7 @@ insert(const Point& p, Locate_type lt, Face_handle loc, int li)
|
|||
case VERTEX:
|
||||
return loc->vertex(li);
|
||||
}
|
||||
CGAL_assertion(false); // locate step failed
|
||||
return Vertex_handle();
|
||||
CGAL_unreachable();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -251,8 +251,7 @@ private:
|
|||
Vertex_handle
|
||||
nearest_vertex_dispatch(const Point&, Face_handle, Tag_true) const
|
||||
{
|
||||
CGAL_assertion(false);
|
||||
return Vertex_handle();
|
||||
CGAL_unreachable();
|
||||
}
|
||||
|
||||
void locate_in_all(const Point& p,
|
||||
|
|
|
|||
|
|
@ -944,9 +944,7 @@ private:
|
|||
default:
|
||||
CGAL_unreachable();
|
||||
}
|
||||
//should not be reached
|
||||
CGAL_unreachable();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool cell_has_edge(const Cell_handle ch, const Edge& e) const
|
||||
|
|
@ -1057,7 +1055,7 @@ private:
|
|||
} while (++circ != end);
|
||||
|
||||
std::cerr << "There is no facet shared by e and v" << std::endl;
|
||||
CGAL_unreachable();
|
||||
CGAL_assertion(false);
|
||||
return Facet(Cell_handle(), 0);
|
||||
}
|
||||
|
||||
|
|
@ -1074,7 +1072,7 @@ private:
|
|||
} while (++circ != end);
|
||||
|
||||
std::cerr << "There is no cell shared by e and v" << std::endl;
|
||||
CGAL_unreachable();
|
||||
CGAL_assertion(false);
|
||||
return Cell_handle();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -780,7 +780,7 @@ march_locate_2D(Face_handle f,
|
|||
}
|
||||
}
|
||||
|
||||
CGAL_precondition(false);
|
||||
CGAL_assertion(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -972,9 +972,7 @@ march_locate_2D(Face_handle f,
|
|||
}
|
||||
default:
|
||||
{
|
||||
// impossible
|
||||
CGAL_assertion(false);
|
||||
return f;
|
||||
CGAL_unreachable();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -238,7 +238,6 @@ private:
|
|||
}
|
||||
|
||||
CGAL_unreachable();
|
||||
return false;
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue