Skip to Content.
Sympa Menu

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

Subject: CGAL users discussion list

List archive

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


Chronological Thread 
  • From: "cgal_www" <>
  • To: "" <>
  • Subject: Re: [?? Probable Spam] [cgal-discuss] Polyhedron_3 I/O problem
  • Date: Wed, 16 Jul 2008 16:54:48 +0800
  • Organization: Max

Hello Joe

try

// 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
Polyhedron_3 poly1;
OpenFile.open("output.off");
OpenFile >> poly1;
OpenFile.close();

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


I haven't tested the code.

B/Rgds
Max

----- Original Message ----
From: Joe C
To:

Sent: 2008-07-16 07:57:09
Subject: [?? Probable Spam] [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
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss






Archive powered by MHonArc 2.6.16.

Top of Page