Subject: CGAL users discussion list
List archive
- From: "Joe C" <>
- To:
- Cc: "Joe C" <>
- Subject: [cgal-discuss] Binary Polyhedron_3 I/O questions
- Date: Mon, 17 Nov 2008 14:26:57 -0800
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:mime-version:content-type; b=dhTh65hY8N2ixFnNlVmFQoc6amws6dNkPgfyiUeLT8UFCoo4R9zMKvHLMNouguJ/WE Z04HF/iCwYJ+LMcgRrn3PsEBMcVjbT8ZNQ8BOCxmbzSIYpSApK2PCQ6PgMgZu/fzppzI OzwAyPWjiyi3hdzceTi7/tDb+qJ4T1/mNOEOM=
Hi,
I got some issue with Polyhedron_3 I/O stuff. I have two polyhedron .off files in ascii mode (poly_ascii.off) and binary mode (poly_binary.off) respectively. They are the same polyhedron, the only difference is that one is in ascii mode and the other is in binary mode. I use the following code snipet to read in the files
typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
// Read in ascii file
Polyhedron poly_ascii;
std::ifstream OpenFile("poly_ascii.off");
OpenFile >> poly_ascii;
OpenFile.close();
std::cout<< "poly is valid ? " << poly_ascii.is_valid() << std::endl; // true
std::cout<< "size of facets ? " << poly_ascii.size_of_facets() << std::endl; // This is O.K, size of polyhedron is correct.
/////////////////////////////////
// Read in binary file, replacing the above code
Polyhedron poly_binary;
std::ifstream OpenFile("poly_binary.off");
OpenFile >> poly_binary;
OpenFile.close();
std::cout<< "poly is valid ? " << poly_binary.is_valid() << std::endl; // true
std::cout<< "size of facets ? " << poly_binary.size_of_facets() << std::endl; // This is NOT O.K, size of polyhedron is zero.
It seems that CGAL does not handle the binary case correctly. Is this a bug or am I missing something to read the binary file right?
Thanks.
Joe
Attachment:
poly_binary.off
Description: Binary data
Attachment:
poly_ascii.off
Description: Binary data
- [cgal-discuss] Binary Polyhedron_3 I/O questions, Joe C, 11/17/2008
- Re: [cgal-discuss] Binary Polyhedron_3 I/O questions, Rui Guo, 11/18/2008
- Re: [cgal-discuss] Binary Polyhedron_3 I/O questions, Joe C, 11/18/2008
- Re: [cgal-discuss] Binary Polyhedron_3 I/O questions, Rui Guo, 11/19/2008
- Re: [cgal-discuss] Binary Polyhedron_3 I/O questions, Laurent Rineau, 11/19/2008
- Re: [cgal-discuss] Binary Polyhedron_3 I/O questions, Joe C, 11/19/2008
- Re: [cgal-discuss] Binary Polyhedron_3 I/O questions, Laurent Rineau, 11/19/2008
- Re: [cgal-discuss] Binary Polyhedron_3 I/O questions, Joe C, 11/20/2008
- Re: [cgal-discuss] Binary Polyhedron_3 I/O questions, Laurent Rineau, 11/20/2008
- Re: [cgal-discuss] Binary Polyhedron_3 I/O questions, Laurent Rineau, 11/19/2008
- Re: [cgal-discuss] Binary Polyhedron_3 I/O questions, Joe C, 11/19/2008
- Re: [cgal-discuss] Binary Polyhedron_3 I/O questions, Laurent Rineau, 11/19/2008
- Re: [cgal-discuss] Binary Polyhedron_3 I/O questions, Rui Guo, 11/19/2008
- Re: [cgal-discuss] Binary Polyhedron_3 I/O questions, Joe C, 11/18/2008
- Re: [cgal-discuss] Binary Polyhedron_3 I/O questions, Rui Guo, 11/18/2008
- Re: [cgal-discuss] Binary Polyhedron_3 I/O questions, Laurent Rineau, 11/19/2008
Archive powered by MHonArc 2.6.16.