diff --git a/Polyhedron/demo/Polyhedron/include/CGAL/compute_normal.h b/Polyhedron/demo/Polyhedron/include/CGAL/compute_normal.h index 3437332ab75..61cbf051d3c 100644 --- a/Polyhedron/demo/Polyhedron/include/CGAL/compute_normal.h +++ b/Polyhedron/demo/Polyhedron/include/CGAL/compute_normal.h @@ -16,7 +16,9 @@ typename Kernel::Vector_3 compute_facet_normal(const Facet& f) const Point& curr = he->vertex()->point(); const Point& next = he->next()->vertex()->point(); Vector n = CGAL::cross_product(next-curr,prev-curr); - normal = normal + (n / std::sqrt(n*n)); + if((n*n) > 0.000000001){ + normal = normal + (n / std::sqrt(n*n)); + } } return normal / std::sqrt(normal * normal); }