Skip to content

Commit d3fca65

Browse files
committed
CGAL: No longer per package assertions
1 parent 4888373 commit d3fca65

File tree

119 files changed

+1885
-3724
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+1885
-3724
lines changed

Alpha_shapes_2/include/CGAL/Alpha_shape_2.h

+42-44
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
#include <CGAL/assertions.h>
2525
#include <CGAL/basic.h>
26-
#include <CGAL/triangulation_assertions.h>
26+
#include <CGAL/assertions.h>
2727
#include <CGAL/Unique_hash_map.h>
2828
#include <CGAL/utility.h>
2929

@@ -849,7 +849,7 @@ Alpha_shape_2<Dt,EACT>::initialize_interval_edge_map()
849849
{
850850
// both faces are infinite by definition unattached
851851
// the edge is finite by construction
852-
CGAL_triangulation_precondition((is_infinite(pNeighbor)
852+
CGAL_precondition((is_infinite(pNeighbor)
853853
&& is_infinite(pFace)));
854854
interval = make_triple(squared_radius(pFace, i),
855855
Infinity,
@@ -859,7 +859,7 @@ Alpha_shape_2<Dt,EACT>::initialize_interval_edge_map()
859859
else
860860
{ // is_infinite(pNeighbor)
861861

862-
CGAL_triangulation_precondition((is_infinite(pNeighbor)
862+
CGAL_precondition((is_infinite(pNeighbor)
863863
&& !is_infinite(pFace)));
864864
if (is_attached(pFace, i))
865865
interval = make_triple(UNDEFINED,
@@ -1109,7 +1109,7 @@ Alpha_shape_2<Dt,EACT>::update_alpha_shape_vertex_list()const {
11091109
// which might be infinity
11101110
// write the vertex
11111111
v = (*vertex_alpha_it).second;
1112-
CGAL_triangulation_assertion((classify(v) == REGULAR));
1112+
CGAL_assertion((classify(v) == REGULAR));
11131113
Alpha_shape_vertices_list.push_back(v);
11141114
}
11151115
}
@@ -1122,7 +1122,7 @@ Alpha_shape_2<Dt,EACT>::update_alpha_shape_vertex_list()const {
11221122
++vertex_alpha_it)
11231123
{
11241124
v = (*vertex_alpha_it).second;
1125-
CGAL_triangulation_assertion((classify(v) == SINGULAR));
1125+
CGAL_assertion((classify(v) == SINGULAR));
11261126

11271127
Alpha_shape_vertices_list.push_back(v);
11281128
}
@@ -1159,7 +1159,7 @@ Alpha_shape_2<Dt,EACT>::update_alpha_shape_edges_list() const
11591159
{
11601160
pInterval = &(*edge_alpha_it).first;
11611161

1162-
CGAL_triangulation_assertion(pInterval->second != Infinity);
1162+
CGAL_assertion(pInterval->second != Infinity);
11631163
// since this happens only for convex hull of dimension 2
11641164
// thus singular
11651165

@@ -1171,9 +1171,9 @@ Alpha_shape_2<Dt,EACT>::update_alpha_shape_edges_list() const
11711171
// and alpha is smaller than the upper boundary
11721172
// which might be infinity
11731173
// visualize the boundary
1174-
CGAL_triangulation_assertion((classify((*edge_alpha_it).second.first,
1175-
(*edge_alpha_it).second.second)
1176-
== REGULAR));
1174+
CGAL_assertion((classify((*edge_alpha_it).second.first,
1175+
(*edge_alpha_it).second.second)
1176+
== REGULAR));
11771177
Alpha_shape_edges_list.push_back(Edge((*edge_alpha_it).second.first,
11781178
(*edge_alpha_it).second.second));
11791179
}
@@ -1191,7 +1191,7 @@ Alpha_shape_2<Dt,EACT>::update_alpha_shape_edges_list() const
11911191

11921192
if (pInterval->first == UNDEFINED)
11931193
{
1194-
CGAL_triangulation_assertion(pInterval->second != Infinity);
1194+
CGAL_assertion(pInterval->second != Infinity);
11951195
// since this happens only for convex hull of dimension 2
11961196
// thus singular
11971197

@@ -1203,9 +1203,9 @@ Alpha_shape_2<Dt,EACT>::update_alpha_shape_edges_list() const
12031203
// and alpha is smaller than the upper boundary
12041204
// which might be infinity
12051205
// visualize the boundary
1206-
CGAL_triangulation_assertion((classify((*edge_alpha_it).second.first,
1207-
(*edge_alpha_it).second.second)
1208-
== REGULAR));
1206+
CGAL_assertion((classify((*edge_alpha_it).second.first,
1207+
(*edge_alpha_it).second.second)
1208+
== REGULAR));
12091209
Alpha_shape_edges_list.push_back(Edge((*edge_alpha_it).second.first,
12101210
(*edge_alpha_it).second.second));
12111211
}
@@ -1219,12 +1219,12 @@ Alpha_shape_2<Dt,EACT>::update_alpha_shape_edges_list() const
12191219
// if alpha is smaller than the upper boundary
12201220
// which might be infinity
12211221
// visualize the boundary
1222-
CGAL_triangulation_assertion(((classify((*edge_alpha_it).second.first,
1223-
(*edge_alpha_it).second.second)
1224-
== REGULAR)
1225-
|| (classify((*edge_alpha_it).second.first,
1222+
CGAL_assertion(((classify((*edge_alpha_it).second.first,
12261223
(*edge_alpha_it).second.second)
1227-
== SINGULAR)));
1224+
== REGULAR)
1225+
|| (classify((*edge_alpha_it).second.first,
1226+
(*edge_alpha_it).second.second)
1227+
== SINGULAR)));
12281228
Alpha_shape_edges_list.push_back(Edge((*edge_alpha_it).second.first,
12291229
(*edge_alpha_it).second.second));
12301230
}
@@ -1324,7 +1324,7 @@ Alpha_shape_2<Dt,EACT>::number_of_solid_components(const Type_of_alpha& alpha) c
13241324
++face_it)
13251325
{
13261326
Face_handle pFace = face_it;
1327-
CGAL_triangulation_postcondition( pFace != nullptr);
1327+
CGAL_postcondition( pFace != nullptr);
13281328

13291329
if (classify(pFace, alpha) == INTERIOR){
13301330
Data& data = marked_face_set[pFace];
@@ -1358,7 +1358,7 @@ Alpha_shape_2<Dt,EACT>::traverse(const Face_handle& pFace,
13581358
for (int i=0; i<3; i++)
13591359
{
13601360
pNeighbor = fh->neighbor(i);
1361-
CGAL_triangulation_assertion(pNeighbor != nullptr);
1361+
CGAL_assertion(pNeighbor != nullptr);
13621362
if (classify(pNeighbor, alpha) == INTERIOR){
13631363
Data& data = marked_face_set[pNeighbor];
13641364
if(data == false){
@@ -1514,7 +1514,7 @@ Alpha_shape_2<Dt,EACT>::op_ostream(std::ostream& os) const
15141514
// write the vertex
15151515

15161516
v = (*vertex_alpha_it).second;
1517-
CGAL_triangulation_assertion((classify(v) ==
1517+
CGAL_assertion((classify(v) ==
15181518
Alpha_shape_2<Dt,EACT>::REGULAR));
15191519
// if we used Edelsbrunner and Muecke's definition
15201520
// regular means incident to a higher-dimensional face
@@ -1536,7 +1536,7 @@ Alpha_shape_2<Dt,EACT>::op_ostream(std::ostream& os) const
15361536
{
15371537
pInterval = &(*edge_alpha_it).first;
15381538

1539-
CGAL_triangulation_assertion(pInterval->second != Infinity);
1539+
CGAL_assertion(pInterval->second != Infinity);
15401540
// since this happens only for convex hull of dimension 1
15411541
// thus singular
15421542

@@ -1563,11 +1563,11 @@ Alpha_shape_2<Dt,EACT>::op_ostream(std::ostream& os) const
15631563
f = pNeighbor;
15641564
}
15651565

1566-
CGAL_triangulation_assertion((classify(f) ==
1567-
Alpha_shape_2<Dt,EACT>::INTERIOR));
1566+
CGAL_assertion((classify(f) ==
1567+
Alpha_shape_2<Dt,EACT>::INTERIOR));
15681568

1569-
CGAL_triangulation_assertion((classify(f, i) ==
1570-
Alpha_shape_2<Dt,EACT>::REGULAR));
1569+
CGAL_assertion((classify(f, i) ==
1570+
Alpha_shape_2<Dt,EACT>::REGULAR));
15711571

15721572
os << V[f->vertex(f->ccw(i))] << ' '
15731573
<< V[f->vertex(f->cw(i))] << std::endl;
@@ -1595,8 +1595,7 @@ Alpha_shape_2<Dt,EACT>::op_ostream(std::ostream& os) const
15951595
// write the vertex
15961596

15971597
v = (*vertex_alpha_it).second;
1598-
CGAL_triangulation_assertion((classify(v) ==
1599-
Alpha_shape_2<Dt,EACT>::REGULAR));
1598+
CGAL_assertion((classify(v) == Alpha_shape_2<Dt,EACT>::REGULAR));
16001599
V[v] = number_of_vertices++;
16011600
os << v->point() << std::endl;
16021601
}
@@ -1608,8 +1607,7 @@ Alpha_shape_2<Dt,EACT>::op_ostream(std::ostream& os) const
16081607
++vertex_alpha_it)
16091608
{
16101609
v = (*vertex_alpha_it).second;
1611-
CGAL_triangulation_assertion((classify(v) ==
1612-
Alpha_shape_2<Dt,EACT>::SINGULAR));
1610+
CGAL_assertion((classify(v) == Alpha_shape_2<Dt,EACT>::SINGULAR));
16131611

16141612
V[v] = number_of_vertices++;
16151613
os << v->point() << std::endl;
@@ -1652,7 +1650,7 @@ Alpha_shape_2<Dt,EACT>::op_ostream(std::ostream& os) const
16521650
if (pInterval->second != Infinity &&
16531651
pInterval->second <= get_alpha())
16541652
{
1655-
CGAL_triangulation_assertion((classify(f, i) ==
1653+
CGAL_assertion((classify(f, i) ==
16561654
Alpha_shape_2<Dt,EACT>::REGULAR));
16571655
// assure that all vertices are in ccw order
16581656
if (classify(f) == Alpha_shape_2<Dt,EACT>::EXTERIOR)
@@ -1665,7 +1663,7 @@ Alpha_shape_2<Dt,EACT>::op_ostream(std::ostream& os) const
16651663
f = pNeighbor;
16661664
}
16671665

1668-
CGAL_triangulation_assertion((classify(f) ==
1666+
CGAL_assertion((classify(f) ==
16691667
Alpha_shape_2<Dt,EACT>::INTERIOR));
16701668

16711669
os << V[f->vertex(f->ccw(i))] << ' '
@@ -1680,7 +1678,7 @@ Alpha_shape_2<Dt,EACT>::op_ostream(std::ostream& os) const
16801678
// write the singular edges
16811679
if (pInterval->first != UNDEFINED)
16821680
{
1683-
CGAL_triangulation_assertion((classify(f, i) ==
1681+
CGAL_assertion((classify(f, i) ==
16841682
Alpha_shape_2<Dt,EACT>::SINGULAR));
16851683
os << V[f->vertex(f->ccw(i))] << ' '
16861684
<< V[f->vertex(f->cw(i))] << std::endl;
@@ -1739,7 +1737,7 @@ Alpha_shape_2<Dt,EACT>::Output ()
17391737
// which might be infinity
17401738
// visualize the boundary
17411739

1742-
CGAL_triangulation_assertion((classify((*edge_alpha_it).second.first,
1740+
CGAL_assertion((classify((*edge_alpha_it).second.first,
17431741
(*edge_alpha_it).second.second) ==
17441742
REGULAR));
17451743

@@ -1769,7 +1767,7 @@ Alpha_shape_2<Dt,EACT>::Output ()
17691767
if (pInterval->first == UNDEFINED)
17701768
{
17711769

1772-
CGAL_triangulation_assertion(pInterval->second != Infinity);
1770+
CGAL_assertion(pInterval->second != Infinity);
17731771
// since this happens only for convex hull of dimension 1
17741772
// thus singular
17751773

@@ -1782,9 +1780,9 @@ Alpha_shape_2<Dt,EACT>::Output ()
17821780
// which might be infinity
17831781
// visualize the boundary
17841782

1785-
CGAL_triangulation_assertion((classify((*edge_alpha_it).second.first,
1786-
(*edge_alpha_it).second.second) ==
1787-
REGULAR));
1783+
CGAL_assertion((classify((*edge_alpha_it).second.first,
1784+
(*edge_alpha_it).second.second) ==
1785+
REGULAR));
17881786
L.push_back((this->segment((*edge_alpha_it).second.first,
17891787
(*edge_alpha_it).second.second))
17901788
.source());
@@ -1802,12 +1800,12 @@ Alpha_shape_2<Dt,EACT>::Output ()
18021800
// which might be infinity
18031801
// visualize the boundary
18041802

1805-
CGAL_triangulation_assertion(((classify((*edge_alpha_it).second.first,
1806-
(*edge_alpha_it).second.second) ==
1807-
REGULAR) ||
1808-
(classify((*edge_alpha_it).second.first,
1809-
(*edge_alpha_it).second.second) ==
1810-
SINGULAR)));
1803+
CGAL_assertion(((classify((*edge_alpha_it).second.first,
1804+
(*edge_alpha_it).second.second) ==
1805+
REGULAR) ||
1806+
(classify((*edge_alpha_it).second.first,
1807+
(*edge_alpha_it).second.second) ==
1808+
SINGULAR)));
18111809
L.push_back((this->segment((*edge_alpha_it).second.first,
18121810
(*edge_alpha_it).second.second))
18131811
.source());

Alpha_shapes_3/include/CGAL/Alpha_shape_3.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ private :
401401
// Returns the n-th alpha-value.
402402
// n < size()
403403
{
404-
CGAL_triangulation_assertion( n > 0 &&
404+
CGAL_assertion( n > 0 &&
405405
n <= static_cast<int>(alpha_spectrum.size()) );
406406
return alpha_spectrum[n-1];
407407
}
@@ -1713,7 +1713,7 @@ Alpha_shape_3<Dt,EACT>::number_of_solid_components(const NT& alpha) const
17131713
for( cell_it = finite_cells_begin(); cell_it != done; ++cell_it)
17141714
{
17151715
Cell_handle pCell = cell_it;
1716-
CGAL_triangulation_assertion(pCell != nullptr);
1716+
CGAL_assertion(pCell != nullptr);
17171717

17181718
if (classify(pCell, alpha) == INTERIOR){
17191719
Data& data = marked_cell_set[pCell];
@@ -1745,7 +1745,7 @@ void Alpha_shape_3<Dt,EACT>::traverse(Cell_handle pCell,
17451745
for (int i=0; i<=3; i++)
17461746
{
17471747
pNeighbor = pCell->neighbor(i);
1748-
CGAL_triangulation_assertion(pNeighbor != nullptr);
1748+
CGAL_assertion(pNeighbor != nullptr);
17491749
if (classify(pNeighbor, alpha) == INTERIOR){
17501750
Data& data = marked_cell_set[pNeighbor];
17511751
if(data == false){

0 commit comments

Comments
 (0)