Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Compile error: In Surface_mesh_deformation.h

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Compile error: In Surface_mesh_deformation.h


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Compile error: In Surface_mesh_deformation.h
  • Date: Sun, 15 Mar 2015 11:12:24 +0100
  • Organization: GeometryFactory

I agree the error message is not verbose.

You are probably missing Eigen and/or you haven't defined CGAL_EIGEN3_ENABLED as documented here:

http://doc.cgal.org/latest/Surface_modeling/classCGAL_1_1Surface__mesh__deformation.html

if you want to use the default template parameters.
If you look at the cmakelists.txt coming with the examples you'll
see that it is done there.

Sebastien.

On 03/14/2015 10:25 PM, simranjit2112 wrote:
I am trying to run the example that uses Surface_mesh_deformation.h. This is
the code:

#include <CGAL/Simple_cartesian.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/Polyhedron_items_with_id_3.h>
#include <CGAL/IO/Polyhedron_iostream.h>
#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
#include <CGAL/boost/graph/properties_Polyhedron_3.h>
#include <CGAL/Surface_mesh_deformation.h>
#include <fstream>
typedef CGAL::Simple_cartesian<double> Kernel;
typedef CGAL::Polyhedron_3<Kernel, CGAL::Polyhedron_items_with_id_3>
Polyhedron;
typedef boost::graph_traits<Polyhedron>::vertex_descriptor
vertex_descriptor;
typedef boost::graph_traits<Polyhedron>::vertex_iterator vertex_iterator;
typedef CGAL::Surface_mesh_deformation<Polyhedron> Surface_mesh_deformation;
int main()
{
Polyhedron mesh;
std::ifstream input("plane.off");
if ( !input || !(input >> mesh) || mesh.empty() ) {
std::cerr<< "Cannot open data/plane.off" << std::endl;
return 1;
}
set_halfedgeds_items_id(mesh);
Surface_mesh_deformation deform_mesh(mesh);
}

I am getting the following error. Can someone please point out the solution
for it.

/usr/include/CGAL/Surface_mesh_deformation.h: In instantiation of ‘class
CGAL::Surface_mesh_deformation<CGAL::Polyhedron_3&lt;CGAL::Simple_cartesian&lt;double>,
CGAL::Polyhedron_items_with_id_3> >’:
test.cpp:42:42: required from here
/usr/include/CGAL/Surface_mesh_deformation.h:212:52: error: no type named
‘Matrix’ in
‘CGAL::Surface_mesh_deformation<CGAL::Polyhedron_3&lt;CGAL::Simple_cartesian&lt;double>,
CGAL::Polyhedron_items_with_id_3> >::Closest_rotation_traits {aka struct
CGAL::Default}’
typedef typename Closest_rotation_traits::Matrix CR_matrix;
^
/usr/include/CGAL/Surface_mesh_deformation.h:213:52: error: no type named
‘Vector’ in
‘CGAL::Surface_mesh_deformation<CGAL::Polyhedron_3&lt;CGAL::Simple_cartesian&lt;double>,
CGAL::Polyhedron_items_with_id_3> >::Closest_rotation_traits {aka struct
CGAL::Default}’
typedef typename Closest_rotation_traits::Vector CR_vector;




--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Compile-error-In-Surface-mesh-deformation-h-tp4660587.html
Sent from the cgal-discuss mailing list archive at Nabble.com.





Archive powered by MHonArc 2.6.18.

Top of Page