Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Polyhedron_3 I/O problem

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Polyhedron_3 I/O problem


Chronological Thread 
  • From: Peter Hachenberger <>
  • To:
  • Subject: Re: [cgal-discuss] Polyhedron_3 I/O problem
  • Date: Wed, 16 Jul 2008 11:25:26 +0200
  • Importance: Normal

Hi Joe,

that sounds like unwanted behavior. Can you send me some example file and tell me what the difference is between how it looks like and how it should look like?

Peter

-----"Joe C" wrote: -----

To:
From: "Joe C"
Date: 07/16/2008 01:56AM
cc: "Joe C"
Subject: [cgal-discuss] Polyhedron_3 I/O problem

Hi, everyone,

I am testing a simple I/O function of Polyhedron_3. I found that the output has different results from the input. Here is the pseudo code:

// a polyhedron
Polyhedron_3 poly;

// some construction work, not listed....

// test closeness and validity before output
poly.is_closed(); // true
poly.is_valid(); // true

// output
std::ofstream SaveFile("output.off");
SaveFile << poly;
SaveFile.close();

// read in output
poly.clear();
OpenFile.open("output.off");
OpenFile >> poly;
OpenFile.close();

// test closeness and validity after output
poly.is_closed(); // true
poly.is_valid(); // false, different from original one

Notice that the polyhedron "poly" after reading in the output is no longer valid.

Is this CGAL bug or am I missing something here ? My guess is that somehow it messed up because of some numerical problem. I am using Exact_predicates_exact_constructions_kernel.

P.S. if I read in some ".off" model into Polydedron_3, do I lose the original validity of the model as well?

Thanks.
Joe








Archive powered by MHonArc 2.6.16.

Top of Page