diff --git a/.github/install.sh b/.github/install.sh
index e06328da401..32b8552aa8f 100755
--- a/.github/install.sh
+++ b/.github/install.sh
@@ -1,5 +1,4 @@
#!/bin/bash
-sudo add-apt-repository ppa:mikhailnov/pulseeffects -y
sudo apt-get update
sudo apt-get install -y libmpfr-dev \
libeigen3-dev qtbase5-dev libqt5sql5-sqlite libqt5opengl5-dev qtscript5-dev \
diff --git a/.github/workflows/Remove_labels.yml b/.github/workflows/Remove_labels.yml
new file mode 100644
index 00000000000..8e9ed55f6bd
--- /dev/null
+++ b/.github/workflows/Remove_labels.yml
@@ -0,0 +1,32 @@
+name: remove_labels
+on:
+ pull_request_target:
+ types: [synchronize]
+jobs:
+ remove_label:
+ runs-on: ubuntu-latest
+ if: contains(github.event.pull_request.labels.*.name, 'Tested')
+ name: remove label
+ steps:
+ - name: removelabel
+ uses: actions/github-script@v6
+ with:
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ script: |
+ github.rest.issues.removeLabel({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: context.issue.number,
+ name: "Tested",
+ });
+ - name: Post address
+ uses: actions/github-script@v6
+ if: ${{ success() }}
+ with:
+ script: |
+ github.rest.issues.createComment({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: context.issue.number,
+ body: "This pull-request was previously marked with the label `Tested`, but has been modified with new commits. That label has been removed."
+ })
diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml
index 8a238305b81..3d2f2941c95 100644
--- a/.github/workflows/build_doc.yml
+++ b/.github/workflows/build_doc.yml
@@ -4,9 +4,16 @@ on:
issue_comment:
types: [created]
+permissions:
+ contents: read # to fetch code (actions/checkout)
+
jobs:
build:
+ permissions:
+ contents: read # to fetch code (actions/checkout)
+ pull-requests: write # to create comment
+
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
@@ -40,15 +47,27 @@ jobs:
//get pullrequest url
const pr_number = context.payload.issue.number
return pr_number
+
+ - name: Emoji-comment
+ uses: actions/github-script@v6
+ if: steps.get_round.outputs.result != 'stop'
+ with:
+ script: |
+ github.rest.reactions.createForIssueComment({
+ comment_id: ${{ github.event.comment.id }},
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ content: 'rocket'
+ })
+
- uses: actions/checkout@v3
name: "checkout branch"
if: steps.get_round.outputs.result != 'stop'
with:
- repository: ${{ github.repository }}
- ref: refs/pull/${{ steps.get_pr_number.outputs.result }}/merge
- token: ${{ secrets.PUSH_TO_CGAL_GITHUB_IO_TOKEN }}
- fetch-depth: 2
-
+ repository: ${{ github.repository }}
+ ref: refs/pull/${{ steps.get_pr_number.outputs.result }}/merge
+ token: ${{ secrets.PUSH_TO_CGAL_GITHUB_IO_TOKEN }}
+ fetch-depth: 2
- name: install dependencies
if: steps.get_round.outputs.result != 'stop'
@@ -83,14 +102,17 @@ jobs:
#list impacted packages
LIST_OF_PKGS=$(git diff --name-only HEAD^1 HEAD |cut -s -d/ -f1 |sort -u | xargs -I {} echo {} && ls -d {}/package_info 2>/dev/null |cut -d/ -f1 |egrep -v Installation||true)
if [ "$LIST_OF_PKGS" = "" ]; then
- echo "::set-output name=DoxygenError::No package affected."
+ echo "DoxygenError=No package affected." >> $GITHUB_OUTPUT
exit 1
fi
cd build_doc && make -j2 doc
make -j2 doc_with_postprocessing 2>tmp.log
if [ -s tmp.log ]; then
content=`cat ./tmp.log`
- echo "::set-output name=DoxygenError::$(cat tmp.log)"
+ delimiter="$(openssl rand -hex 8)"
+ echo "DoxygenError<<${delimiter}" >> "${GITHUB_OUTPUT}"
+ cat tmp.log >> "${GITHUB_OUTPUT}"
+ echo "${delimiter}" >> "${GITHUB_OUTPUT}"
exit 1
fi
cd ..
@@ -110,7 +132,7 @@ jobs:
mv tmp.html index.html
git add ${PR_NUMBER}/$ROUND index.html && git commit -q --amend -m "base commit" && git push -q -f -u origin master
else
- echo "::set-output name=DoxygenError::This round already exists. Overwrite it with /force-build."
+ echo "DoxygenError=This round already exists. Overwrite it with /force-build." >> $GITHUB_OUTPUT
exit 1
fi
@@ -131,11 +153,13 @@ jobs:
});
- name: Post error
+ env:
+ ERRORMSG: ${{steps.build_and_run.outputs.DoxygenError}}
uses: actions/github-script@v6
if: ${{ failure() && steps.get_round.outputs.result != 'stop' }}
with:
script: |
- const error = "${{steps.build_and_run.outputs.DoxygenError}}"
+ const error = process.env.ERRORMSG
const msg = "There was an error while building the doc: \n"+error
github.rest.issues.createComment({
owner: "CGAL",
diff --git a/.github/workflows/filter_testsuite.yml b/.github/workflows/filter_testsuite.yml
index 27f4c350885..9b222b77eb3 100644
--- a/.github/workflows/filter_testsuite.yml
+++ b/.github/workflows/filter_testsuite.yml
@@ -4,8 +4,12 @@ on:
issue_comment:
types: [created]
+permissions: {}
jobs:
build:
+ permissions:
+ pull-requests: write # to create comment
+
if: (github.event.comment.user.login == 'sloriot' || github.event.comment.user.login == 'lrineau') && contains(github.event.comment.body, '/testme')
runs-on: ubuntu-latest
steps:
diff --git a/AABB_tree/demo/AABB_tree/resources/about.html b/AABB_tree/demo/AABB_tree/resources/about.html
index 8d2c41d1ea0..1ab9dc84c1b 100644
--- a/AABB_tree/demo/AABB_tree/resources/about.html
+++ b/AABB_tree/demo/AABB_tree/resources/about.html
@@ -2,8 +2,8 @@
AABB Tree Demo
Copyright ©2009
- INRIA Sophia Antipolis - Mediterranee
- This application illustrates the AABB tree component
+ INRIA Sophia Antipolis - Mediterranee
+ This application illustrates the AABB tree component
of CGAL, applied to polyhedron
facets and edges.
See also the following chapters of the manual:
diff --git a/AABB_tree/test/AABB_tree/AABB_test_util.h b/AABB_tree/test/AABB_tree/AABB_test_util.h
index 65be2e8a7c5..5b73a20f9f2 100644
--- a/AABB_tree/test/AABB_tree/AABB_test_util.h
+++ b/AABB_tree/test/AABB_tree/AABB_test_util.h
@@ -527,7 +527,6 @@ private:
{
CGAL::Timer timer;
timer.start();
- int nb_test = 0;
while ( timer.time() < duration )
{
Point a = random_point_in(m_tree.bbox());
@@ -539,8 +538,6 @@ private:
test(segment, m_polyhedron, m_tree, m_naive);
test(ray, m_polyhedron, m_tree, m_naive);
test(line, m_polyhedron, m_tree, m_naive);
-
- ++nb_test;
}
timer.stop();
diff --git a/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction.h b/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction.h
index 3e4d8ba7df9..c7f5e1325b2 100644
--- a/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction.h
+++ b/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction.h
@@ -370,19 +370,19 @@ namespace CGAL {
coord_type K, min_K;
const coord_type eps;
const coord_type inv_eps_2; // 1/(eps^2)
- const coord_type eps_3; // test de ^3 donc points tel 1e-7 soit petit
+ const coord_type eps_3; // tests using cubed eps so points such that 1e-7 is small
const criteria STANDBY_CANDIDATE;
const criteria STANDBY_CANDIDATE_BIS;
const criteria NOT_VALID_CANDIDATE;
//---------------------------------------------------------------------
- //Pour une visu correcte
- //pour retenir les facettes selectionnees
+ // For a correct visualization
+ // to retain the selected facets
int _vh_number;
int _facet_number;
//---------------------------------------------------------------------
- //Pour le post traitement
+ // For post-processing
mutable int _postprocessing_counter;
int _size_before_postprocessing;
@@ -501,9 +501,8 @@ namespace CGAL {
}
//-------------------------------------------------------------------
- // pour gerer certaines aretes interieures: a savoir celle encore connectee au
- // bord (en fait seule, les aretes interieures reliant 2 bords nous
- // interressent...)
+ // to handle certain interior edges, meaning those still connected to the boundary
+ // (actually, only the interior edges linking two boundaries are relevant)
inline void set_interior_edge(Vertex_handle w, Vertex_handle v)
{
@@ -806,7 +805,7 @@ namespace CGAL {
if ((number_of_facets() > static_cast(T.number_of_vertices()))&&
(NB_BORDER_MAX > 0))
- // en principe 2*nb_sommets = nb_facettes: y a encore de la marge!!!
+ // in theory 2*vertices_n = facets_n: plenty of room!!!
{
while(postprocessing()){
extend2_timer.start();
@@ -1068,9 +1067,8 @@ namespace CGAL {
//---------------------------------------------------------------------
bool is_interior_edge(const Edge_like& key) const
- // pour gerer certaines aretes interieures: a savoir celle encore connectee au
- // bord (en fait seule, les aretes interieures reliant 2 bords nous
- // interressent...)
+ // to handle certain interior edges, meaning those still connected to the boundary
+ // (actually, only the interior edges linking two boundaries are relevant)
{
return (is_interior_edge(key.first, key.second)||
is_interior_edge(key.second, key.first));
@@ -1299,7 +1297,6 @@ namespace CGAL {
#ifdef AFSR_LAZY
value = lazy_squared_radius(cc);
#else
- // qualified with CGAL, to avoid a compilation error with clang
if(volume(pp0, pp1, pp2, pp3) != 0){
value = T.geom_traits().compute_squared_radius_3_object()(pp0, pp1, pp2, pp3);
} else {
@@ -1337,7 +1334,6 @@ namespace CGAL {
{
value = compute_scalar_product(Vc, Vc) - ac*ac/norm_V;
if ((value < 0)||(norm_V > inv_eps_2)){
- // qualified with CGAL, to avoid a compilation error with clang
value = T.geom_traits().compute_squared_radius_3_object()(cp1, cp2, cp3);
}
}
@@ -1365,7 +1361,7 @@ namespace CGAL {
/// @}
//---------------------------------------------------------------------
- // For a border edge e we determine the incident facet which has the highest
+ // For a border edge e, we determine the incident facet which has the highest
// chance to be a natural extension of the surface
Radius_edge_type
@@ -1425,8 +1421,7 @@ namespace CGAL {
P2Pn = construct_vector(p2, pn);
v2 = construct_cross_product(P2P1,P2Pn);
- //pas necessaire de normer pour un bon echantillon:
- // on peut alors tester v1*v2 >= 0
+ // no need to normalize for a correct sampling: one can then test v1*v2 >= 0
norm = sqrt(norm1 * compute_scalar_product(v2,v2));
pscal = v1*v2;
// check if the triangle will produce a sliver on the surface
@@ -1437,7 +1432,8 @@ namespace CGAL {
if (tmp < min_valueA)
{
PnP1 = p1-pn;
- // DELTA represente la qualite d'echantillonnage du bord
+ // DELTA encodes the quality of the border sampling
+ //
// We skip triangles having an internal angle along e
// whose cosinus is smaller than -DELTA
// that is the angle is larger than arcos(-DELTA)
@@ -1462,37 +1458,36 @@ namespace CGAL {
if ((min_valueA == infinity()) || border_facet) // bad facets case
{
- min_facet = Facet(c, i); // !!! sans aucune signification....
- value = NOT_VALID_CANDIDATE; // Attention a ne pas inserer dans PQ
+ min_facet = Facet(c, i); // !!! without any meaning....
+ value = NOT_VALID_CANDIDATE; // Do not insert in the PQ
}
else
{
min_facet = min_facetA;
- //si on considere seulement la pliure value appartient a [0, 2]
- //value = coord_type(1) - min_valueP;
-
- // si la pliure est bonne on note suivant le alpha sinon on prend en compte la
- // pliure seule... pour discriminer entre les bons slivers...
- // si on veut discriminer les facettes de bonnes pliures plus finement
- // alors -(1+1/min_valueA) app a [-inf, -1]
- // -min_valueP app a [-1, 1]
+ // If we only consider the fold value belongs to [0, 2]
+ // value = coord_type(1) - min_valueP;
+ // If the fold is OK, we rate based on the alpha value. Otherwise, take only the fold into account
+ // to discriminate between good slivers.
+ //
+ // If we wish to discriminate the facets with good folds more finely,
+ // then:
+ // -(1+1/min_valueA) is within [-inf, -1]
+ // -min_valueP is within [-1, 1]
+ //
if (min_valueP > COS_BETA)
value = -(coord_type(1) + coord_type(1)/min_valueA);
else
{
- //on refuse une trop grande non-uniformite
+ // reject overly non-uniform values
coord_type tmp = priority (*this, c, i);
if (min_valueA <= K * tmp)
value = - min_valueP;
else
{
- value = STANDBY_CANDIDATE; // tres mauvais candidat mauvaise pliure
- // + grand alpha... a traiter plus tard....
- min_K =
- (std::min)(min_K,
- min_valueA/tmp);
+ value = STANDBY_CANDIDATE; // extremely bad candidate, bad fold + large alpha; handle later
+ min_K = (std::min)(min_K, min_valueA/tmp);
}
}
}
@@ -1597,7 +1592,7 @@ namespace CGAL {
}
//---------------------------------------------------------------------
- // test de reciprocite avant de recoller une oreille anti-singularite
+ // reciprocity test before glueing anti-singularity ear
int
test_merge(const Edge_like& ordered_key, const Border_elt& result,
const Vertex_handle& v, const coord_type& ear_alpha)
@@ -1622,12 +1617,12 @@ namespace CGAL {
coord_type norm = sqrt(compute_scalar_product(v1, v1) * compute_scalar_product(v2, v2));
if (v1*v2 > COS_BETA*norm)
- return 1; // label bonne pliure sinon:
+ return 1; // mark as good fold
if (ear_alpha <= K * priority(*this, neigh, n_ind))
- return 2; // label alpha coherent...
+ return 2; // mark alpha consistent
- return 0; //sinon oreille a rejeter...
+ return 0; // ear to be rejected
}
@@ -1753,7 +1748,7 @@ namespace CGAL {
Edge_like ordered_key(v1,v2);
if (!is_border_elt(ordered_key, result12))
- std::cerr << "+++probleme coherence bord " << std::endl;
+ std::cerr << "+++issue with border consistency " << std::endl;
bool is_border_el1 = is_border_elt(ordered_el1, result1),
is_border_el2 = is_border_elt(ordered_el2, result2);
@@ -1782,8 +1777,7 @@ namespace CGAL {
return FINAL_CASE;
}
//---------------------------------------------------------------------
- //on peut alors marquer v1 et on pourrait essayer de merger
- //sans faire de calcul inutile???
+ // we can then mark v1 and could try to merge without any useless computation???
if (is_border_el1)
{
Edge_incident_facet edge_Ifacet_2(Edge(c, i, edge_Efacet.first.third),
@@ -1796,7 +1790,7 @@ namespace CGAL {
return EAR_CASE;
}
//---------------------------------------------------------------------
- //idem pour v2
+ //idem for v2
if (is_border_el2)
{
Edge_incident_facet edge_Ifacet_1(Edge(c, i, edge_Efacet.first.second),
@@ -1852,9 +1846,9 @@ namespace CGAL {
// border incident to a point... _mark<1 even if th orientation
// may be such as one vh has 2 successorson the same border...
{
- // a ce niveau on peut tester si le recollement se fait en
- // maintenant la compatibilite d'orientation des bords (pour
- // surface orientable...) ou si elle est brisee...
+ // at this level, we can test if glueing can be done while keeping
+ // compatible orientations for the borders (for an orientable surface...)
+ // or if it is broken
Edge_incident_facet edge_Ifacet_1(Edge(c, i, edge_Efacet.first.second),
edge_Efacet.second);
Edge_incident_facet edge_Ifacet_2(Edge(c, i, edge_Efacet.first.third),
@@ -1884,8 +1878,8 @@ namespace CGAL {
Border_elt result_ear2;
Edge_like ear1_e, ear2_e;
- // pour maintenir la reconstruction d'une surface orientable :
- // on verifie que les bords se recollent dans des sens opposes
+ // to preserve the reconstruction of an orientable surface, we check that
+ // borders glue to one another in opposite directions
if (ordered_key.first==v1)
{
ear1_e = Edge_like(c->vertex(i), ear1_c ->vertex(ear1_i));
@@ -1897,7 +1891,7 @@ namespace CGAL {
ear2_e = Edge_like(c->vertex(i), ear2_c ->vertex(ear2_i));
}
- //maintient la surface orientable
+ // preserves orientability of the surface
bool is_border_ear1 = is_ordered_border_elt(ear1_e, result_ear1);
bool is_border_ear2 = is_ordered_border_elt(ear2_e, result_ear2);
bool ear1_valid(false), ear2_valid(false);
@@ -1931,8 +1925,7 @@ namespace CGAL {
{
Validation_case res = validate(ear1, e1.first);
if (!((res == EAR_CASE)||(res == FINAL_CASE)))
- std::cerr << "+++probleme de recollement : cas "
- << res << std::endl;
+ std::cerr << "+++issue in glueing: case " << res << std::endl;
e2 = compute_value(edge_Ifacet_2);
if (ordered_key.first == v1)
@@ -1948,8 +1941,7 @@ namespace CGAL {
{
Validation_case res = validate(ear2, e2.first);
if (!((res == EAR_CASE)||(res == FINAL_CASE)))
- std::cerr << "+++probleme de recollement : cas "
- << res << std::endl;
+ std::cerr << "+++issue in glueing : case " << res << std::endl;
e1 = compute_value(edge_Ifacet_1);
if (ordered_key.first == v1)
@@ -1962,25 +1954,23 @@ namespace CGAL {
_ordered_border.insert(Radius_ptr_type(e1.first, p1));
}
}
- else// les deux oreilles ne se recollent pas sur la meme arete...
+ else // both ears do not glue on the same edge
{
- // on resoud la singularite.
+ // resolve the singularity
if (ear1_valid)
{
Validation_case res = validate(ear1, e1.first);
if (!((res == EAR_CASE)||(res == FINAL_CASE)))
- std::cerr << "+++probleme de recollement : cas "
- << res << std::endl;
+ std::cerr << "+++issue in glueing: case " << res << std::endl;
}
if (ear2_valid)
{
Validation_case res = validate(ear2, e2.first);
if (!((res == EAR_CASE)||(res == FINAL_CASE)))
- std::cerr << "+++probleme de recollement : cas "
- << res << std::endl;
+ std::cerr << "+++issue in glueing : case " << res << std::endl;
}
- // on met a jour la PQ s'il y a lieu... mais surtout pas
- // avant la resolution de la singularite
+
+ // Update the PQ if needed, but not before resolving the singularity
if (!ear1_valid)
{
_ordered_border.insert(Radius_ptr_type(e1.first, p1));
@@ -2020,7 +2010,7 @@ namespace CGAL {
if (new_candidate.first == STANDBY_CANDIDATE)
{
- // a garder pour un K un peu plus grand...
+ // put aside for a slightly larger K
new_candidate.first = STANDBY_CANDIDATE_BIS;
}
@@ -2042,8 +2032,8 @@ namespace CGAL {
void
extend()
{
- // initilisation de la variable globale K: qualite d'echantillonnage requise
- K = K_init; // valeur d'initialisation de K pour commencer prudemment...
+ // Initialize the global variable K: required sampling quality
+ K = K_init; // initial value of K to start carefully
coord_type K_prev = K;
Vertex_handle v1, v2;
@@ -2052,7 +2042,7 @@ namespace CGAL {
}
do
{
- min_K = infinity(); // pour retenir le prochain K necessaire pour progresser...
+ min_K = infinity(); // to store the next K required to progress
do
{
@@ -2095,7 +2085,7 @@ namespace CGAL {
{
new_candidate = compute_value(mem_Ifacet);
if ((new_candidate != mem_e_it))
- // &&(new_candidate.first < NOT_VALID_CANDIDATE))
+ // &&(new_candidate.first < NOT_VALID_CANDIDATE))
{
IO_edge_type* pnew =
set_again_border_elt(key_tmp.first, key_tmp.second,
@@ -2111,8 +2101,7 @@ namespace CGAL {
(_ordered_border.begin()->first < STANDBY_CANDIDATE_BIS));
K_prev = K;
K += (std::max)(K_step, min_K - K + eps);
- // on augmente progressivement le K mais on a deja rempli sans
- // faire des betises auparavant...
+ // Progressively increase K, but having already filled without issue beforehand
}
while((!_ordered_border.empty())&&(K <= K)&&(min_K != infinity())&&(K!=K_prev));
@@ -2125,9 +2114,8 @@ namespace CGAL {
//---------------------------------------------------------------------
- // En principe, si l'allocateur de cellules etait bien fait on aurait pas besoin
- // de mettre a jour les valeurs rajoutees pour les cellules a la main...
-
+ // In theory, if the cell allocator were properly made, one would not need to manually update
+ // the values added for the cells
void
re_init_for_free_cells_cache(const Vertex_handle& vh)
{
@@ -2152,9 +2140,8 @@ namespace CGAL {
int index = c->index(vh);
Cell_handle neigh = c->neighbor(index);
int n_ind = neigh->index(c);
- neigh->set_smallest_radius(n_ind, -1); // pour obliger le recalcul
- // si c est selectionnee c'est qu'elle est aussi le mem_IFacet renvoye par
- // compute_value... donc a swapper aussi
+ neigh->set_smallest_radius(n_ind, -1); // forces recomputation
+ // if c is selected, then it is also the mem_IFacet returned by compute_value... so to be swapped too
if (c->is_selected_facet(index))
{
int fn = c->facet_number(index);
@@ -2214,8 +2201,8 @@ namespace CGAL {
circ = next(circ);
}
while(circ.first.first != c);
- // si on passe par la, alors y a eu un probleme....
- std::cerr << "+++probleme dans la MAJ avant remove..." << std::endl;
+ // if we are here, something went wrong
+ std::cerr << "+++issue in the update before removal..." << std::endl;
return Facet(c, start.second);
}
@@ -2237,7 +2224,7 @@ namespace CGAL {
ordered_map_erase(border_elt.second.first.first,
border_IO_elt(vh, vh_succ));
remove_border_edge(vh, vh_succ);
- // 1- a virer au cas ou car vh va etre detruit
+ // 1- remove just in case since vh is about to be destroyed
remove_interior_edge(vh_succ, vh);
bool while_cond(true);
do
@@ -2266,14 +2253,14 @@ namespace CGAL {
{
ordered_map_erase(result.first.first, border_IO_elt(vh_int, vh));
remove_border_edge(vh_int, vh);
- // 1- a virer au cas ou car vh va etre detruit
+ // 1- remove just in case since vh is about to be destroyed
remove_interior_edge(vh_int, vh);
while_cond = false;
}
- // a titre preventif... on essaye de s'assurer de marquer les aretes
- // interieures au sens large...
- // 2- a virer a tout pris pour que maintenir le sens de interior edge
+ // As a preventive measure, we try to ensure marking the interior edges in a broad sense
+
+ // 2- remove to preserve the interior edge
remove_interior_edge(vh_int, vh_succ);
remove_interior_edge(vh_succ, vh_int);
@@ -2304,16 +2291,16 @@ namespace CGAL {
bool
create_singularity(const Vertex_handle& vh)
{
- // Pour reperer le cas de triangle isole
+ // To detect the isolated triangle case
if (vh->is_on_border())
{
- // vh sommet 0
+ // vh vertex 0
Next_border_elt border_elt = *(vh->first_incident());
- Vertex_handle vh_1 = border_elt.first;// sommet 1
+ Vertex_handle vh_1 = border_elt.first;// vertex 1
border_elt = *(vh_1->first_incident());
- Vertex_handle vh_2 = border_elt.first;// sommet 2
+ Vertex_handle vh_2 = border_elt.first;// vertex 2
border_elt = *(vh_2->first_incident());
- Vertex_handle vh_3 = border_elt.first;// sommet 0 ???
+ Vertex_handle vh_3 = border_elt.first;// vertex 0 ???
Cell_handle c;
int i, j, k;
if ((vh_3 == vh)&&(T.is_facet(vh, vh_1, vh_2, c, i ,j ,k)))
@@ -2328,7 +2315,7 @@ namespace CGAL {
}
- // Reperer le cas d'aretes interieures...
+ // Detect the interior edges case
std::list vh_list;
T.incident_vertices(vh, std::back_inserter(vh_list));
@@ -2402,9 +2389,9 @@ namespace CGAL {
std::list L_v;
- // Pour controler les sommets choisis sur le bord...
+ // To control vertices chosen on the boundary
- // nombre d'aretes a partir duquel on considere que c'est irrecuperable NB_BORDER_MAX
+ // NB_BORDER_MAX: number of edges from which we consider that things are irrecoverable
int vh_on_border_inserted(0);
for(Finite_vertices_iterator v_it = T.finite_vertices_begin();
@@ -2445,7 +2432,7 @@ namespace CGAL {
std::size_t itmp, L_v_size_mem;
L_v_size_mem = L_v.size();
- if ((vh_on_border_inserted != 0)&& // pour ne post-traiter que les bords
+ if ((vh_on_border_inserted != 0)&& // to post-process only the borders
(L_v.size() < .1 * _size_before_postprocessing))
{
{
@@ -2460,7 +2447,7 @@ namespace CGAL {
}
#ifdef VERBOSE
if(L_v.size() > 0){
- std::cout << " " << L_v.size() << " non regular points." << std::endl;
+ std::cout << " " << L_v.size() << " non-regular points." << std::endl;
}
#endif // VERBOSE
re_compute_values();
@@ -2469,7 +2456,7 @@ namespace CGAL {
postprocess_timer.stop();
return false;
}
- // we stop if we removed more than 10% of points or after 20 rounds
+ // we stop if we removed more than 10% of points, or after 20 rounds
if ((L_v_size_mem == L_v.size())||
((_size_before_postprocessing - T.number_of_vertices()) >
.1 * _size_before_postprocessing)||
@@ -2479,7 +2466,6 @@ namespace CGAL {
}
min_K = infinity();
- // fin--
// if (_postprocessing_counter < 5)
// return true;
postprocess_timer.stop();
diff --git a/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction_vertex_base_3.h b/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction_vertex_base_3.h
index a8c2bf4b2b4..bbecac5c757 100644
--- a/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction_vertex_base_3.h
+++ b/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction_vertex_base_3.h
@@ -220,7 +220,7 @@ namespace CGAL {
else
{
if (m_incident_border->second->first != nullptr)
- std::cerr << "+++probleme de MAJ du bord " << std::endl;
+ std::cerr << "+++issue while updating border " << std::endl;
*m_incident_border->second = elt;
}
}
diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h
index dd142ad6791..d385b481a33 100644
--- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h
+++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h
@@ -73,7 +73,7 @@ namespace CGAL {
* in turn required by the \c CurvedKernelViaAnalysis_2 concept
* (see the documentation of the corresponding package). Therefore,
* some types and methods of the class have both an "algebraic" name
- * (demanded by \c CurveKernelWithAnalysis_d_2) and an "non-algebraic name
+ * (demanded by \c CurveKernelWithAnalysis_d_2) and a "non-algebraic" name
* (demanded by \c CurveKernel_2).
*
* \b Algebraic_curve_kernel_2 is a template class, and needs a model
@@ -356,10 +356,10 @@ public:
const OuterFunctor& outer)
: _inner(inner), _outer(outer) {}
- Unary_compose(const Unary_compose& other)
- : _inner(other._inner), _outer(other._outer) {}
+ Unary_compose(const Unary_compose& other) = default;
+ Unary_compose& operator=(const Unary_compose& other) = default;
- Unary_compose() : _inner(::boost::none),_outer(::boost::none) {}
+ Unary_compose() : _inner(::boost::none),_outer(::boost::none) {}
typedef typename InnerFunctor::argument_type argument_type;
typedef typename OuterFunctor::result_type result_type;
diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_quadratic_refinement_rep_bfi.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_quadratic_refinement_rep_bfi.h
index 19f447c08f2..18b7fa805dd 100644
--- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_quadratic_refinement_rep_bfi.h
+++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_quadratic_refinement_rep_bfi.h
@@ -45,7 +45,7 @@ namespace internal {
* @Unpublished{abbott-quadratic,
* author = {John Abbott},
* title = {Quadratic Interval Refinement for Real Roots},
- * url = {http://www.dima.unige.it/~abbott/},
+ * url = {https://www.dima.unige.it/~abbott/},
* note = {Poster presented at the 2006 Internat. Sympos. on Symbolic
and Algebraic Computation (ISSAC 2006)}
* }
diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h
index f1f45aab56c..974e26d0a57 100644
--- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h
+++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h
@@ -1147,8 +1147,8 @@ public:
Bitstream_descartes() : Base(new Rep()) {}
//! Copy constructor
- Bitstream_descartes(const Self& other) : Base(static_cast(other))
- {}
+ Bitstream_descartes(const Self& other) = default;
+ Bitstream_descartes& operator=(const Self& other) = default;
/*!
* \brief Constructor for a polynomial \c f
diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h
index d78d50acfd0..50ae06acee9 100644
--- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h
+++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h
@@ -436,6 +436,9 @@ public:
friend class CGAL::internal::Bitstream_descartes_E08_tree;
friend class CGAL::internal::Bitstream_descartes_E08_tree_rep;
+ Bitstream_descartes_E08_node(const Self&) = default;
+ Self& operator= (const Self&) = delete;
+
private:
// "node data" (set individually in subdivision)
Integer lower_num_, upper_num_; // TODO use lower_num_, width_num_ instead
@@ -466,8 +469,6 @@ private:
log_eps_ = n.log_eps_;
log_C_eps_ = n.log_C_eps_;
}
-
- Self& operator= (const Self&) = delete;
}; // struct Bitstream_descartes_E08_node
diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h
index 869b758cb12..9d1084414cd 100644
--- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h
+++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h
@@ -525,6 +525,9 @@ public:
friend class internal::Bitstream_descartes_rndl_tree;
friend class internal::Bitstream_descartes_rndl_tree_rep;
+ Bitstream_descartes_rndl_node(const Self&) = default;
+ Self& operator= (const Self&) = delete;
+
private:
// "node data" (set individually in subdivision)
Integer lower_num_, upper_num_; // TODO use lower_num_, width_num_ instead
@@ -557,8 +560,6 @@ private:
log_eps_ = n.log_eps_;
log_C_eps_ = n.log_C_eps_;
}
-
- Self& operator= (const Self&)=delete;
}; // struct Bitstream_descartes_rndl_node
diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h
index 7167c9f8a12..3ae2a59e961 100644
--- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h
+++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h
@@ -762,7 +762,7 @@ std::istream& operator >> (
is >> arcno;
- // read the ")
+ // read the ")"
swallow(is, ')');
pt = Xy_coordinate_2(x, curve, arcno);
diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_real_root_isolator.h b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_real_root_isolator.h
index b79e47262b3..ce3d7b3fda1 100644
--- a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_real_root_isolator.h
+++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_real_root_isolator.h
@@ -187,7 +187,7 @@ void test_real_root_isolator() {
assert( n == number_of_roots);
}{
//std::cout << "Kameny 3\n";
- // from http://www-sop.inria.fr/saga/POL/BASE/1.unipol
+ // from https://www-sop.inria.fr/saga/POL/BASE/1.unipol/
NT c = CGAL::ipower(NT(10),12);
Polynomial P(NT(-3),NT(0),c);
@@ -202,7 +202,7 @@ void test_real_root_isolator() {
assert(3 == internal::check_intervals_real_root_isolator(P));
}{
//std::cout << "Kameny 4\n";
- // from http://www-sop.inria.fr/saga/POL/BASE/1.unipol
+ // from https://www-sop.inria.fr/saga/POL/BASE/1.unipol
NT z(0);
NT a = CGAL::ipower(NT(10),24); // a = 10^{24}
@@ -218,7 +218,7 @@ void test_real_root_isolator() {
assert( 4 == internal::check_intervals_real_root_isolator(P));
}{
//std::cout << "Polynomial with large and small clustered roots\n";
- // from http://www-sop.inria.fr/saga/POL/BASE/1.unipol
+ // from https://www-sop.inria.fr/saga/POL/BASE/1.unipol
// there seems to be some error or misunderstanding
NT z(0);
diff --git a/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h b/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h
index d54f28b21a3..373dc515573 100644
--- a/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h
+++ b/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h
@@ -23,7 +23,6 @@
#include
#include
-#include
#include
#include
@@ -849,7 +848,7 @@ Alpha_shape_2::initialize_interval_edge_map()
{
// both faces are infinite by definition unattached
// the edge is finite by construction
- CGAL_triangulation_precondition((is_infinite(pNeighbor)
+ CGAL_precondition((is_infinite(pNeighbor)
&& is_infinite(pFace)));
interval = make_triple(squared_radius(pFace, i),
Infinity,
@@ -859,7 +858,7 @@ Alpha_shape_2::initialize_interval_edge_map()
else
{ // is_infinite(pNeighbor)
- CGAL_triangulation_precondition((is_infinite(pNeighbor)
+ CGAL_precondition((is_infinite(pNeighbor)
&& !is_infinite(pFace)));
if (is_attached(pFace, i))
interval = make_triple(UNDEFINED,
@@ -1109,7 +1108,7 @@ Alpha_shape_2::update_alpha_shape_vertex_list()const {
// which might be infinity
// write the vertex
v = (*vertex_alpha_it).second;
- CGAL_triangulation_assertion((classify(v) == REGULAR));
+ CGAL_assertion((classify(v) == REGULAR));
Alpha_shape_vertices_list.push_back(v);
}
}
@@ -1122,7 +1121,7 @@ Alpha_shape_2::update_alpha_shape_vertex_list()const {
++vertex_alpha_it)
{
v = (*vertex_alpha_it).second;
- CGAL_triangulation_assertion((classify(v) == SINGULAR));
+ CGAL_assertion((classify(v) == SINGULAR));
Alpha_shape_vertices_list.push_back(v);
}
@@ -1159,7 +1158,7 @@ Alpha_shape_2::update_alpha_shape_edges_list() const
{
pInterval = &(*edge_alpha_it).first;
- CGAL_triangulation_assertion(pInterval->second != Infinity);
+ CGAL_assertion(pInterval->second != Infinity);
// since this happens only for convex hull of dimension 2
// thus singular
@@ -1171,9 +1170,9 @@ Alpha_shape_2::update_alpha_shape_edges_list() const
// and alpha is smaller than the upper boundary
// which might be infinity
// visualize the boundary
- CGAL_triangulation_assertion((classify((*edge_alpha_it).second.first,
- (*edge_alpha_it).second.second)
- == REGULAR));
+ CGAL_assertion((classify((*edge_alpha_it).second.first,
+ (*edge_alpha_it).second.second)
+ == REGULAR));
Alpha_shape_edges_list.push_back(Edge((*edge_alpha_it).second.first,
(*edge_alpha_it).second.second));
}
@@ -1191,7 +1190,7 @@ Alpha_shape_2::update_alpha_shape_edges_list() const
if (pInterval->first == UNDEFINED)
{
- CGAL_triangulation_assertion(pInterval->second != Infinity);
+ CGAL_assertion(pInterval->second != Infinity);
// since this happens only for convex hull of dimension 2
// thus singular
@@ -1203,9 +1202,9 @@ Alpha_shape_2::update_alpha_shape_edges_list() const
// and alpha is smaller than the upper boundary
// which might be infinity
// visualize the boundary
- CGAL_triangulation_assertion((classify((*edge_alpha_it).second.first,
- (*edge_alpha_it).second.second)
- == REGULAR));
+ CGAL_assertion((classify((*edge_alpha_it).second.first,
+ (*edge_alpha_it).second.second)
+ == REGULAR));
Alpha_shape_edges_list.push_back(Edge((*edge_alpha_it).second.first,
(*edge_alpha_it).second.second));
}
@@ -1219,12 +1218,12 @@ Alpha_shape_2::update_alpha_shape_edges_list() const
// if alpha is smaller than the upper boundary
// which might be infinity
// visualize the boundary
- CGAL_triangulation_assertion(((classify((*edge_alpha_it).second.first,
- (*edge_alpha_it).second.second)
- == REGULAR)
- || (classify((*edge_alpha_it).second.first,
+ CGAL_assertion(((classify((*edge_alpha_it).second.first,
(*edge_alpha_it).second.second)
- == SINGULAR)));
+ == REGULAR)
+ || (classify((*edge_alpha_it).second.first,
+ (*edge_alpha_it).second.second)
+ == SINGULAR)));
Alpha_shape_edges_list.push_back(Edge((*edge_alpha_it).second.first,
(*edge_alpha_it).second.second));
}
@@ -1324,7 +1323,7 @@ Alpha_shape_2::number_of_solid_components(const Type_of_alpha& alpha) c
++face_it)
{
Face_handle pFace = face_it;
- CGAL_triangulation_postcondition( pFace != nullptr);
+ CGAL_postcondition( pFace != nullptr);
if (classify(pFace, alpha) == INTERIOR){
Data& data = marked_face_set[pFace];
@@ -1358,7 +1357,7 @@ Alpha_shape_2::traverse(const Face_handle& pFace,
for (int i=0; i<3; i++)
{
pNeighbor = fh->neighbor(i);
- CGAL_triangulation_assertion(pNeighbor != nullptr);
+ CGAL_assertion(pNeighbor != nullptr);
if (classify(pNeighbor, alpha) == INTERIOR){
Data& data = marked_face_set[pNeighbor];
if(data == false){
@@ -1514,7 +1513,7 @@ Alpha_shape_2::op_ostream(std::ostream& os) const
// write the vertex
v = (*vertex_alpha_it).second;
- CGAL_triangulation_assertion((classify(v) ==
+ CGAL_assertion((classify(v) ==
Alpha_shape_2::REGULAR));
// if we used Edelsbrunner and Muecke's definition
// regular means incident to a higher-dimensional face
@@ -1536,7 +1535,7 @@ Alpha_shape_2::op_ostream(std::ostream& os) const
{
pInterval = &(*edge_alpha_it).first;
- CGAL_triangulation_assertion(pInterval->second != Infinity);
+ CGAL_assertion(pInterval->second != Infinity);
// since this happens only for convex hull of dimension 1
// thus singular
@@ -1563,11 +1562,11 @@ Alpha_shape_2::op_ostream(std::ostream& os) const
f = pNeighbor;
}
- CGAL_triangulation_assertion((classify(f) ==
- Alpha_shape_2::INTERIOR));
+ CGAL_assertion((classify(f) ==
+ Alpha_shape_2::INTERIOR));
- CGAL_triangulation_assertion((classify(f, i) ==
- Alpha_shape_2::REGULAR));
+ CGAL_assertion((classify(f, i) ==
+ Alpha_shape_2::REGULAR));
os << V[f->vertex(f->ccw(i))] << ' '
<< V[f->vertex(f->cw(i))] << std::endl;
@@ -1595,8 +1594,7 @@ Alpha_shape_2::op_ostream(std::ostream& os) const
// write the vertex
v = (*vertex_alpha_it).second;
- CGAL_triangulation_assertion((classify(v) ==
- Alpha_shape_2::REGULAR));
+ CGAL_assertion((classify(v) == Alpha_shape_2::REGULAR));
V[v] = number_of_vertices++;
os << v->point() << std::endl;
}
@@ -1608,8 +1606,7 @@ Alpha_shape_2::op_ostream(std::ostream& os) const
++vertex_alpha_it)
{
v = (*vertex_alpha_it).second;
- CGAL_triangulation_assertion((classify(v) ==
- Alpha_shape_2::SINGULAR));
+ CGAL_assertion((classify(v) == Alpha_shape_2::SINGULAR));
V[v] = number_of_vertices++;
os << v->point() << std::endl;
@@ -1652,7 +1649,7 @@ Alpha_shape_2::op_ostream(std::ostream& os) const
if (pInterval->second != Infinity &&
pInterval->second <= get_alpha())
{
- CGAL_triangulation_assertion((classify(f, i) ==
+ CGAL_assertion((classify(f, i) ==
Alpha_shape_2::REGULAR));
// assure that all vertices are in ccw order
if (classify(f) == Alpha_shape_2::EXTERIOR)
@@ -1665,7 +1662,7 @@ Alpha_shape_2::op_ostream(std::ostream& os) const
f = pNeighbor;
}
- CGAL_triangulation_assertion((classify(f) ==
+ CGAL_assertion((classify(f) ==
Alpha_shape_2::INTERIOR));
os << V[f->vertex(f->ccw(i))] << ' '
@@ -1680,7 +1677,7 @@ Alpha_shape_2::op_ostream(std::ostream& os) const
// write the singular edges
if (pInterval->first != UNDEFINED)
{
- CGAL_triangulation_assertion((classify(f, i) ==
+ CGAL_assertion((classify(f, i) ==
Alpha_shape_2::SINGULAR));
os << V[f->vertex(f->ccw(i))] << ' '
<< V[f->vertex(f->cw(i))] << std::endl;
@@ -1739,7 +1736,7 @@ Alpha_shape_2::Output ()
// which might be infinity
// visualize the boundary
- CGAL_triangulation_assertion((classify((*edge_alpha_it).second.first,
+ CGAL_assertion((classify((*edge_alpha_it).second.first,
(*edge_alpha_it).second.second) ==
REGULAR));
@@ -1769,7 +1766,7 @@ Alpha_shape_2::Output ()
if (pInterval->first == UNDEFINED)
{
- CGAL_triangulation_assertion(pInterval->second != Infinity);
+ CGAL_assertion(pInterval->second != Infinity);
// since this happens only for convex hull of dimension 1
// thus singular
@@ -1782,9 +1779,9 @@ Alpha_shape_2::Output ()
// which might be infinity
// visualize the boundary
- CGAL_triangulation_assertion((classify((*edge_alpha_it).second.first,
- (*edge_alpha_it).second.second) ==
- REGULAR));
+ CGAL_assertion((classify((*edge_alpha_it).second.first,
+ (*edge_alpha_it).second.second) ==
+ REGULAR));
L.push_back((this->segment((*edge_alpha_it).second.first,
(*edge_alpha_it).second.second))
.source());
@@ -1802,12 +1799,12 @@ Alpha_shape_2::Output ()
// which might be infinity
// visualize the boundary
- CGAL_triangulation_assertion(((classify((*edge_alpha_it).second.first,
- (*edge_alpha_it).second.second) ==
- REGULAR) ||
- (classify((*edge_alpha_it).second.first,
- (*edge_alpha_it).second.second) ==
- SINGULAR)));
+ CGAL_assertion(((classify((*edge_alpha_it).second.first,
+ (*edge_alpha_it).second.second) ==
+ REGULAR) ||
+ (classify((*edge_alpha_it).second.first,
+ (*edge_alpha_it).second.second) ==
+ SINGULAR)));
L.push_back((this->segment((*edge_alpha_it).second.first,
(*edge_alpha_it).second.second))
.source());
diff --git a/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h b/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h
index bbce2b51e1c..b7b8c2e18ba 100644
--- a/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h
+++ b/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h
@@ -319,7 +319,7 @@ private :
}
// the version to be used with Tag_true is templated to avoid
- // instanciation through explicit instantiation of the whole class
+ // instantiation through explicit instantiation of the whole class
void set_alpha_min_of_vertices(Tag_false)
{
for( Finite_vertices_iterator vit = finite_vertices_begin();
@@ -401,7 +401,7 @@ public:
// Returns the n-th alpha-value.
// n < size()
{
- CGAL_triangulation_assertion( n > 0 &&
+ CGAL_assertion( n > 0 &&
n <= static_cast(alpha_spectrum.size()) );
return alpha_spectrum[n-1];
}
@@ -1713,7 +1713,7 @@ Alpha_shape_3::number_of_solid_components(const NT& alpha) const
for( cell_it = finite_cells_begin(); cell_it != done; ++cell_it)
{
Cell_handle pCell = cell_it;
- CGAL_triangulation_assertion(pCell != nullptr);
+ CGAL_assertion(pCell != nullptr);
if (classify(pCell, alpha) == INTERIOR){
Data& data = marked_cell_set[pCell];
@@ -1745,7 +1745,7 @@ void Alpha_shape_3::traverse(Cell_handle pCell,
for (int i=0; i<=3; i++)
{
pNeighbor = pCell->neighbor(i);
- CGAL_triangulation_assertion(pNeighbor != nullptr);
+ CGAL_assertion(pNeighbor != nullptr);
if (classify(pNeighbor, alpha) == INTERIOR){
Data& data = marked_cell_set[pNeighbor];
if(data == false){
diff --git a/Alpha_wrap_3/examples/Alpha_wrap_3/triangle_mesh_wrap.cpp b/Alpha_wrap_3/examples/Alpha_wrap_3/triangle_mesh_wrap.cpp
index b4b1ec067ff..5aa8deeb4de 100644
--- a/Alpha_wrap_3/examples/Alpha_wrap_3/triangle_mesh_wrap.cpp
+++ b/Alpha_wrap_3/examples/Alpha_wrap_3/triangle_mesh_wrap.cpp
@@ -45,6 +45,7 @@ int main(int argc, char** argv)
const double alpha = diag_length / relative_alpha;
const double offset = diag_length / relative_offset;
+ std::cout << "alpha: " << alpha << ", offset: " << offset << std::endl;
// Construct the wrap
CGAL::Real_timer t;
diff --git a/Alpha_wrap_3/examples/Alpha_wrap_3/wrap_from_cavity.cpp b/Alpha_wrap_3/examples/Alpha_wrap_3/wrap_from_cavity.cpp
index 91b95584f8c..2eb3f9c4155 100644
--- a/Alpha_wrap_3/examples/Alpha_wrap_3/wrap_from_cavity.cpp
+++ b/Alpha_wrap_3/examples/Alpha_wrap_3/wrap_from_cavity.cpp
@@ -47,16 +47,9 @@ int main(int argc, char** argv)
const double offset = diag_length / relative_offset;
// Construct the wrap
- using Oracle = CGAL::Alpha_wraps_3::internal::Triangle_mesh_oracle;
- Oracle oracle;
- oracle.add_triangle_mesh(input);
-
CGAL::Real_timer t;
t.start();
- Mesh wrap;
- CGAL::Alpha_wraps_3::internal::Alpha_wrap_3 aw3(oracle);
-
// There is no limit on how many seeds can be used.
// However, the algorithm automatically determines whether a seed can be used
// to initialize the refinement based on a few conditions (distance to the offset, value of alpha, etc.)
@@ -66,7 +59,8 @@ int main(int argc, char** argv)
Point_3(0, 50, 0) // a point within the armadillo surface
};
- aw3(alpha, offset, wrap, CGAL::parameters::seed_points(std::ref(seeds)));
+ Mesh wrap;
+ alpha_wrap_3(input, alpha, offset, wrap, CGAL::parameters::seed_points(std::ref(seeds)));
t.stop();
std::cout << "Result: " << num_vertices(wrap) << " vertices, " << num_faces(wrap) << " faces" << std::endl;
diff --git a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h
index e88e00fafe0..8e05d6929cf 100644
--- a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h
+++ b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h
@@ -29,7 +29,7 @@
#include
-#include
+#include
#include
#include
#include
@@ -229,11 +229,14 @@ private:
}
public:
- template
+ template
void operator()(const double alpha, // = default_alpha()
const double offset, // = alpha / 30.
OutputMesh& output_mesh,
- const NamedParameters& np)
+ const InputNamedParameters& in_np = parameters::default_values(),
+ const OutputNamedParameters& out_np = parameters::default_values())
{
namespace PMP = Polygon_mesh_processing;
@@ -241,25 +244,25 @@ public:
using parameters::get_parameter_reference;
using parameters::choose_parameter;
- using OVPM = typename CGAL::GetVertexPointMap::type;
- OVPM ovpm = choose_parameter(get_parameter(np, internal_np::vertex_point),
+ using OVPM = typename CGAL::GetVertexPointMap::type;
+ OVPM ovpm = choose_parameter(get_parameter(out_np, internal_np::vertex_point),
get_property_map(vertex_point, output_mesh));
typedef typename internal_np::Lookup_named_param_def <
internal_np::visitor_t,
- NamedParameters,
+ InputNamedParameters,
Wrapping_default_visitor // default
>::reference Visitor;
Wrapping_default_visitor default_visitor;
- Visitor visitor = choose_parameter(get_parameter_reference(np, internal_np::visitor), default_visitor);
+ Visitor visitor = choose_parameter(get_parameter_reference(in_np, internal_np::visitor), default_visitor);
std::vector no_seeds;
using Seeds = typename internal_np::Lookup_named_param_def<
- internal_np::seed_points_t, NamedParameters, std::vector >::reference;
- Seeds seeds = choose_parameter(get_parameter_reference(np, internal_np::seed_points), no_seeds);
+ internal_np::seed_points_t, InputNamedParameters, std::vector >::reference;
+ Seeds seeds = choose_parameter(get_parameter_reference(in_np, internal_np::seed_points), no_seeds);
- const bool do_enforce_manifoldness = choose_parameter(get_parameter(np, internal_np::do_enforce_manifoldness), true);
+ const bool do_enforce_manifoldness = choose_parameter(get_parameter(in_np, internal_np::do_enforce_manifoldness), true);
#ifdef CGAL_AW3_TIMER
CGAL::Real_timer t;
@@ -360,14 +363,6 @@ public:
}
// Convenience overloads
- template
- void operator()(const double alpha,
- const double offset,
- OutputMesh& output_mesh)
- {
- return operator()(alpha, offset, output_mesh, parameters::default_values());
- }
-
template
void operator()(const double alpha,
OutputMesh& output_mesh)
diff --git a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_AABB_traits.h b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_AABB_geom_traits.h
similarity index 96%
rename from Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_AABB_traits.h
rename to Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_AABB_geom_traits.h
index 1a3fa7d8183..22c64e9b5e2 100644
--- a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_AABB_traits.h
+++ b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_AABB_geom_traits.h
@@ -13,8 +13,8 @@
// Andreas Fabri
// Michael Hemmer
//
-#ifndef CGAL_ALPHA_WRAP_3_INTERNAL_ALPHA_WRAP_AABB_TRAITS_H
-#define CGAL_ALPHA_WRAP_3_INTERNAL_ALPHA_WRAP_AABB_TRAITS_H
+#ifndef CGAL_ALPHA_WRAP_3_INTERNAL_ALPHA_WRAP_AABB_GEOM_TRAITS_H
+#define CGAL_ALPHA_WRAP_3_INTERNAL_ALPHA_WRAP_AABB_GEOM_TRAITS_H
#include
@@ -89,14 +89,14 @@ public:
};
template
-class Alpha_wrap_AABB_traits
+class Alpha_wrap_AABB_geom_traits
: public GT
{
public:
using Ball_3 = internal::Ball_3;
public:
- Alpha_wrap_AABB_traits(const GT& gt = GT()) : GT(gt) { }
+ Alpha_wrap_AABB_geom_traits(const GT& gt = GT()) : GT(gt) { }
public:
class Construct_ball_3
@@ -295,4 +295,4 @@ public:
} // namespace Alpha_wraps_3
} // namespace CGAL
-#endif // CGAL_ALPHA_WRAP_3_INTERNAL_ALPHA_WRAP_AABB_TRAITS_H
+#endif // CGAL_ALPHA_WRAP_3_INTERNAL_ALPHA_WRAP_AABB_GEOM_TRAITS_H
diff --git a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Oracle_base.h b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Oracle_base.h
index c38157a59bf..85bd11c00b6 100644
--- a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Oracle_base.h
+++ b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Oracle_base.h
@@ -145,6 +145,8 @@ public:
bool empty() const { return m_tree_ptr->empty(); }
bool do_call() const { return (!empty() || base().do_call()); }
+ void clear() { m_tree_ptr->clear() && base().clear(); }
+
public:
typename AABB_tree::Bounding_box bbox() const
{
@@ -313,6 +315,8 @@ public:
bool empty() const { return m_tree_ptr->empty(); }
bool do_call() const { return !empty(); }
+ void clear() { m_tree_ptr->clear(); }
+
public:
typename AABB_tree::Bounding_box bbox() const
{
diff --git a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Point_set_oracle.h b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Point_set_oracle.h
index b27ffa0525a..7bad2ff313d 100644
--- a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Point_set_oracle.h
+++ b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Point_set_oracle.h
@@ -14,7 +14,7 @@
#include
-#include
+#include
#include
#include
@@ -38,7 +38,7 @@ namespace internal {
template
struct PS_oracle_traits
{
- using Geom_traits = Alpha_wrap_AABB_traits; // Wrap the kernel to add Ball_3 + custom Do_intersect_3
+ using Geom_traits = Alpha_wrap_AABB_geom_traits; // Wrap the kernel to add Ball_3 + custom Do_intersect_3
using Points = std::vector;
using PR_iterator = typename Points::const_iterator;
diff --git a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Segment_soup_oracle.h b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Segment_soup_oracle.h
index a6a87f000ab..d02a9f9faaf 100644
--- a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Segment_soup_oracle.h
+++ b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Segment_soup_oracle.h
@@ -14,7 +14,7 @@
#include
-#include
+#include
#include
#include
@@ -38,7 +38,7 @@ namespace internal {
template
struct SS_oracle_traits
{
- using Geom_traits = Alpha_wrap_AABB_traits; // Wrap the kernel to add Ball_3 + custom Do_intersect_3
+ using Geom_traits = Alpha_wrap_AABB_geom_traits; // Wrap the kernel to add Ball_3 + custom Do_intersect_3
using Segments = std::vector;
using SR_iterator = typename Segments::const_iterator;
diff --git a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_mesh_oracle.h b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_mesh_oracle.h
index f4e74da51e9..6d0f65142f6 100644
--- a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_mesh_oracle.h
+++ b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_mesh_oracle.h
@@ -14,7 +14,7 @@
#include
-#include
+#include
#include
#include
@@ -37,7 +37,7 @@ namespace internal {
template
struct TM_oracle_traits
{
- using Geom_traits = Alpha_wrap_AABB_traits; // Wrap the kernel to add Ball_3 + custom Do_intersect_3
+ using Geom_traits = Alpha_wrap_AABB_geom_traits; // Wrap the kernel to add Ball_3 + custom Do_intersect_3
using Point_3 = typename Geom_traits::Point_3;
using AABB_traits = typename AABB_tree_splitter_traits::AABB_traits;
diff --git a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_soup_oracle.h b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_soup_oracle.h
index 81fed3d58df..57f936306da 100644
--- a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_soup_oracle.h
+++ b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_soup_oracle.h
@@ -14,7 +14,7 @@
#include
-#include
+#include
#include
#include
@@ -38,7 +38,7 @@ namespace internal {
template
struct TS_oracle_traits
{
- using Geom_traits = Alpha_wrap_AABB_traits; // Wrap the kernel to add Ball_3 + custom Do_intersect_3
+ using Geom_traits = Alpha_wrap_AABB_geom_traits; // Wrap the kernel to add Ball_3 + custom Do_intersect_3
using Point_3 = typename Geom_traits::Point_3;
using AABB_traits = typename AABB_tree_splitter_traits::AABB_traits;
using AABB_tree = typename AABB_tree_splitter_traits::AABB_tree;
diff --git a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/oracles.h b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/oracles.h
index 77a4ca313c0..509a9efe7e2 100644
--- a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/oracles.h
+++ b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/oracles.h
@@ -14,7 +14,7 @@
#include
-#include
+#include
#include
#include
diff --git a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/splitting_helper.h b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/splitting_helper.h
index 1e06b7ff30e..4b146e95d8f 100644
--- a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/splitting_helper.h
+++ b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/splitting_helper.h
@@ -14,7 +14,7 @@
#include
-#include
+#include
#include
#include
diff --git a/Alpha_wrap_3/include/CGAL/alpha_wrap_3.h b/Alpha_wrap_3/include/CGAL/alpha_wrap_3.h
index 13cf90f2df8..638c5fb9fa1 100644
--- a/Alpha_wrap_3/include/CGAL/alpha_wrap_3.h
+++ b/Alpha_wrap_3/include/CGAL/alpha_wrap_3.h
@@ -112,7 +112,7 @@ void alpha_wrap_3(const PointRange& points,
Oracle oracle(alpha, gt);
oracle.add_triangle_soup(points, faces, in_np);
AW3 alpha_wrap_builder(oracle);
- alpha_wrap_builder(alpha, offset, alpha_wrap, out_np);
+ alpha_wrap_builder(alpha, offset, alpha_wrap, in_np, out_np);
}
// Convenience overloads
@@ -261,7 +261,7 @@ void alpha_wrap_3(const TriangleMesh& tmesh,
Oracle oracle(alpha, gt);
oracle.add_triangle_mesh(tmesh, in_np);
AW3 alpha_wrap_builder(oracle);
- alpha_wrap_builder(alpha, offset, alpha_wrap, out_np);
+ alpha_wrap_builder(alpha, offset, alpha_wrap, in_np, out_np);
}
// The convenience overloads are the same for triangle mesh & point set
@@ -357,7 +357,7 @@ void alpha_wrap_3(const PointRange& points,
Oracle oracle(gt);
oracle.add_point_set(points, in_np);
AW3 alpha_wrap_builder(oracle);
- alpha_wrap_builder(alpha, offset, alpha_wrap, out_np);
+ alpha_wrap_builder(alpha, offset, alpha_wrap, in_np, out_np);
}
// Convenience overloads, common to both mesh and point set
diff --git a/Alpha_wrap_3/test/Alpha_wrap_3/test_AW3_manifoldness.cpp b/Alpha_wrap_3/test/Alpha_wrap_3/test_AW3_manifoldness.cpp
index 928cade6495..638431e3056 100644
--- a/Alpha_wrap_3/test/Alpha_wrap_3/test_AW3_manifoldness.cpp
+++ b/Alpha_wrap_3/test/Alpha_wrap_3/test_AW3_manifoldness.cpp
@@ -45,7 +45,6 @@ void alpha_wrap_triangle_manifoldness(Mesh& input_mesh,
Mesh nm_wrap;
CGAL::alpha_wrap_3(input_mesh, alpha, offset, nm_wrap,
- CGAL::parameters::default_values(),
CGAL::parameters::do_enforce_manifoldness(false));
std::cout << "Result: " << vertices(nm_wrap).size() << " vertices, " << faces(nm_wrap).size() << " faces" << std::endl;
@@ -67,7 +66,6 @@ void alpha_wrap_triangle_manifoldness(Mesh& input_mesh,
Mesh m_wrap;
CGAL::alpha_wrap_3(input_mesh, alpha, offset, m_wrap,
- CGAL::parameters::default_values(),
CGAL::parameters::do_enforce_manifoldness(true));
// CGAL::IO::write_polygon_mesh("last.off", wrap, CGAL::parameters::stream_precision(17));
diff --git a/Alpha_wrap_3/test/Alpha_wrap_3/test_alpha_wrap_3_mesh.cpp b/Alpha_wrap_3/test/Alpha_wrap_3/test_alpha_wrap_3_mesh.cpp
index 5091934b62f..470d48e40d4 100644
--- a/Alpha_wrap_3/test/Alpha_wrap_3/test_alpha_wrap_3_mesh.cpp
+++ b/Alpha_wrap_3/test/Alpha_wrap_3/test_alpha_wrap_3_mesh.cpp
@@ -47,7 +47,6 @@ void alpha_wrap_triangle_mesh(Mesh& input_mesh,
Mesh wrap;
CGAL::alpha_wrap_3(input_mesh, alpha, offset, wrap,
- CGAL::parameters::default_values(),
CGAL::parameters::do_enforce_manifoldness(enforce_manifoldness));
std::cout << "Result: " << vertices(wrap).size() << " vertices, " << faces(wrap).size() << " faces" << std::endl;
diff --git a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h
index e5988f9f77b..e9e6ee7d472 100644
--- a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h
+++ b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h
@@ -53,7 +53,7 @@ is_valid(bool verbose, int level) const
if (number_of_vertices() < 3) return true;
- // CGAL_triangulation_assertion(result);
+ // CGAL_assertion(result);
for (All_edges_iterator eit = all_edges_begin();
eit != all_edges_end(); ++eit) {
@@ -64,7 +64,7 @@ is_valid(bool verbose, int level) const
if ( !is_infinite(v) ) {
result = result &&
( incircle(f, v->site()) != NEGATIVE );
- // CGAL_triangulation_assertion(result);
+ // CGAL_assertion(result);
}
Edge sym_e = sym_edge(e);
f = sym_e.first;
@@ -72,7 +72,7 @@ is_valid(bool verbose, int level) const
if ( !is_infinite(v) ) {
result = result &&
( incircle(f, v->site()) != NEGATIVE );
- // CGAL_triangulation_assertion(result);
+ // CGAL_assertion(result);
}
}
@@ -83,7 +83,7 @@ is_valid(bool verbose, int level) const
std::cerr << "Apollonius diagram is NOT valid..." << std::flush;
}
- // CGAL_triangulation_assertion(result);
+ // CGAL_assertion(result);
return result;
}
@@ -100,7 +100,7 @@ typename Apollonius_graph_2::Point_2
Apollonius_graph_2::
circumcenter(const Face_handle& f) const
{
- CGAL_triangulation_precondition (dimension()==2 || !is_infinite(f));
+ CGAL_precondition (dimension()==2 || !is_infinite(f));
return circumcenter(f->vertex(0)->site(),
f->vertex(1)->site(),
f->vertex(2)->site());
@@ -122,7 +122,7 @@ typename Apollonius_graph_2::Site_2
Apollonius_graph_2::
circumcircle(const Face_handle& f) const
{
- CGAL_triangulation_precondition (dimension()==2 || !is_infinite(f));
+ CGAL_precondition (dimension()==2 || !is_infinite(f));
return circumcircle(f->vertex(0)->site(),
f->vertex(1)->site(),
f->vertex(2)->site());
@@ -178,7 +178,7 @@ typename Gt::Object_2
Apollonius_graph_2::
dual(const Edge e) const
{
- CGAL_triangulation_precondition( !is_infinite(e) );
+ CGAL_precondition( !is_infinite(e) );
if ( dimension() == 1 ) {
Site_2 p = (e.first)->vertex(cw(e.second))->site();
@@ -207,16 +207,16 @@ dual(const Edge e) const
}
// only one of the adjacent faces is infinite
- CGAL_triangulation_assertion( is_infinite( e.first ) ||
+ CGAL_assertion( is_infinite( e.first ) ||
is_infinite( e.first->neighbor(e.second) )
);
- CGAL_triangulation_assertion( !(is_infinite( e.first ) &&
+ CGAL_assertion( !(is_infinite( e.first ) &&
is_infinite( e.first->neighbor(e.second) )
)
);
- CGAL_triangulation_assertion
+ CGAL_assertion
( is_infinite( e.first->vertex(e.second) ) ||
is_infinite( tds().mirror_vertex(e.first, e.second) ) );
@@ -246,7 +246,7 @@ primal(const Edge e) const
// typedef typename Geom_traits::Hyperbola_segment_2 Hyperbola_segment;
// typedef typename Geom_traits::Parabola_segment_2 Parabola_segment;
- // CGAL_triangulation_precondition( !is_infinite(e) );
+ // CGAL_precondition( !is_infinite(e) );
if ( number_of_vertices() != 2 ) {
if ( is_infinite(e) ) {
@@ -257,7 +257,7 @@ primal(const Edge e) const
Site_2 s = tds().mirror_vertex( e.first, e.second )->site();
ray = construct_Apollonius_primal_ray_2_object()(p,r,s);
} else {
- CGAL_triangulation_assertion
+ CGAL_assertion
( is_infinite( e.first->vertex(ccw(e.second)) ) );
Site_2 q = e.first->vertex( cw(e.second) )->site();
Site_2 r = e.first->vertex( e.second )->site();
@@ -317,11 +317,11 @@ typename Apollonius_graph_2::Edge
Apollonius_graph_2::
flip(Face_handle& f, int i)
{
- CGAL_triangulation_precondition ( f != Face_handle() );
- CGAL_triangulation_precondition (i == 0 || i == 1 || i == 2);
- CGAL_triangulation_precondition( dimension()==2 );
+ CGAL_precondition ( f != Face_handle() );
+ CGAL_precondition (i == 0 || i == 1 || i == 2);
+ CGAL_precondition( dimension()==2 );
- CGAL_triangulation_precondition( f->vertex(i) != tds().mirror_vertex(f,i) );
+ CGAL_precondition( f->vertex(i) != tds().mirror_vertex(f,i) );
this->_tds.flip(f, i);
@@ -383,7 +383,7 @@ void
Apollonius_graph_2::
remove_degree_2(Vertex_handle v)
{
- CGAL_triangulation_precondition( is_degree_2(v) );
+ CGAL_precondition( is_degree_2(v) );
this->_tds.remove_degree_2( v );
}
@@ -403,7 +403,7 @@ void
Apollonius_graph_2::
remove_degree_3(Vertex_handle v, Face_handle f)
{
- CGAL_triangulation_precondition( degree(v) == 3 );
+ CGAL_precondition( degree(v) == 3 );
this->_tds.remove_degree_3(v, f);
}
@@ -416,7 +416,7 @@ typename Apollonius_graph_2::Vertex_handle
Apollonius_graph_2::
insert_first(const Site_2& p)
{
- CGAL_triangulation_precondition(number_of_vertices() == 0);
+ CGAL_precondition(number_of_vertices() == 0);
Vertex_handle v = this->_tds.insert_second();
v->set_site(p);
return v;
@@ -428,7 +428,7 @@ typename Apollonius_graph_2::Vertex_handle
Apollonius_graph_2::
insert_second(const Site_2& p)
{
- CGAL_triangulation_precondition( number_of_vertices() == 1 );
+ CGAL_precondition( number_of_vertices() == 1 );
Vertex_handle vnew;
Vertex_handle v(finite_vertices_begin());
if ( is_hidden(v->site(), p) ) {
@@ -439,7 +439,7 @@ insert_second(const Site_2& p)
v->set_site(p);
vnew = v;
} else {
- CGAL_triangulation_precondition(number_of_vertices() == 1);
+ CGAL_precondition(number_of_vertices() == 1);
vnew = this->_tds.insert_dim_up(infinite_vertex(), true);
vnew->set_site(p);
// vnew = Delaunay_graph::insert_second(p);
@@ -453,7 +453,7 @@ typename Apollonius_graph_2::Vertex_handle
Apollonius_graph_2::
insert_third(const Site_2& p)
{
- CGAL_triangulation_precondition( number_of_vertices() == 2 );
+ CGAL_precondition( number_of_vertices() == 2 );
Face_handle f((*finite_edges_begin()).first);
Vertex_handle v1(f->vertex(0));
@@ -592,7 +592,7 @@ insert_third(const Site_2& p)
}
}
- // CGAL_triangulation_assertion( is_valid() );
+ // CGAL_assertion( is_valid() );
return v;
}
@@ -1752,8 +1752,8 @@ void
Apollonius_graph_2::
remove(Vertex_handle v)
{
- CGAL_triangulation_precondition( v != Vertex_handle() );
- CGAL_triangulation_precondition( !is_infinite(v) );
+ CGAL_precondition( v != Vertex_handle() );
+ CGAL_precondition( !is_infinite(v) );
// find a neighbor of v to use for point location of hidden sites to
// be re-inserted
@@ -1900,7 +1900,7 @@ remove_degree_d_vertex(Vertex_handle v)
CGAL_assertion( found );
CGAL_USE(found);
}
- CGAL_triangulation_precondition( degree(v) == 3 );
+ CGAL_precondition( degree(v) == 3 );
this->_tds.remove_degree_3( v, Face_handle() );
diff --git a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_hierarchy_2_impl.h b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_hierarchy_2_impl.h
index ba13844eb0e..a5369929afe 100644
--- a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_hierarchy_2_impl.h
+++ b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_hierarchy_2_impl.h
@@ -332,8 +332,8 @@ void
Apollonius_graph_hierarchy_2::
remove(Vertex_handle v)
{
- CGAL_triangulation_precondition( v != Vertex_handle());
- CGAL_triangulation_precondition( !is_infinite(v));
+ CGAL_precondition( v != Vertex_handle());
+ CGAL_precondition( !is_infinite(v));
// get the hidden circles
typename Apollonius_graph_base::Site_list wp_list;
diff --git a/Apollonius_graph_2/include/CGAL/Apollonius_graph_vertex_base_2.h b/Apollonius_graph_2/include/CGAL/Apollonius_graph_vertex_base_2.h
index c16c2f1903f..a1f6fc7158d 100644
--- a/Apollonius_graph_2/include/CGAL/Apollonius_graph_vertex_base_2.h
+++ b/Apollonius_graph_2/include/CGAL/Apollonius_graph_vertex_base_2.h
@@ -19,7 +19,6 @@
#include
#include
-#include
namespace CGAL {
diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementPainterOstream.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementPainterOstream.cpp
index bdc2c17f627..b470946cec0 100644
--- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementPainterOstream.cpp
+++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementPainterOstream.cpp
@@ -48,12 +48,10 @@ ArrangementPainterOstream>&
ArrangementPainterOstream>::
operator<<(const X_monotone_curve_2& curve)
{
- int cnt = 0;
for (typename X_monotone_curve_2::Subcurve_const_iterator it =
curve.subcurves_begin();
it != curve.subcurves_end(); ++it)
{
- cnt++;
this->painterOstream << *it;
}
@@ -200,7 +198,6 @@ ArrangementPainterOstreamfirst, p_curr->second);
@@ -208,7 +205,6 @@ ArrangementPainterOstreamqp->drawLine(p1, p2);
p_curr++;
p_next++;
- ++count;
} while (p_next != end_pts);
};
diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ColorItemEditor.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ColorItemEditor.cpp
index 2de4a0d6e28..ee1772a644b 100644
--- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ColorItemEditor.cpp
+++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ColorItemEditor.cpp
@@ -19,7 +19,7 @@
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
- ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+ ** will be met: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
@@ -31,7 +31,7 @@
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
- ** met: http://www.gnu.org/copyleft/gpl.html.
+ ** met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ColorItemEditor.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ColorItemEditor.h
index 13c6c13b06e..ea1a2ba7a47 100644
--- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ColorItemEditor.h
+++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ColorItemEditor.h
@@ -19,7 +19,7 @@
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
- ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+ ** will be met: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
@@ -31,7 +31,7 @@
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
- ** met: http://www.gnu.org/copyleft/gpl.html.
+ ** met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt
index 029b95fa637..ad570b18253 100644
--- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt
+++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt
@@ -1937,8 +1937,8 @@ perform a point-location query on the resulting arrangement. The query
point \f$q\f$ is drawn as a plus sign. The face that contains it is
drawn with a shaded texture. The program calls an instance of the
function template `print_arrangement_size()`, which prints
-quantitative measures of the arrangement; see \ref lst_paz "code
-example" for its listing in Section \ref aos_ssec-basic-arr_class.
+quantitative measures of the arrangement; see \ref lst_paz
+"code example" for its listing in Section \ref aos_ssec-basic-arr_class.
\cgalExample{Arrangement_on_surface_2/incremental_insertion.cpp}
diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_segment_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_segment_traits_2.h
index ce14843f935..3d7d3ab5826 100644
--- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_segment_traits_2.h
+++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_segment_traits_2.h
@@ -112,7 +112,7 @@ public:
typedef X_monotone_curve_2 Curve_2;
//! A functor that trims curves.
- Class Trim_2 {
+ class Trim_2 {
public:
//! \name Creation
//! @{
diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareYOnBoundary_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareYOnBoundary_2.h
index d19d83140cb..d01577defe1 100644
--- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareYOnBoundary_2.h
+++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareYOnBoundary_2.h
@@ -8,7 +8,6 @@ namespace ArrTraits {
* \cgalHasModel ArrangementClosedLeftTraits_2::Compare_y_on_boundary_2
* \cgalHasModel ArrangementClosedRightTraits_2::Compare_y_on_boundary_2
* \cgalHasModel ArrangementIdentifiedVerticalTraits_2::Compare_y_on_boundary_2
- * \cgalHasModel ArrangementOpenBoundaryTraits_2::Compare_y_on_boundary_2
* \cgalHasModel ArrangementSphericalBoundaryTraits_2::Compare_y_on_boundary_2
*/
class CompareYOnBoundary_2 {
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h
index f95817735da..5ad5f86b400 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h
@@ -316,7 +316,7 @@ _vertical_ray_shoot(const Point_2& p, bool shoot_up) const
// face) we check the isolated vertices inside the face to check whether there
// is an isolated vertex right above/below the query point.
//
-template
+template
typename Arr_trapezoid_ric_point_location::result_type
Arr_trapezoid_ric_point_location::
_check_isolated_for_vertical_ray_shoot (Halfedge_const_handle halfedge_found,
@@ -324,40 +324,36 @@ _check_isolated_for_vertical_ray_shoot (Halfedge_const_handle halfedge_found,
bool shoot_up,
const Td_map_item& tr) const
{
+ const auto* gt = this->arrangement()->geometry_traits();
const Comparison_result point_above_under = (shoot_up ? SMALLER : LARGER);
- typename Geometry_traits_2::Compare_x_2 compare_x =
- this->arrangement()->traits()->compare_x_2_object();
- typename Geometry_traits_2::Compare_xy_2 compare_xy =
- this->arrangement()->traits()->compare_xy_2_object();
- typename Geometry_traits_2::Compare_y_at_x_2 compare_y_at_x =
- this->arrangement()->traits()->compare_y_at_x_2_object();
+ auto compare_x = gt->compare_x_2_object();
+ auto compare_xy = gt->compare_xy_2_object();
+ auto compare_y_at_x = gt->compare_y_at_x_2_object();
- Isolated_vertex_const_iterator iso_verts_it;
- Vertex_const_handle closest_iso_v;
- const Vertex_const_handle invalid_v;
- const Halfedge_const_handle invalid_he;
- Face_const_handle face;
+ Vertex_const_handle closest_iso_v;
+ const Vertex_const_handle invalid_v;
+ const Halfedge_const_handle invalid_he;
// If the closest feature is a valid halfedge, take its incident face.
// Otherwise, take the unbounded face.
- if (halfedge_found == invalid_he)
- face = _get_unbounded_face(tr, p, All_sides_oblivious_category());
- else
- face = halfedge_found->face();
+ Face_const_handle face = (halfedge_found == invalid_he) ?
+ _get_unbounded_face(tr, p, All_sides_oblivious_category()) :
+ halfedge_found->face();
// Go over the isolated vertices in the face.
+ // The following statement pacifies MSVC. Without it the implicit conversion
+ // from the iterator to the corresponding handle fails!
+ Isolated_vertex_const_iterator iso_verts_it;
for (iso_verts_it = face->isolated_vertices_begin();
iso_verts_it != face->isolated_vertices_end(); ++iso_verts_it)
{
// The current isolated vertex should have the same x-coordinate as the
// query point in order to be below or above it.
- if (compare_x (p, iso_verts_it->point()) != EQUAL)
- continue;
+ if (compare_x (p, iso_verts_it->point()) != EQUAL) continue;
// Make sure the isolated vertex is above the query point (if we shoot up)
// or below it (if we shoot down).
- if (compare_xy (p, iso_verts_it->point()) != point_above_under)
- continue;
+ if (compare_xy (p, iso_verts_it->point()) != point_above_under) continue;
// Check if the current isolated vertex lies closer to the query point than
// the closest feature so far.
@@ -379,12 +375,10 @@ _check_isolated_for_vertical_ray_shoot (Halfedge_const_handle halfedge_found,
// If we found an isolated vertex above (or under) the query point, return
// a handle to this vertex.
- if (closest_iso_v != invalid_v)
- return make_result(closest_iso_v);
+ if (closest_iso_v != invalid_v) return make_result(closest_iso_v);
// If we are inside the unbounded face, return this face.
- if (halfedge_found == invalid_he)
- return make_result(face);
+ if (halfedge_found == invalid_he) return make_result(face);
// Return the halfedge lying above (or below) the query point.
return make_result(halfedge_found);
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h
index 7b2cc3ffd9b..dff6a89f9cf 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h
@@ -776,7 +776,7 @@ _is_in_connected_component (const Point_2& p,
//-----------------------------------------------------------------------------
// Find the first halfedge around a given target vertex, when going clockwise
// from "6 o'clock" around this vertex (when shooting up) or starting from
-// "12 o'clock (when shooting down).
+// "12 o'clock" (when shooting down).
//
template
typename Arr_walk_along_line_point_location::Halfedge_const_handle
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h
index ca5e8ce1447..dab9ffa9248 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h
@@ -1114,7 +1114,7 @@ public:
// model of this concept.
//
// The following implementation is inspired by
- // http://stackoverflow.com/a/11816999/1915421
+ // https://stackoverflow.com/a/11816999/1915421
template
struct Void {
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_walk_along_line_point_location.h b/Arrangement_on_surface_2/include/CGAL/Arr_walk_along_line_point_location.h
index 57f3acaf004..5824f23f425 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_walk_along_line_point_location.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_walk_along_line_point_location.h
@@ -183,7 +183,7 @@ protected:
/*!
* Find the first halfedge around a given target vertex, when going clockwise
* from "6 o'clock" around this vertex (when shooting up) or starting from
- * "12 o'clock (when shooting down).
+ * "12 o'clock" (when shooting down).
* \param v The given vertex.
* \param shoot_up If (true) we should start from "6 o'clock",
* if (false) we should start from "12 o'clock".
diff --git a/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream.h b/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream.h
index 0a89ec038a3..5fd87bc4e7b 100644
--- a/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream.h
+++ b/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream.h
@@ -164,7 +164,7 @@ enum Fig_depth
/*!
* \class A class for writing geometric objects in a FIG format (version 3.2).
- * For more details, see: http://www.xfig.org/userman/fig-format.html
+ * For more details, see: https://mcj.sourceforge.net/
*/
template
class Fig_stream
diff --git a/BGL/examples/BGL_LCC/normals_lcc.cpp b/BGL/examples/BGL_LCC/normals_lcc.cpp
index c5d1e671ff0..da1177a7062 100644
--- a/BGL/examples/BGL_LCC/normals_lcc.cpp
+++ b/BGL/examples/BGL_LCC/normals_lcc.cpp
@@ -74,7 +74,7 @@ int main(int argc, char** argv)
// Ad hoc property_map to store normals. Face_index_map is used to
// map face_descriptors to a contiguous range of indices. See
- // http://www.boost.org/libs/property_map/doc/vector_property_map.html
+ // https://www.boost.org/libs/property_map/doc/vector_property_map.html
// for details.
boost::vector_property_map
normals(static_cast(num_faces(lcc)), get(CGAL::face_index, lcc));
diff --git a/BGL/examples/BGL_polyhedron_3/normals.cpp b/BGL/examples/BGL_polyhedron_3/normals.cpp
index 9a67ba42b2d..711800cb8ab 100644
--- a/BGL/examples/BGL_polyhedron_3/normals.cpp
+++ b/BGL/examples/BGL_polyhedron_3/normals.cpp
@@ -79,7 +79,7 @@ int main(int argc, char** argv)
// Ad hoc property_map to store normals. Face_index_map is used to
// map face_descriptors to a contiguous range of indices. See
- // http://www.boost.org/libs/property_map/doc/vector_property_map.html
+ // https://www.boost.org/libs/property_map/doc/vector_property_map.html
// for details.
boost::vector_property_map
normals(static_cast(num_faces(P)), get(CGAL::face_index, P));
diff --git a/BGL/include/CGAL/boost/graph/Euler_operations.h b/BGL/include/CGAL/boost/graph/Euler_operations.h
index ca9adb2d294..30d481f8cdf 100644
--- a/BGL/include/CGAL/boost/graph/Euler_operations.h
+++ b/BGL/include/CGAL/boost/graph/Euler_operations.h
@@ -38,11 +38,12 @@ typename boost::graph_traits::halfedge_descriptor
join_face(typename boost::graph_traits::halfedge_descriptor h,
Graph& g)
{
- typedef typename boost::graph_traits Traits;
+ typedef typename boost::graph_traits Traits;
typedef typename Traits::halfedge_descriptor halfedge_descriptor;
typedef typename Traits::face_descriptor face_descriptor;
+ CGAL_precondition(is_valid_halfedge_descriptor(h, g));
halfedge_descriptor hop = opposite(h,g);
halfedge_descriptor hprev = prev(h, g), gprev = prev(hop, g);
@@ -73,17 +74,17 @@ join_face(typename boost::graph_traits::halfedge_descriptor h,
remove_edge(edge(h, g), g);
return hprev;
-
}
+
} // namespace EulerImpl
/// \endcond
- namespace Euler {
+namespace Euler {
+
/// \ingroup PkgBGLEulerOperations
/// @{
-
/**
* joins the two vertices incident to `h`, (that is `source(h, g)` and
* `target(h, g)`) and removes `source(h,g)`. Returns the predecessor
@@ -117,6 +118,8 @@ join_vertex(typename boost::graph_traits::halfedge_descriptor h,
typedef typename Traits::vertex_descriptor vertex_descriptor;
typedef Halfedge_around_target_iterator halfedge_around_vertex_iterator;
+ CGAL_precondition(is_valid_halfedge_descriptor(h, g));
+
halfedge_descriptor hop = opposite(h, g)
, hprev = prev(hop, g)
, gprev = prev(h, g)
@@ -191,8 +194,9 @@ split_vertex(typename boost::graph_traits::halfedge_descriptor h1,
typename boost::graph_traits::halfedge_descriptor h2,
Graph& g)
{
- CGAL_assertion(h1 != h2);
- CGAL_assertion(target(h1, g) == target(h2, g));
+ CGAL_precondition(is_valid_halfedge_descriptor(h1, g) && is_valid_halfedge_descriptor(h2, g));
+ CGAL_precondition(h1 != h2);
+ CGAL_precondition(target(h1, g) == target(h2, g));
typename boost::graph_traits::halfedge_descriptor
hnew = halfedge(add_edge(g), g),
@@ -226,8 +230,11 @@ split_vertex(typename boost::graph_traits::halfedge_descriptor h1,
template
typename boost::graph_traits::halfedge_descriptor
split_edge(typename boost::graph_traits::halfedge_descriptor h, Graph& g)
-{ return opposite(split_vertex(prev(h,g), opposite(h,g),g), g); }
+{
+ CGAL_precondition(is_valid_halfedge_descriptor(h, g));
+ return opposite(split_vertex(prev(h,g), opposite(h,g),g), g);
+}
/**
* joins the two faces incident to `h` and `opposite(h,g)`.
@@ -260,8 +267,6 @@ join_face(typename boost::graph_traits::halfedge_descriptor h,
return EulerImpl::join_face(h,g);
}
-
-
/**
* splits the face incident to `h1` and `h2`. Creates the opposite
* halfedges `h3` and `h4`, such that `next(h1,g) == h3` and `next(h2,g) == h4`.
@@ -290,6 +295,12 @@ split_face(typename boost::graph_traits::halfedge_descriptor h1,
typedef typename boost::graph_traits Traits;
typedef typename Traits::halfedge_descriptor halfedge_descriptor;
typedef typename Traits::face_descriptor face_descriptor;
+
+ CGAL_precondition(is_valid_halfedge_descriptor(h1, g) && is_valid_halfedge_descriptor(h2, g));
+ CGAL_precondition(h1 != h2);
+ CGAL_precondition(face(h1, g) == face(h2, g));
+ CGAL_precondition(next(h1, g) != h2 && next(h2, g) != h1);
+
halfedge_descriptor hnew = halfedge(add_edge(g), g);
face_descriptor fnew = add_face(g);
internal::insert_tip( hnew, h2, g);
@@ -298,6 +309,7 @@ split_face(typename boost::graph_traits::halfedge_descriptor h1,
internal::set_face_in_face_loop(opposite(hnew,g), fnew, g);
set_halfedge(face(hnew,g), hnew, g);
set_halfedge(face(opposite(hnew,g),g), opposite(hnew,g), g);
+
return hnew;
}
@@ -327,7 +339,9 @@ join_loop(typename boost::graph_traits::halfedge_descriptor h1,
typedef typename boost::graph_traits Traits;
typedef typename Traits::halfedge_descriptor halfedge_descriptor;
+ CGAL_precondition(is_valid_halfedge_descriptor(h1, g) && is_valid_halfedge_descriptor(h2, g));
CGAL_precondition( is_border(h1,g) || face(h1, g) != face(h2, g));
+
if (! is_border(h1,g))
remove_face(face(h1, g), g);
if (! is_border(h2,g))
@@ -401,13 +415,18 @@ split_loop(typename boost::graph_traits::halfedge_descriptor h1,
typedef typename Traits::halfedge_descriptor halfedge_descriptor;
typedef typename Traits::face_descriptor face_descriptor;
+ CGAL_precondition(is_valid_halfedge_descriptor(h1, g) &&
+ is_valid_halfedge_descriptor(h2, g) &&
+ is_valid_halfedge_descriptor(h3, g));
+
halfedge_descriptor h = h1, i = h2, j = h3;
- CGAL_precondition( h != i);
- CGAL_precondition( h != j);
- CGAL_precondition( i != j);
- CGAL_precondition( target(h,g) == target(opposite(i,g),g));
- CGAL_precondition( target(i,g) == target(opposite(j,g),g));
- CGAL_precondition( target(j,g) == target(opposite(h,g),g));
+ CGAL_precondition(h != i);
+ CGAL_precondition(h != j);
+ CGAL_precondition(i != j);
+ CGAL_precondition(target(h,g) == target(opposite(i,g),g));
+ CGAL_precondition(target(i,g) == target(opposite(j,g),g));
+ CGAL_precondition(target(j,g) == target(opposite(h,g),g));
+
// Create a copy of the triangle.
halfedge_descriptor hnew = internal::copy(h,g);
halfedge_descriptor inew = internal::copy(i,g);
@@ -505,7 +524,9 @@ void remove_face(typename boost::graph_traits::halfedge_descriptor h,
typedef typename Traits::halfedge_descriptor halfedge_descriptor;
typedef typename Traits::face_descriptor face_descriptor;
+ CGAL_precondition(is_valid_halfedge_descriptor(h, g));
CGAL_precondition(! is_border(h,g));
+
face_descriptor f = face(h, g);
halfedge_descriptor end = h;
@@ -551,13 +572,15 @@ add_edge(typename boost::graph_traits::vertex_descriptor s,
typename boost::graph_traits::vertex_descriptor t,
Graph& g)
{
+ CGAL_precondition(is_valid_vertex_descriptor(s, g) && is_valid_vertex_descriptor(t, g));
+
typename boost::graph_traits::edge_descriptor e = add_edge(g);
set_target(halfedge(e, g), t, g);
set_target(opposite(halfedge(e, g), g), s, g);
+
return e;
}
-
/**
* checks whether a new face defined by a range of vertices (identified by their descriptors,
* `boost::graph_traits::%vertex_descriptor`) can be added.
@@ -568,6 +591,9 @@ bool can_add_face(const VertexRange& vrange, const PMesh& sm)
typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor;
typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor;
+ CGAL_precondition_code(for(vertex_descriptor v : vrange))
+ CGAL_precondition(is_valid_vertex_descriptor(v, sm));
+
std::vector::vertex_descriptor> face(vrange.begin(), vrange.end());
std::size_t N = face.size();
@@ -697,6 +723,9 @@ add_face(const VertexRange& vr, Graph& g)
typedef typename boost::graph_traits::face_descriptor face_descriptor;
typedef typename boost::graph_traits::edge_descriptor edge_descriptor;
+ CGAL_precondition_code(for(vertex_descriptor v : vr))
+ CGAL_precondition(is_valid_vertex_descriptor(v, g));
+
std::vector vertices(vr.begin(), vr.end()); // quick and dirty copy
unsigned int n = (unsigned int)vertices.size();
//check that every vertex is unique
@@ -1115,7 +1144,9 @@ void make_hole(typename boost::graph_traits::halfedge_descriptor h,
typedef typename Traits::face_descriptor face_descriptor;
typedef Halfedge_around_face_iterator halfedge_around_face_iterator;
- CGAL_precondition(! is_border(h,g));
+ CGAL_precondition(is_valid_halfedge_descriptor(h, g));
+ CGAL_precondition(!is_border(h, g));
+
face_descriptor fd = face(h, g);
halfedge_around_face_iterator hafib, hafie;
for(boost::tie(hafib, hafie) = halfedges_around_face(h, g);
@@ -1139,6 +1170,9 @@ void fill_hole(typename boost::graph_traits::halfedge_descriptor h,
typedef typename Traits::face_descriptor face_descriptor;
typedef typename Traits::halfedge_descriptor halfedge_descriptor;
+ CGAL_precondition(is_valid_halfedge_descriptor(h, g));
+ CGAL_precondition(is_border(h, g));
+
face_descriptor f = add_face(g);
for(halfedge_descriptor hd : halfedges_around_face(h,g)){
set_face(hd, f,g);
@@ -1179,6 +1213,9 @@ add_center_vertex(typename boost::graph_traits::halfedge_descriptor h,
typedef typename Traits::halfedge_descriptor halfedge_descriptor;
typedef typename Traits::face_descriptor face_descriptor;
+ CGAL_precondition(is_valid_halfedge_descriptor(h, g));
+ CGAL_precondition(!is_border(h, g));
+
halfedge_descriptor hnew = halfedge(add_edge(g),g);
vertex_descriptor vnew = add_vertex(g);
internal::close_tip(hnew, vnew, g);
@@ -1236,6 +1273,8 @@ remove_center_vertex(typename boost::graph_traits::halfedge_descriptor h,
typedef typename boost::graph_traits Traits;
typedef typename Traits::halfedge_descriptor halfedge_descriptor;
+ CGAL_precondition(is_valid_halfedge_descriptor(h, g));
+
// h points to the vertex that gets removed
halfedge_descriptor h2 = opposite(next(h, g), g);
halfedge_descriptor hret = prev(h, g);
@@ -1283,14 +1322,28 @@ add_vertex_and_face_to_border(typename boost::graph_traits::halfedge_desc
typename boost::graph_traits::halfedge_descriptor h2,
Graph& g)
{
- typename boost::graph_traits::vertex_descriptor v = add_vertex(g);
- typename boost::graph_traits::face_descriptor f = add_face(g);
- typename boost::graph_traits::edge_descriptor e1 = add_edge(g);
- typename boost::graph_traits::edge_descriptor e2 = add_edge(g);
- typename boost::graph_traits::halfedge_descriptor he1= halfedge(e1, g);
- typename boost::graph_traits::halfedge_descriptor he2= halfedge(e2, g);
- typename boost::graph_traits::halfedge_descriptor ohe1= opposite(he1, g);
- typename boost::graph_traits::halfedge_descriptor ohe2= opposite(he2, g);
+ typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor;
+ typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor;
+ typedef typename boost::graph_traits::edge_descriptor edge_descriptor;
+ typedef typename boost::graph_traits::face_descriptor face_descriptor;
+
+ CGAL_precondition(is_valid_halfedge_descriptor(h1, g) && is_valid_halfedge_descriptor(h2, g));
+ CGAL_precondition(is_border(h1, g) && is_border(h2, g));
+ CGAL_precondition(h1 != h2);
+
+ CGAL_precondition_code(halfedge_descriptor h = h1;)
+ CGAL_precondition_code(const halfedge_descriptor done = h1;)
+ CGAL_precondition_code(do { if(h == h2) break; h = next(h, g); } while(h != done);)
+ CGAL_precondition(h != done);
+
+ vertex_descriptor v = add_vertex(g);
+ face_descriptor f = add_face(g);
+ edge_descriptor e1 = add_edge(g);
+ edge_descriptor e2 = add_edge(g);
+ halfedge_descriptor he1 = halfedge(e1, g);
+ halfedge_descriptor he2 = halfedge(e2, g);
+ halfedge_descriptor ohe1= opposite(he1, g);
+ halfedge_descriptor ohe2= opposite(he2, g);
set_next(ohe1, next(h1,g),g);
set_next(h1,he1,g);
@@ -1340,6 +1393,7 @@ add_face_to_border(typename boost::graph_traits::halfedge_descriptor h1,
typename boost::graph_traits::halfedge_descriptor h2,
Graph& g)
{
+ CGAL_precondition(is_valid_halfedge_descriptor(h1, g) && is_valid_halfedge_descriptor(h2, g));
CGAL_precondition(is_border(h1,g) == true);
CGAL_precondition(is_border(h2,g) == true);
CGAL_precondition(h1 != h2);
@@ -1409,6 +1463,8 @@ collapse_edge(typename boost::graph_traits::edge_descriptor e,
typedef typename Traits::vertex_descriptor vertex_descriptor;
typedef typename Traits::halfedge_descriptor halfedge_descriptor;
+ CGAL_precondition(is_valid_edge_descriptor(e, g));
+
halfedge_descriptor pq = halfedge(e,g);
halfedge_descriptor qp = opposite(pq, g);
halfedge_descriptor pt = opposite(prev(pq, g), g);
@@ -1520,15 +1576,17 @@ collapse_edge(typename boost::graph_traits::edge_descriptor e,
template
typename boost::graph_traits::vertex_descriptor
collapse_edge(typename boost::graph_traits::edge_descriptor v0v1,
- Graph& g
- , EdgeIsConstrainedMap Edge_is_constrained_map)
+ Graph& g,
+ EdgeIsConstrainedMap Edge_is_constrained_map)
{
typedef boost::graph_traits< Graph > Traits;
typedef typename Traits::vertex_descriptor vertex_descriptor;
typedef typename Traits::halfedge_descriptor halfedge_descriptor;
+ CGAL_precondition(is_valid_edge_descriptor(v0v1, g));
+ CGAL_precondition(!get(Edge_is_constrained_map, v0v1));
+
halfedge_descriptor pq = halfedge(v0v1,g);
- CGAL_assertion( !get(Edge_is_constrained_map,v0v1) );
halfedge_descriptor qp = opposite(pq,g);
halfedge_descriptor pt = opposite(prev(pq,g),g);
@@ -1666,6 +1724,8 @@ flip_edge(typename boost::graph_traits::halfedge_descriptor h,
typedef typename Traits::halfedge_descriptor halfedge_descriptor;
typedef typename Traits::face_descriptor face_descriptor;
+ CGAL_precondition(is_valid_halfedge_descriptor(h, g));
+
vertex_descriptor s = source(h,g);
vertex_descriptor t = target(h,g);
halfedge_descriptor nh = next(h,g), nnh = next(nh,g), oh = opposite(h,g), noh = next(oh,g), nnoh = next(noh,g);
@@ -1706,6 +1766,8 @@ does_satisfy_link_condition(typename boost::graph_traits::edge_descriptor
typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor;
typedef CGAL::Halfedge_around_source_iterator out_edge_iterator;
+ CGAL_precondition(is_valid_edge_descriptor(e, g));
+
halfedge_descriptor v0_v1 = halfedge(e,g);
halfedge_descriptor v1_v0 = opposite(v0_v1,g);
@@ -1798,9 +1860,8 @@ does_satisfy_link_condition(typename boost::graph_traits::edge_descriptor
#ifndef CGAL_NO_DEPRECATED_CODE
/// \cond SKIP_IN_MANUAL
template
-bool
- satisfies_link_condition(typename boost::graph_traits::edge_descriptor e,
- const Graph& g)
+bool satisfies_link_condition(typename boost::graph_traits::edge_descriptor e,
+ const Graph& g)
{
return does_satisfy_link_condition(e, g);
}
@@ -1808,9 +1869,8 @@ bool
#endif
/// @}
-} // CGAL
-
-} // CGAL
+} // namespace Euler
+} // namespace CGAL
#endif /* CGAL_EULER_OPERATIONS_H */
diff --git a/BGL/include/CGAL/boost/graph/IO/Tds_2_off.h b/BGL/include/CGAL/boost/graph/IO/Tds_2_off.h
index 7f7d663daa4..1f893ffb43c 100644
--- a/BGL/include/CGAL/boost/graph/IO/Tds_2_off.h
+++ b/BGL/include/CGAL/boost/graph/IO/Tds_2_off.h
@@ -109,7 +109,7 @@ off_file_input( std::istream& is, Triangulation_data_structure_2& tds, bo
tds.set_adjacency(fn, 2, inf_edge_map);
edge_map.erase(edge_map.begin());
}
- CGAL_triangulation_assertion(inf_edge_map.empty());
+ CGAL_assertion(inf_edge_map.empty());
}
diff --git a/BGL/include/CGAL/boost/graph/generators.h b/BGL/include/CGAL/boost/graph/generators.h
index d49a53fd814..a4e91f177fb 100644
--- a/BGL/include/CGAL/boost/graph/generators.h
+++ b/BGL/include/CGAL/boost/graph/generators.h
@@ -195,6 +195,11 @@ make_quad(typename boost::graph_traits::vertex_descriptor v0,
typename boost::graph_traits::vertex_descriptor v3,
Graph& g)
{
+ CGAL_precondition(is_valid_vertex_descriptor(v0, g) &&
+ is_valid_vertex_descriptor(v1, g) &&
+ is_valid_vertex_descriptor(v2, g) &&
+ is_valid_vertex_descriptor(v3, g));
+
typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor;
typedef typename boost::graph_traits::face_descriptor face_descriptor;
halfedge_descriptor h0 = halfedge(add_edge(g), g);
diff --git a/BGL/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h b/BGL/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h
index a6e5bfe287d..5127f692a24 100644
--- a/BGL/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h
+++ b/BGL/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h
@@ -11,7 +11,7 @@
#ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_POLYMESH_ARRAYKERNELT_H
#define CGAL_BOOST_GRAPH_GRAPH_TRAITS_POLYMESH_ARRAYKERNELT_H
-// http://openmesh.org/Documentation/OpenMesh-Doc-Latest/classOpenMesh_1_1Concepts_1_1KernelT.html
+// https://www.graphics.rwth-aachen.de/media/openmesh_static/Documentations/OpenMesh-Doc-Latest/a02182.html
#include
#include
#include
diff --git a/BGL/include/CGAL/boost/graph/graph_traits_TriMesh_ArrayKernelT.h b/BGL/include/CGAL/boost/graph/graph_traits_TriMesh_ArrayKernelT.h
index 863dc50b075..512a4991e76 100644
--- a/BGL/include/CGAL/boost/graph/graph_traits_TriMesh_ArrayKernelT.h
+++ b/BGL/include/CGAL/boost/graph/graph_traits_TriMesh_ArrayKernelT.h
@@ -11,7 +11,7 @@
#ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_TRIMESH_ARRAYKERNELT_H
#define CGAL_BOOST_GRAPH_GRAPH_TRAITS_TRIMESH_ARRAYKERNELT_H
-// http://openmesh.org/Documentation/OpenMesh-Doc-Latest/classOpenMesh_1_1Concepts_1_1KernelT.html
+// https://www.graphics.rwth-aachen.de/media/openmesh_static/Documentations/OpenMesh-Doc-Latest/a02182.html
#include
#include
#include
diff --git a/BGL/include/CGAL/boost/graph/helpers.h b/BGL/include/CGAL/boost/graph/helpers.h
index 0448870f6ed..21644ebf18f 100644
--- a/BGL/include/CGAL/boost/graph/helpers.h
+++ b/BGL/include/CGAL/boost/graph/helpers.h
@@ -15,6 +15,7 @@
#include
#include
#include
+#include
#include
#include
@@ -22,7 +23,6 @@
#include
-
namespace CGAL {
/*!
@@ -75,277 +75,244 @@ is_border(typename boost::graph_traits::vertex_descriptor vd,
return boost::optional::halfedge_descriptor>();
}
+namespace BGL {
- /*!
- \ingroup PkgBGLHelperFct
- returns `true` if there are no border edges.
- */
-template
-bool is_closed(const FaceGraph& g)
+template
+bool is_valid_vertex_descriptor(typename boost::graph_traits::vertex_descriptor v,
+ const Graph& g,
+ const bool verb = false)
{
- typedef typename boost::graph_traits