Subject: CGAL users discussion list
List archive
- From: Philipp Moeller <>
- To: NMoreau <>
- Cc:
- Subject: Re: [cgal-discuss] Re: Compilation errors while extending Polyhedron_3
- Date: Mon, 18 Feb 2013 15:30:54 +0100
- Organization: GeometryFactory
NMoreau
<>
writes:
> Thank you for your answer!
>
> Actually I'm kind of confused because I didn't made the normal_cycle.h file,
> and it is supposed to work without any modification: it has already been
> used before and everything worked well, I was asked to do my own Extended
> Polyhedron class in order to be able to use normal_cycle.h, that I wasn't
> suppose to edit.
AFAIK code like this would actually compile and work on older versions
of Visual Studio.
>
>
> However I changed the std::for_each line and there is no more problem here.
> I also made a modification in normal_cycle.h for the "typename" error and I
> think this will be okay for now.
>
> But I still don't know what to do about the AreaFacetTriangle problem.
>
> I have:
>
> /template <class _Poly>
> class Normal_cycle
> {
> typedef _Poly Polyhedron;
>
> typedef typename Polyhedron::Halfedge_data_structure HDS;
> typedef typename Polyhedron::Vertex Vertex;
> typedef typename Polyhedron::Halfedge Halfedge;
> typedef typename Polyhedron::Facet Facet;
>
> typedef typename Polyhedron::Vertex_handle Vertex_handle;
> typedef typename Polyhedron::Halfedge_handle Halfedge_handle;
> typedef typename Polyhedron::Facet_handle Facet_handle;
>
> typedef typename Polyhedron::Vertex_iterator Vertex_iterator;
> typedef typename Polyhedron::Halfedge_iterator Halfedge_iterator;
> typedef typename Polyhedron::Edge_iterator Edge_iterator;
> typedef typename Polyhedron::Facet_iterator Facet_iterator;
>
> typedef typename Polyhedron::Halfedge_around_facet_circulator
>
> Halfedge_around_facet_circulator;
> typedef typename Polyhedron::Halfedge_around_vertex_circulator
>
> Halfedge_around_vertex_circulator;
> typedef typename Polyhedron::Point_3 Point;
> typedef typename Polyhedron::FT FT;
> typedef typename Polyhedron::Vector Vector;
>
> ...
>
> void principal_curvature_per_vert(Vertex pVertex,
> double ppMatrix_sum[3][3])
> {
> ...
> Halfedge_around_vertex_circulator pHalfedge = pVertex.vertex_begin();
> Halfedge_around_vertex_circulator pHalfedgeStart = pHalfedge;
> ...
> area+=AreaFacetTriangle(pHalfedge->facet());
> ...
> }
>
> double AreaFacetTriangle(Facet_handle &f)
> {
> Halfedge_around_facet_circulator pHalfedge = f->facet_begin();
> ...
> }/
>
> I tried to change the parameters to pointers (/double
> AreaFacetTriangle(Facet_handle* f)/)
> Then I had no more conversion problem, but:
> /normal_cycle.h:345:63: erreur:
> ‘Normal_cycle<ExtendedPolyhedron<CGAL::Simple_cartesian<float>,
> ExtendedItems> >::Facet_handle’ has no member named ‘facet_begin’/
You are now passing a pointer to a handle and calling f->facet_begin()
will try to find the member in the handle, while the member is in the
object pointed to by the handle (handles are an abstraction over
pointers). So, you would need to call `(*f)->facet_begin()`, where f is
an object of type `Facet_handle*`. However, your original code should be
the right way to do it. The original error (which you unfortunately
snipped from your response) makes me think that there is a type between
Face_handle and Facet_handle somewhere.
- [cgal-discuss] Compilation errors while extending Polyhedron_3, NMoreau, 02/17/2013
- Re: [cgal-discuss] Compilation errors while extending Polyhedron_3, Philipp Moeller, 02/17/2013
- [cgal-discuss] Re: Compilation errors while extending Polyhedron_3, NMoreau, 02/18/2013
- Re: [cgal-discuss] Re: Compilation errors while extending Polyhedron_3, Philipp Moeller, 02/18/2013
- [cgal-discuss] Re: Compilation errors while extending Polyhedron_3, NMoreau, 02/18/2013
- Re: [cgal-discuss] Re: Compilation errors while extending Polyhedron_3, Philipp Moeller, 02/18/2013
- [cgal-discuss] Re: Compilation errors while extending Polyhedron_3, NMoreau, 02/18/2013
- Re: [cgal-discuss] Re: Compilation errors while extending Polyhedron_3, Laurent Rineau (CGAL/GeometryFactory), 02/18/2013
- Re: [cgal-discuss] Re: Compilation errors while extending Polyhedron_3, Philipp Moeller, 02/18/2013
- [cgal-discuss] Re: Compilation errors while extending Polyhedron_3, NMoreau, 02/18/2013
- Re: [cgal-discuss] Re: Compilation errors while extending Polyhedron_3, Philipp Moeller, 02/18/2013
Archive powered by MHonArc 2.6.18.