Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Re: Compilation errors while extending Polyhedron_3

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Re: Compilation errors while extending Polyhedron_3


Chronological Thread 
  • From: Philipp Moeller <>
  • To: NMoreau <>
  • Cc:
  • Subject: Re: [cgal-discuss] Re: Compilation errors while extending Polyhedron_3
  • Date: Mon, 18 Feb 2013 17:04:23 +0100
  • Organization: GeometryFactory

NMoreau
<>
writes:

> Philipp Moeller-2 wrote
>> [...]
>> AFAIK code like this would actually compile and work on older versions
>> of Visual Studio.
>
> Okay, I understand better why this was not working! Thanks.
>
>
> Philipp Moeller-2 wrote
>> 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.
>
> Actually that is what I thought at first and I tried to compare Facet_handle
> et Face_handle, but I didn't manage to find out the problem... So here is
> the error message I omitted in my last answer.
>
> ---------------------------------
>
> *In file included from ExtendedPolyhedron.h:11:0,
> from Mesh.h:33,
> from Mesh.cpp:22:*
>
> *normal_cycle.h: In member function *
>
> /‘void
> Normal_cycle<_Poly>::principal_curvature_per_vert(Normal_cycle<_Poly>::Vertex,
> double (*)[3])
>
> [with _Poly = ExtendedPolyhedron<CGAL::Simple_cartesian&lt;float>,
> ExtendedItems>,
> Normal_cycle<_Poly>::Vertex =
> CGAL::HalfedgeDS_in_place_list_vertex<
> CGAL::I_Polyhedron_vertex<
> ExtendedVertex<
>
> CGAL::HalfedgeDS_list_types<CGAL::Simple_cartesian&lt;float>,
> CGAL::I_Polyhedron_derived_items_3<ExtendedItems>, std::allocator<int> >,
> CGAL::Boolean_tag<true>,
> CGAL::Point_3<CGAL::Simple_cartesian&lt;float> >,
> CGAL::Vector_3<CGAL::Simple_cartesian&lt;float> >,
> float
> >
> >
>>]’:
> /
>
> *normal_cycle.h:69:3: instantiated from ‘void
> Normal_cycle<_Poly>::principal_curvature(Normal_cycle<_Poly>::Polyhedron&,
> bool, double) *
>
> /[with _Poly = ExtendedPolyhedron<CGAL::Simple_cartesian&lt;float>,
> ExtendedItems>,
> Normal_cycle<_Poly>::Polyhedron =
> ExtendedPolyhedron<CGAL::Simple_cartesian&lt;float>, ExtendedItems>]’/
>
>
> *ExtendedPolyhedron.h:158:9: instantiated from ‘void
> ExtendedPolyhedron<kernel, items>::computeNormalCycle(bool,
> ExtendedPolyhedron<kernel, items>::FT) *
>
> /[with kernel = CGAL::Simple_cartesian<float>,
> items = ExtendedItems,
> ExtendedPolyhedron<kernel, items>::FT = float]’/
>
>
> *Mesh.cpp:290:42: instantiated from here*
>
> *normal_cycle.h:211:2: erreur: no matching function for call to *
>
> /‘Normal_cycle<ExtendedPolyhedron&lt;CGAL::Simple_cartesian&lt;float>,
> ExtendedItems> >::AreaFacetTriangle(
> CGAL::I_Polyhedron_halfedge<
> ExtendedHalfedge<
>
> CGAL::HalfedgeDS_list_types<CGAL::Simple_cartesian&lt;float>,
> CGAL::I_Polyhedron_derived_items_3<ExtendedItems>, std::allocator<int> >,
> CGAL::Boolean_tag<true>,
> CGAL::Boolean_tag<true>,
> CGAL::Boolean_tag<true> > >::Face_handle)’/
>
> *normal_cycle.h:211:2: note: candidate is:*
>
> *normal_cycle.h:343:9: note: double
> Normal_cycle<_Poly>::AreaFacetTriangle(Normal_cycle<_Poly>::Facet_handle&) *
>
> /[with _Poly = ExtendedPolyhedron<CGAL::Simple_cartesian&lt;float>,
> ExtendedItems>,
> Normal_cycle<_Poly>::Facet_handle =
> CGAL::internal::In_place_list_iterator<
> CGAL::HalfedgeDS_in_place_list_face<
> CGAL::I_Polyhedron_facet<
> ExtendedFacet<
>
> CGAL::HalfedgeDS_list_types<CGAL::Simple_cartesian&lt;float>,
> CGAL::I_Polyhedron_derived_items_3<ExtendedItems>, std::allocator<int> >,
> CGAL::Boolean_tag<true>,
>
> CGAL::Point_3<CGAL::Simple_cartesian&lt;float> >,
>
> CGAL::Vector_3<CGAL::Simple_cartesian&lt;float> >
> >
> >
> >,
> std::allocator<
> CGAL::HalfedgeDS_in_place_list_face<
> CGAL::I_Polyhedron_facet<
> ExtendedFacet<
>
> CGAL::HalfedgeDS_list_types<CGAL::Simple_cartesian&lt;float>,
>
> CGAL::I_Polyhedron_derived_items_3<ExtendedItems>,
> std::allocator<int>
> >,
> CGAL::Boolean_tag<true>,
>
> CGAL::Point_3<CGAL::Simple_cartesian&lt;float> >,
>
> CGAL::Vector_3<CGAL::Simple_cartesian&lt;float> >
> >
> >
> >
> >
>>]/

The type of the function argument and the type of the argument you are
calling it with a are not matching up. It is really hard to see where
you go wrong or if something in the polyhedron code messes up without a
minimal, compilable example that reproduces the problem. Can you try to
provide one?



Archive powered by MHonArc 2.6.18.

Top of Page