mirror of https://github.com/CGAL/cgal
Use int to count number of edges, since we can have negative numbers.
This commit is contained in:
parent
a211e558ee
commit
32e5d1c788
|
|
@ -312,7 +312,7 @@ namespace CGAL {
|
||||||
Path_on_surface<CMap_for_surface_mesh_curve_topology>
|
Path_on_surface<CMap_for_surface_mesh_curve_topology>
|
||||||
pt=transform_original_path_into_quad_surface(p);
|
pt=transform_original_path_into_quad_surface(p);
|
||||||
|
|
||||||
std::size_t a, b;
|
int a, b;
|
||||||
count_edges_of_path_on_torus(pt, a, b);
|
count_edges_of_path_on_torus(pt, a, b);
|
||||||
res=(a==0 && b==0);
|
res=(a==0 && b==0);
|
||||||
}
|
}
|
||||||
|
|
@ -367,7 +367,7 @@ namespace CGAL {
|
||||||
Path_on_surface<CMap_for_surface_mesh_curve_topology>
|
Path_on_surface<CMap_for_surface_mesh_curve_topology>
|
||||||
pt2=transform_original_path_into_quad_surface(p2);
|
pt2=transform_original_path_into_quad_surface(p2);
|
||||||
|
|
||||||
std::size_t a1, a2, b1, b2;
|
int a1, a2, b1, b2;
|
||||||
count_edges_of_path_on_torus(pt1, a1, b1);
|
count_edges_of_path_on_torus(pt1, a1, b1);
|
||||||
count_edges_of_path_on_torus(pt2, a2, b2);
|
count_edges_of_path_on_torus(pt2, a2, b2);
|
||||||
res=(a1==a2 && b1==b2);
|
res=(a1==a2 && b1==b2);
|
||||||
|
|
@ -453,7 +453,7 @@ namespace CGAL {
|
||||||
protected:
|
protected:
|
||||||
void count_edges_of_path_on_torus
|
void count_edges_of_path_on_torus
|
||||||
(const Path_on_surface<CMap_for_surface_mesh_curve_topology>& path,
|
(const Path_on_surface<CMap_for_surface_mesh_curve_topology>& path,
|
||||||
std::size_t& a, std::size_t& b) const
|
int& a, int& b) const
|
||||||
{
|
{
|
||||||
Dart_const_handle dha=m_map.darts().begin();
|
Dart_const_handle dha=m_map.darts().begin();
|
||||||
if (dha>m_map.template beta<2>(dha)) { dha=m_map.template beta<2>(dha); }
|
if (dha>m_map.template beta<2>(dha)) { dha=m_map.template beta<2>(dha); }
|
||||||
|
|
@ -471,8 +471,7 @@ namespace CGAL {
|
||||||
if (dha<dhb) { std::swap(dha, dhb); }
|
if (dha<dhb) { std::swap(dha, dhb); }
|
||||||
|
|
||||||
a=0; b=0;
|
a=0; b=0;
|
||||||
|
for (std::size_t i=0; i<path.length(); ++i)
|
||||||
for (int i=0; i<path.length(); ++i)
|
|
||||||
{
|
{
|
||||||
if (path[i]==dha) { ++a; }
|
if (path[i]==dha) { ++a; }
|
||||||
else if (path[i]==m_map.template beta<2>(dha)) { --a; }
|
else if (path[i]==m_map.template beta<2>(dha)) { --a; }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue