From 03b087f6f45e21d09a1fb815c8c107d27a6c9f1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 4 Jun 2015 14:27:42 +0200 Subject: [PATCH] increase the precision of the output when it is not precise enough --- .../include/CGAL/intersection_of_Polyhedra_3.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Operations_on_polyhedra/include/CGAL/intersection_of_Polyhedra_3.h b/Operations_on_polyhedra/include/CGAL/intersection_of_Polyhedra_3.h index 2d6ddeee48a..c05daa05a50 100644 --- a/Operations_on_polyhedra/include/CGAL/intersection_of_Polyhedra_3.h +++ b/Operations_on_polyhedra/include/CGAL/intersection_of_Polyhedra_3.h @@ -656,13 +656,11 @@ namespace internal_IOP{ size_t size() const {return enodes.size();} - void add_new_node(Halfedge_handle edge,Facet_handle facet) - { - enodes.push_back(compute_triangle_segment_intersection_point(edge,facet,ek) ); - inodes.push_back( exact_to_interval(enodes.back()) ); - } - void add_new_node(const Exact_kernel::Point_3& p){ + const Ikernel::Point_3& p_approx=p.approx(); + if ( !has_smaller_relative_precision(p_approx.x(),Lazy_exact_nt::get_relative_precision_of_to_double()) || + !has_smaller_relative_precision(p_approx.y(),Lazy_exact_nt::get_relative_precision_of_to_double()) || + !has_smaller_relative_precision(p_approx.z(),Lazy_exact_nt::get_relative_precision_of_to_double()) ) p.exact(); enodes.push_back(p); inodes.push_back( exact_to_interval(p) ); }