mirror of https://github.com/CGAL/cgal
fix the uncatchable bug with spheres
This commit is contained in:
parent
5767aad9b3
commit
3ccb377f14
|
|
@ -638,7 +638,9 @@ namespace CGAL {
|
|||
FT get_x(const Point_3& p) const { return m_traits.compute_x_3_object()(p); }
|
||||
FT get_y(const Point_3& p) const { return m_traits.compute_y_3_object()(p); }
|
||||
FT get_z(const Point_3& p) const { return m_traits.compute_z_3_object()(p); }
|
||||
|
||||
|
||||
Vector_3 constr_vec() const
|
||||
{ return m_traits.construct_vector_3_object()(NULL_VECTOR); }
|
||||
Vector_3 constr_vec(const Point_3& p, const Point_3& q) const
|
||||
{ return m_traits.construct_vector_3_object()(p, q); }
|
||||
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ namespace CGAL {
|
|||
FT &cluster_epsilon,
|
||||
FT min[2],
|
||||
FT max[2]) const {
|
||||
Vector_3 axis;
|
||||
Vector_3 axis = this->constr_vec();
|
||||
FT rad = radius();
|
||||
// Take average normal as axis
|
||||
for (std::size_t i = 0;i<indices.size();i++)
|
||||
|
|
@ -320,6 +320,7 @@ namespace CGAL {
|
|||
FT phi = atan2(this->scalar_pdct(vec, d2), this->scalar_pdct(vec, d1));
|
||||
FT x = FT(0), y = FT(0);
|
||||
concentric_mapping(phi, proj, rad, x, y);
|
||||
CGAL_assertion( x==x && y==y); // check not nan's
|
||||
|
||||
min[0] = max[0] = x;
|
||||
min[1] = max[1] = y;
|
||||
|
|
@ -334,6 +335,7 @@ namespace CGAL {
|
|||
phi = atan2(this->scalar_pdct(vec, d2), this->scalar_pdct(vec, d1));
|
||||
|
||||
concentric_mapping(phi, proj, rad, x, y);
|
||||
CGAL_assertion( x==x && y==y); // check not nan's
|
||||
|
||||
min[0] = (std::min<FT>)(min[0], x);
|
||||
max[0] = (std::max<FT>)(max[0], x);
|
||||
|
|
|
|||
Loading…
Reference in New Issue