How to understand the operation causes non-robust results in CGAL?

73 views Asked by At

For the performance concerns I am using exact predicates inexact constructions to compute and compare my distance-based operations. However, if the result causes inaccuracy, I want to repeat the same operations by using exact predicates exact constructions. How can I understand there occurred an inaccurate operation? Does CGAL::Precondition_exception work? For instance I plan to the followings in a try block:

  • Compute the point-plane distance by using CGAL::squared_distance() method with inexact constructions
  • Compare the resulting CGAL::Lazy_exact_nt<boost::multiprecision::mpq_rational> values Then if there is thrown a CGAL::Precondition_exception exception, I want to repeat the same steps with exact constructions.

Is this a healthy/robust approach?

0

There are 0 answers