Subject: CGAL users discussion list
List archive
- From: "Christopher O'Donnell" <>
- To:
- Subject: Re: [cgal-discuss] Problem with Polyhedron IO
- Date: Thu, 22 Jul 2010 12:49:18 -0400
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=XdV0JALLisW+ekouAB70pa38bRexOcg5ZduHj42q5Ii5NuVEP3xP4D3PUDFlNlaF7P ggELYTif7x+BD2KgosTP1204ZlmdtPUeI0bMP7yISubXRX6eeU6wCDXOdif3FPSazjdW GkW/QSN7nwM+i1hByYD1eaYRhDA7XH5AuhuTk=
Thanks for the response. Problem solved.
Chris
On Thu, Jul 22, 2010 at 12:27 PM, Sebastien Loriot (GeometryFactory) <sloriot.ml@gmail.com> wrote:
Have a look here:
https://lists-sop.inria.fr/sympa/arc/cgal-discuss/2010-03/msg00141.html
Christopher O'Donnell wrote:
I'm trying to input a Polyhedron_3 using the built-in .off input stream. All of the points seem to be input correctly, but all of the Plane_3 objects are read as (0.5, 0.5, 0.5, 0.5). Also, I get lots of strange errors when I try to manipulate them (inf > sup assertion failure and seg faults).
Here is the code I'm using, and it fails on the corner.off from examples/Polyhedron:
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/IO/Polyhedron_iostream.h>
#include <iostream>
#include <fstream>
typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
typedef CGAL::Polyhedron_3<Kernel, CGAL::Polyhedron_items_3> Polyhedron;
typedef Polyhedron::Point_iterator Point_iterator;
typedef Polyhedron::Plane_iterator Plane_iterator;
int main(int argc, char** argv)
{
Polyhedron P;
std::ifstream input(argv[1]);
input >> P;
for (Point_iterator i = P.points_begin(); i != P.points_end(); ++i)
std::cout << *i << std::endl;
for (Plane_iterator i = P.planes_begin(); i != P.planes_end(); ++i)
std::cout << *i << std::endl;
fflush(stdout);
return 0;
}
This is the output I get from corner.off:
0 0 0
1 0 0
2 0 0
0 0 1
1 0 1
2 0 1
0 0 2
1 0 2
0 1 0
1 1 0
2 1 0
0 1 1
1 1 1
2 1 1
0 1 2
1 1 2
0.5 0.5 0.5 0.5
0.5 0.5 0.5 0.5
0.5 0.5 0.5 0.5
0.5 0.5 0.5 0.5
0.5 0.5 0.5 0.5
0.5 0.5 0.5 0.5
0.5 0.5 0.5 0.5
0.5 0.5 0.5 0.5
0.5 0.5 0.5 0.5
0.5 0.5 0.5 0.5
0.5 0.5 0.5 0.5
0.5 0.5 0.5 0.5
0.5 0.5 0.5 0.5
0.5 0.5 0.5 0.5
Any help would be appreciated.
Chris
--
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] Problem with Polyhedron IO, Christopher O'Donnell, 07/22/2010
- Re: [cgal-discuss] Problem with Polyhedron IO, Sebastien Loriot (GeometryFactory), 07/22/2010
- Re: [cgal-discuss] Problem with Polyhedron IO, Christopher O'Donnell, 07/22/2010
- Re: [cgal-discuss] Problem with Polyhedron IO, Sebastien Loriot (GeometryFactory), 07/22/2010
Archive powered by MHonArc 2.6.16.