Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Problems with Triangulated Surface Mesh Simplification

Subject: CGAL users discussion list

List archive

[cgal-discuss] Problems with Triangulated Surface Mesh Simplification


Chronological Thread 
  • From: Matti Lehtonen <>
  • To:
  • Subject: [cgal-discuss] Problems with Triangulated Surface Mesh Simplification
  • Date: Fri, 21 Mar 2014 11:13:41 +0200

Hi,

I am trying to compile an simplification functionality that follow the examples at  http://www.cgal.org/Manual/4.2/doc_html/cgal_manual/Surface_mesh_simplification/Chapter_main.html#Subsection_53.4.2

The problem is that I got errors when my class of  PolyhedralSurface (inherits CGAL::Polyhedron_3<>) do not define e.g. edge_descriptor.

Exact error messages:
In file included from /usr/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h:25:0,
                 from /usr/include/CGAL/boost/graph/graph_traits_Polyhedron_3.h:23,
                 from /usr/include/CGAL/Surface_mesh_simplification/HalfedgeGraph_Polyhedron_3.h:23,
                 from cloud2volume.cpp:58:
/usr/include/boost/graph/graph_traits.hpp: In instantiation of ‘struct boost::graph_traits<const PolyhedralSurface>’:
simplify.h:126:67:   required from ‘class Constrains_border_map<PolyhedralSurface>’
simplify.h:522:31:   required from ‘void simplify_border_and_surface(P_&, const std::set<typename P_::Vertex_handle>&) [with ...]’
extract_polyhedron.h:2004:72:   required from here
/usr/include/boost/graph/graph_traits.hpp:57:52: error: no type named ‘vertex_descriptor’ in ‘const class PolyhedralSurface’
         typedef typename G::vertex_descriptor      vertex_descriptor;
                                                    ^
/usr/include/boost/graph/graph_traits.hpp:58:52: error: no type named ‘edge_descriptor’ in ‘const class PolyhedralSurface’
         typedef typename G::edge_descriptor        edge_descriptor;
                                                    ^

If I change at Constraint property map from
    typedef typename boost::graph_traits<P_ const>::edge_descriptor        edge_type;
to
    typedef typename CGAL::HDS_graph_traits<P_ const>::edge_descriptor        edge_type;

it fixes errors mentioned above, but then errors are generated at CGAL code:
In file included from /usr/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_and_length.h:22:0,
                 from cloud2volume.cpp:62:
/usr/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h: In instantiation of ‘class CGAL::Surface_mesh_simplification::Edge_length_cost<PolyhedralSurface>’:
simplify.h:533:86:   required from ‘void simplify_border_and_surface(P_&, const std::set<typename P_::Vertex_handle>&) [with ...]’
extract_polyhedron.h:2004:72:   required from here
/usr/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h:43:54: error: invalid use of incomplete type ‘struct CGAL::halfedge_graph_traits<PolyhedralSurface>’
   typedef typename halfedge_graph_traits<ECM>::Point Point ;
                                                      ^

My Ubuntu packages are
- CGAL 4.2
- boost 1.53


I have previously used surface simplification code with older CGAL library, but this is the first time I got this kind error :O

Any suggestions for a fix?


Matti L
--
Life is complex. It has real and imaginary parts.



Archive powered by MHonArc 2.6.18.

Top of Page