Subject: CGAL users discussion list
List archive
- From: "Laurent Rineau (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] New to CGAL, problem with simple operations
- Date: Thu, 1 Oct 2009 18:46:23 +0200
- Organization: GeometryFactory
On Thursday 01 October 2009 18:30:20
wrote:
> Hi,
>
> I'm very new to CGAL and have been trying to get it to work for quite some
> time now. I am trying to implement the Marching Triangle Algorithm and
> using CGAL for that.
>
> The first requirement there is that I need to iterate through all the edges
> that lie on the boundary of a model. I can't get it to work properly..
>
> This is what I am using:
> typedef CGAL::Simple_cartesian<double> Kernel;
>
> typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
>
> typedef Polyhedron::Halfedge_handle Halfedge_handle;
> typedef Polyhedron::Vertex_iterator Vertex_iterator;
> typedef Polyhedron::Halfedge_iterator Halfedge_iterator;
> typedef Polyhedron::Edge_iterator Edge_iterator;
>
> // main() and making a simple polyhedron out of a triangle.
> P.make_triangle(p,q,r);
> std::cout << "H Edge info:" << std::endl;
> for ( Halfedge_iterator hit = P.vertices_begin(); hit != P.vertices_end();
> ++v) std::cout << hit->vertex()->point() << std::endl;
Here you increase 'v' in the third part of the 'for'. It should be '++hit'.
Anyway, maybe your error is somewhere else. I have not looked in details at
your message.
--
Laurent Rineau, PhD
Release Manager of the CGAL Project
http://www.cgal.org/
R&D Engineer at GeometryFactory
http://www.geometryfactory.com/
- [cgal-discuss] New to CGAL, problem with simple operations, fly2priyank, 10/01/2009
- Re: [cgal-discuss] New to CGAL, problem with simple operations, Laurent Rineau (GeometryFactory), 10/01/2009
- Re: [cgal-discuss] New to CGAL, problem with simple operations, Priyank Jain, 10/01/2009
- Re: [cgal-discuss] New to CGAL, problem with simple operations, Priyank Jain, 10/02/2009
- Re: [cgal-discuss] New to CGAL, problem with simple operations, Priyank Jain, 10/01/2009
- Re: [cgal-discuss] New to CGAL, problem with simple operations, Laurent Rineau (GeometryFactory), 10/01/2009
Archive powered by MHonArc 2.6.16.