Subject: CGAL users discussion list
List archive
- From: "Joe C" <>
- To:
- Subject: Re: [cgal-discuss] Binary Polyhedron_3 I/O questions
- Date: Thu, 20 Nov 2008 08:28:30 -0800
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=ATGwM8PbCfElzPpNY963zgpllaixksEbGdhIsoBpMM3adQRhtO5KvDNYea7tp8eImd UN0Tc48GS7N3vZ2ObuXx8fAMt8GB8C9tA9tRO2lEp6/rS7bcFW+BW4Oq0Psfidu/1xLm 82AUEWR7L7BH/NsFrILVXKZ2uXc3GNjHxV7k0=
I did use setf(std::ios::scientific) and precision(20) to set the format. Here is a snapshot:
std::ofstream SaveFile(fileName);
CGAL::set_binary_mode(SaveFile);
SaveFile.setf(std::ios::scientific);
SaveFile.precision(20);
SaveFile << polyhedron;
SaveFile.close();
Is it possible that this causes all the trouble? Is there any CGAL specific statements that can do the same thing?
Thanks.
Joe
On Wed, Nov 19, 2008 at 11:13 AM, Laurent Rineau <> wrote:
On Wednesday 19 November 2008 18:56:11 Joe C wrote:That way my only idea.
> Thank Rui and Laurent for your reply.
>
> Laurent, I am working on Windows XP platform. I did use
> CGAL::set_binary_mode to create my binary file, otherwise I would not get a
> binary file. As you suggested, I also tried std::ios::binary when creating
> the binary file. But neither of them worked.
I agree that your ascii file is OK. But your binary file is not.
> My data should be O.K. because the ascii mode works fine.
I am not sure that there is CGAL operator>>Polyhedron. Your binary file is
> Any ideas why this curruption only happens in binary mode?
> Do I need to do some other stuff before reading in polyhedron
> binary file?
corrupted, but I cannot know why.
--
Laurent Rineau, PhD
Engineer at GeometryFactory
http://www.geometryfactory.com/
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
- [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.