Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] switching to AABB_face_graph_triangle_primitive.h

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] switching to AABB_face_graph_triangle_primitive.h


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] switching to AABB_face_graph_triangle_primitive.h
  • Date: Wed, 06 May 2015 21:40:28 +0200
  • Organization: GeometryFactory

See the thread on stackoverflow where I started answering:

http://stackoverflow.com/questions/30056750/updating-cgal-program-to-use-aabb-face-graph-triangle-primitive

Sebastien.

On 05/06/2015 04:53 PM, Bullard, Jeffrey W. Dr. wrote:
I have a C++ program that uses the CGAL library, installed using
macports. The program was working perfectly. However, after upgrading
to CGAL 4.5.2_0, started getting many compile-time warnings that the
CGAL/AABB_polyhedron_triangle_primitive.h header is deprecated and that
I now should start using CGAL/AABB_face_graph_triangle_primitive.h. The
program continued to compile, but I started to get weary of the
warnings. So I naively switched the header name and also added the
CGAL/boost/graph/graph_traits_Polyhedron_3.h header file which now seems
to be necessary to interface with the Boost Graph Library. I noticed
also from examples in the CGAL documentation that one of my `typedefs`
needed to be updated from

typedef CGAL::AABB_polyhedron_triangle_primitive<K,Polyhedron>
Primitive;

to

typedef CGAL::AABB_face_graph_triangle_primitive<Polyhedron> Primitive;

And so far, that is the extent of what I have done. But now I am
getting two new errors at compile time, and I have no idea what they
mean. They seem to be internal to the various CGAL header files I am using:

In file included from ./Particle.h:44:
/opt/local/include/CGAL/AABB_tree.h:810:27: error: no matching
conversion for functional-style cast from
'CGAL::internal::In_place_list_iterator<CGAL::HalfedgeDS_in_place_list_face<CGAL::I_Polyhedron_facet<My_facet<CGAL::HalfedgeDS_list_types<CGAL::Epick,
CGAL::I_Polyhedron_derived_items_3<My_items>, std::__1::allocator<int>
>, CGAL::Boolean_tag<true>, CGAL::Vector_3<CGAL::Epick> > > >,
std::__1::allocator<CGAL::HalfedgeDS_in_place_list_face<CGAL::I_Polyhedron_facet<My_facet<CGAL::HalfedgeDS_list_types<CGAL::Epick,
CGAL::I_Polyhedron_derived_items_3<My_items>, std::__1::allocator<int>
>, CGAL::Boolean_tag<true>, CGAL::Vector_3<CGAL::Epick> > > > > >' to
'Primitive' (aka
'CGAL::AABB_face_graph_triangle_primitive<CGAL::Polyhedron_3<CGAL::Epick,
My_items,
HalfedgeDS_default, std::__1::allocator<int> >, CGAL::Default,
CGAL::Boolean_tag<true>, CGAL::Boolean_tag<false> >')
m_primitives.push_back(Primitive(first));
In file included from ./Particle.h:45:
/opt/local/include/CGAL/AABB_traits.h:63:33: error: no matching
member function for call to 'construct_shared_data'
m_primitive_data=Primitive::construct_shared_data();
~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
/opt/local/include/CGAL/AABB_tree.h:268:15: note: in instantiation
of member function
'CGAL::internal::AABB_tree::AABB_traits_base<CGAL::AABB_face_graph_triangle_primitive<CGAL::Polyhedron_3<CGAL::Epick,
My_items, HalfedgeDS_default, std::__1::allocator<int> >, CGAL::Default,
CGAL::Boolean_tag<true>, CGAL::Boolean_tag<false> >,
true>::set_shared_data' requested here
{m_traits.set_shared_data();}
^

At this point I am lost. If anyone has experience switching from the
deprecated header file to the new one, I will be grateful for any advice
you might have about how I should proceed.

I can include the header file for the Particle class that seems to be
the problem, but it is 3282 lines long and I'm not sure which part(s) I
should include.

Best regards,

*Jeffrey W. Bullard, Ph.D.*
Materials and Structural Systems Division
National Institute of Standards and Technology






Archive powered by MHonArc 2.6.18.

Top of Page