Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Why do the OFF_to_nef_3 take so much time?

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Why do the OFF_to_nef_3 take so much time?


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Why do the OFF_to_nef_3 take so much time?
  • Date: Sat, 14 Mar 2015 11:07:50 +0100
  • Organization: GeometryFactory

The pb comes from the fact that a point from the homogeneous kernel is
read from a stream as x y z w.

That is if the points in the off are 3 doubles they cannot be
interpreted as an homogeneous point.

Is there any reason why you need this kernel rather than CGAL::Exact_predicates_exact_constructions_kernel?

Sebastien.

On 03/13/2015 02:32 PM, KHartmann wrote:
Hi Sebastion,

Could you tell me how you have defined "Kernel" in your sample code (shown
at bottom)?

When I define it as CGAL::Homogeneous<CGAL::Gmpz>, I get thousands of
run-time warnings telling me that the data being read-in is "double" when it
should be "integer":
----------------------------------------------------------------------
Line : 102
Explanation: Gmpz constructed from non-integer double value
Refer to the bug-reporting instructions at
http://www.cgal.org/bug_report.html
CGAL warning: check violation!
Expression : is_integer(d)
-----------------------------------------------------------------------

And then eventually the program crashes.

When I use any other type, compilation fails.
(CGAL::Gmpzf, CGAL::Gmpfr...)

My test data is "s.off" in this location:

https://docs.google.com/file/d/0B4PDrM6_sr2UdzFJYTZYOWdTb2VJTkp5WmVuXzAxdw/edit

Thanks,
Kevin Hartmann

------- Sebastion's sample code ------------------
#include <CGAL/IO/Polyhedron_iostream.h>

std::ofstream file("myoff.off");
Polyhedron_3<Kernel> P;
file >> P;

Nef_polyhedron_3<Kernel> nef(P);
-----------------------------------------------

(ofstream should be ifstream)




--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Why-do-the-OFF-to-nef-3-take-so-much-time-tp4440642p4660580.html
Sent from the cgal-discuss mailing list archive at Nabble.com.





Archive powered by MHonArc 2.6.18.

Top of Page