Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] autorefine_and_remove_self_intersections: Error C2665 'CGAL::get': none of the 3 overloads could convert all the argument types
Chronological Thread
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] autorefine_and_remove_self_intersections: Error C2665 'CGAL::get': none of the 3 overloads could convert all the argument types
- Date: Mon, 2 Jul 2018 11:26:48 +0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:ndabTxe+NF/ic+As3zIKq44UlGMj4u6mDksu8pMizoh2WeGdxcSybB7h7PlgxGXEQZ/co6odzbaO7ea4ASQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTahYL5+Ngm6oRnMvcQKnIVuLbo8xAHUqXVSYeRWwm1oJVOXnxni48q74YBu/SdNtf8/7sBMSar1cbg2QrxeFzQmLns65Nb3uhnZTAuA/WUTX2MLmRdVGQfF7RX6XpDssivms+d2xSeXMdHqQb0yRD+t6LtmRRHqhSoJLjI17G7agdF0gK9bvB6tohpyyJPWbo6ILvpzZr7Tc80URWRBXchfWSJODYy+YIQTAOQMJvpYoovnqlcSsRezCwuhCeXywTFInH/22qg63vwvHQ/bwgMvBMgBsG/IrNX0KqgSV/2+wq/PzTXZbvNW3iv945XMfh4gv/6MWrdwftTNyUk1FwLLjk+fppD5PzOSzOQMs22X4+R9Xu+okG4nrwZxoiKuxscrlonFnIcVylTf+CV2xYY6P9y4SEphbdG4F5tQsjiXOo1rSc0sRGFovTw1yrwAuZOjeigF0o8oyAXba/OZaYSH/hXjVOOJLThki3JqYra/iwy18Ui6xe3xUNS/3lVSriddkNTBuWoB2wHN5sWHUPdw/Vmt1SyP2g3c8u1JI0M5mbDFJ5Muw7M8jIcfvEDNEyPsmkj7jKmbfVg+9Oey8eToeLDmq4ecN4BqjgH+NbwjmsmlDuQ5NggCRmaa+eGg2LH68030QLpHguc5kqnet5DaKsAbqbCjDwBJ1YYj7g6zDzag0NsGgXkKNFBIdR2dg4T0JV3DIOr0APShj1i2kDpmyOjKPrj7DZXMKnjDnq3hfbF460NE0wozyddf54hVCrEGPPL/QErxtNjDAx82Ngy72efnCNFn2owCXmKPB7eVMLnOvl+Q+uIvP+6MaZcJtzbyMfcl4+figmI4mV8GYaapwIAXaGujE/R9I0SZZGLsjc0bHWcLuAo+Vu3qh0eYXT5dfXbhF547szo0AYbjAYbYTZ22m5SA2j26F9tYfDNoEFeJRD3Teo+NQOsNZSTaBsh7kzsYHfiORogk2A20pSHzwKZgNPuVsGVMrpbkztly+6vWkTk98DV1C4KW1GTbHDI8pX8BWzJjhPM3mkd60FrWjPAh0q5oUOdL7vYMaT8UcJvVzuh0Edf3A1uTcdKASVLgSdKjU2hoEoABhuQWakM4IO2MywjZ1nPzUbAQnr2PQpcz9/CEhiWjF4NG03/DkZIZoRwmT89IbzD0g6d+803MAtaMnRjF0amtcqsY0WjG82LRlWc=
Reminder: this is not an officially documented function but as indicated
in the inline documentation:
* \cgalParamBegin{face_index_map} a property map containing the index of each face of `tm` \cgalParamEnd
So a face index map for your polyhedron type must be provided since
it does not have a default (while Surface_mesh does).
Look at dynamic property for example:
https://doc.cgal.org/latest/BGL/index.html#title25
Sebastien.
On 06/27/2018 01:25 PM, sergio wrote:
I have the following code:
bool repairOBJFile(std::string & fileName)
{
clock_t begin = clock();
std::cout << std::endl;
std::cout << std::endl;
std::cout <<
"..........................................................."
<< std::endl;
std::cout << ". Reapairing
."
<< std::endl;
std::cout <<
"..........................................................."
<< std::endl;
std::ifstream input(fileName);
if (!input)
{
std::cerr << "Cannot open file " << std::endl;
return false;
}
std::vector<Kernel::Point_3> points;
std::vector< std::vector<std::size_t> > polygons;
if (!CGAL::read_OBJ(input, points, polygons))
{
std::cerr << "Error parsing the OFF file " << std::endl;
return false;
}
//Mesh mesh;
Polyhedron mesh;
CGAL::Polygon_mesh_processing::orient_polygon_soup(points, polygons);
CGAL::Polygon_mesh_processing::polygon_soup_to_polygon_mesh(points,
polygons, mesh);
bool solved =
CGAL::Polygon_mesh_processing::experimental::autorefine_and_remove_self_intersections(mesh);
if (!solved)
{
std::cout << "Some self-intersection could not be fixed" <<
std::endl;
//return false;
}
addStringToFileName(fileName, "_fixed.obj");
std::ofstream ofs(fileName);
CGAL::print_polyhedron_wavefront(ofs, mesh);
clock_t end = clock();
double elapsed_secs = double(end - begin) / CLOCKS_PER_SEC;
std::cout << std::endl;
std::cout << std::endl;
std::cout << "Repairing time:.................." << elapsed_secs << "
seconds."<<" = " << elapsed_secs/60<<"min"<< std::endl;
return true;
}
the result of the compilation is the following messages:
Severity Code Description Project File Line Suppression
State
Error C2665 'CGAL::get': none of the 3 overloads could convert all the
argument types cgal_vtk_test
C:\dev\CGAL-4.12\include\CGAL\Polygon_mesh_processing\internal\Corefinement\Output_builder_for_autorefinement.h
317
Severity Code Description Project File Line Suppression
State
Error C2039 'key_type': is not a member of
'boost::property_traits<KeyMap>'
cgal_vtk_test C:\dev\CGAL-4.12\include\CGAL\property_map.h 111
Severity Code Description Project File Line Suppression
State
Error C3646 'key_type': unknown override specifier cgal_vtk_test
C:\dev\CGAL-4.12\include\CGAL\property_map.h 111
Severity Code Description Project File Line Suppression
State
Error C4430 missing type specifier - int assumed. Note: C++ does not
support
default-int cgal_vtk_test C:\dev\CGAL-4.12\include\CGAL\property_map.h
111
Severity Code Description Project File Line Suppression
State
Error C2665
'CGAL::Property_map_binder<FaceIdMap,boost::iterator_property_map<T
*,boost::typed_identity_property_map<T>,T,T &>>::get': none of the 5
overloads could convert all the argument types cgal_vtk_test
C:\dev\CGAL-4.12\include\CGAL\Polygon_mesh_processing\internal\Corefinement\Output_builder_for_autorefinement.h
415
whats wrong?
Thanks in adavance
--
Sent from: http://cgal-discuss.949826.n4.nabble.com/
- Re: [cgal-discuss] autorefine_and_remove_self_intersections: Error C2665 'CGAL::get': none of the 3 overloads could convert all the argument types, Sebastien Loriot (GeometryFactory), 07/02/2018
Archive powered by MHonArc 2.6.18.