Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Gmpz constructed from non-integer double value

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Gmpz constructed from non-integer double value


Chronological Thread 
  • From: Stefan Schirra <>
  • To:
  • Subject: Re: [cgal-discuss] Gmpz constructed from non-integer double value
  • Date: Thu, 03 Jun 2010 10:41:18 +0200

Jianfei Liu wrote:
I am reading a simple .off file and traslate it from polyhedron to Nef
polyhedron, but failed with an error:Gmpz constructed from non-integer double
value.

The error message says it all: 0.256 is not an integer, whereas Gmpz is an integer-type. You cannot convert arbitrary floats to this type. Only floats representing integral values can be converted.

I noticed somebody says it is a bug for older CGAL, however it seems still
existing for the newest version 3.6.
OFF
4 4 0

0 0 0.256
1 0 0
0 1 0
0 0 1

3 0 2 1
3 0 1 3 3 0 3 2
3 1 2 3

The problem is caused by 0.256 in the above file.

Multiply your coordinates by 1000 ;-)



-- Stefan



Archive powered by MHonArc 2.6.16.

Top of Page