Subject: CGAL users discussion list
List archive
- From: "Riedel, Torge" <>
- To: "" <>
- Subject: [cgal-discuss] CGAL 4.11.1 : Create convex hull - compilation errors
- Date: Mon, 5 Mar 2018 10:05:11 +0000
- Accept-language: de-DE, en-US
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=Pass
- Ironport-phdr: 9a23:2p0epBefsh5pSg0zyuuwv7/0lGMj4u6mDksu8pMizoh2WeGdxcS7Zx7h7PlgxGXEQZ/co6odzbaO6Oa4ASQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTahb75+Ngm6oRnMvcQKnIVuLbo8xAHUqXVSYeRWwm1oJVOXnxni48q74YBu/SdNtf8/7sBMSar1cbg2QrxeFzQmLns65Nb3uhnZTAuA/WUTX2MLmRdVGQfF7RX6XpDssivms+d2xSeXMdHqQb0yRD+v6bpgRh31hycdLzM38H/ZhNFsjKxVoxyhpgBwzIHPbY6PKPZzZLnQcc8GSWZfWMtaSixPApm7b4sKF+cNM/pWr4jjqFQTsxS+ARGgD/7xxD9PnH/20rM13+o8GgzBwgIsBc4AsHXKo9roKqgSVfu4w7XWwjXFbvNWxS3x55XWfR04p/yHQLx+cc3UyUY1FgPFiE2dppDqPzyP0uQBqW+b7/BvVe63l2EotQdxojmzxss2lobJgYcVx1bZ/it62IY4PcC0RUp1bNK+DZddtCKXO5FrTs4iR2xkoiY3xqUbtZKnZiQG1I4rywPFZ/Cab4SE/hTuX/uLLzhinnJqYre/ig6y8Ue+zu38UdG50FNFryZZjNXArGwC2ALV6siGVvtx5Fuu2TGK1wzL6+FEJ147lbbDJpI8xrM9mIAfvVnAEyL1gkn6ka+be0E+9uWo8+jnZ6/ppp6YN496kAH+NaEul9SnAeQiLAgORHCW9OS42bDj/kD2XLVHgeEonabHqJ3UO94XqLK4AwBLz4ks9RK/Aiy639sGm3kHLU5FdAiagIf3I13OOuz3De+jg1Swlzdm3+zJPrL7DZXJN3TMjbbhfa1h5E5B0woz1stS54lUC7EEOPL8QFX9tN3eDh8jMgy72fzrCNtn1tBWZWXaSKSWOaeXvV6T7f80OMGNYpUUsXDzMbJts/XhhHt8lV4GdrSyxrMWbmq5F7JoORPKT2Drh4JLK2YHsgc6CKTWj0eNXHQbM0r0ZaMx6jw/IImrC4bfAIyg1u/SlBynF4FbMzgVQmuHFm3lIt3dCqU8LRmKK8okqQQqEL2oSosvzxar7VeowLdhL/aS9iBK7Mu/hugw3PXakFQJzRIxF96UijnfRGxyn39OSzJkhPki83w48U+K1O1Du9IdFdFX4KoXAAIqbcSaxOF8Csy0UQXELI6E
Hi,
I tried to compute a convex hull of a mesh, but I get compilation errors and do not know how to fix. Here is my code:
typedef CGAL::Simple_cartesian<double> K; typedef CGAL::Surface_mesh<K::Point_3> Mesh;
std::vector< CGAL::cpp11::array<double, 3> > points; std::vector< CGAL::cpp11::array<int, 3> > triangles; CGAL::read_STL(input, points, triangles);
CGAL::Polygon_mesh_processing::orient_polygon_soup(points, triangles);
Mesh m; CGAL::Polygon_mesh_processing::polygon_soup_to_polygon_mesh(points, triangles, m);
Mesh sm_convex; CGAL::convex_hull_3(m.vertices_begin(), m.vertices_end(), sm_convex);
std::cout << " i Points: " << sm_convex.number_of_vertices() << " Triangles: " << sm_convex.number_of_faces() << std::endl;
I get the following compilation errors:
1>C:\Evaluation\MeshFW\cgal.org\CGAL-4.11.1\include\CGAL/convex_hull_3.h(903): error C2976: 'CGAL::internal::Convex_hull_3::Default_traits_for_Chull_3': too few template arguments 1> C:\Evaluation\MeshFW\cgal.org\CGAL-4.11.1\include\CGAL/convex_hull_3.h(72): note: see declaration of 'CGAL::internal::Convex_hull_3::Default_traits_for_Chull_3' 1> main.cpp(114): note: see reference to function template instantiation 'void CGAL::convex_hull_3<CGAL::Surface_mesh<CGAL::Point_3<Kernel_>>::Index_iterator<CGAL::Surface_mesh<CGAL::Point_3<Kernel_>>::Vertex_index>,Mesh>(InputIterator,InputIterator,Polyhedron_3 &)' being compiled 1> with 1> [ 1> Kernel_=CGAL::Epick, 1> InputIterator=CGAL::Surface_mesh<CGAL::Point_3<CGAL::Epick>>::Index_iterator<CGAL::Surface_mesh<CGAL::Point_3<CGAL::Epick>>::Vertex_index>, 1> Polyhedron_3=Mesh 1> ] 1> C:\Evaluation\MeshFW\cgal.org\boost_1_66_0\boost/bind/placeholders.hpp(54): note: see reference to class template instantiation 'boost::arg<9>' being compiled 1> C:\Evaluation\MeshFW\cgal.org\boost_1_66_0\boost/bind/placeholders.hpp(53): note: see reference to class template instantiation 'boost::arg<8>' being compiled 1> C:\Evaluation\MeshFW\cgal.org\boost_1_66_0\boost/bind/placeholders.hpp(52): note: see reference to class template instantiation 'boost::arg<7>' being compiled 1> C:\Evaluation\MeshFW\cgal.org\boost_1_66_0\boost/bind/placeholders.hpp(51): note: see reference to class template instantiation 'boost::arg<6>' being compiled 1> C:\Evaluation\MeshFW\cgal.org\boost_1_66_0\boost/bind/placeholders.hpp(50): note: see reference to class template instantiation 'boost::arg<5>' being compiled 1> C:\Evaluation\MeshFW\cgal.org\boost_1_66_0\boost/bind/placeholders.hpp(49): note: see reference to class template instantiation 'boost::arg<4>' being compiled 1> C:\Evaluation\MeshFW\cgal.org\boost_1_66_0\boost/bind/placeholders.hpp(48): note: see reference to class template instantiation 'boost::arg<3>' being compiled 1> C:\Evaluation\MeshFW\cgal.org\boost_1_66_0\boost/bind/placeholders.hpp(47): note: see reference to class template instantiation 'boost::arg<2>' being compiled 1> C:\Evaluation\MeshFW\cgal.org\boost_1_66_0\boost/bind/placeholders.hpp(46): note: see reference to class template instantiation 'boost::arg<1>' being compiled 1>C:\ Evaluation\MeshFW\cgal.org\CGAL-4.11.1\include\CGAL/convex_hull_3.h(903): error C2955: 'CGAL::internal::Convex_hull_3::Default_traits_for_Chull_3': use of class template requires template argument list 1> C:\Evaluation\MeshFW\cgal.org\CGAL-4.11.1\include\CGAL/convex_hull_3.h(72): note: see declaration of 'CGAL::internal::Convex_hull_3::Default_traits_for_Chull_3'
In my understanding this is because I passed the vertex iterators to the convex hull function. If I pass iterators of an std::vector of points like the example in the cgal docs does it, it compiles without problems. I was not able to find a way to get iterators to the points of a surface mesh. My challenge is, that the mesh “m” has to be the input source for the complex hull operation. A separate list/vector of the points is not available. So my question is: How to do this? Hopefully without the need to build an extra list of points.
Kind regards Torge CENIT AG, Industriestrasse 52-54, 70565 Stuttgart, Tel.: +49 711 7825-30, Fax: +49 711 7825-4000, Internet: www.cenit.com Geschaeftsstellen: Berlin, Frankfurt, Hamburg, Hannover, Muenchen, Oelsnitz, Ratingen, Saarbruecken Vorstandsmitglieder: Kurt Bengel, Matthias Schmidt Aufsichtsratsmitglieder: Andreas Schmidt (Vorsitzender des Aufsichtsrats), Hubert Leypoldt, Andreas Karrer Bankverbindungen: Deutsche Bank (BLZ 600 700 70) Kto. 1661 040 IBAN : DE85 6007 0070 0166 1040 00 SWIFT-CODE : DEUTDESS, Commerzbank (BLZ 600 400 71) Kto. 532 015 500 IBAN : DE83 6004 0071 0532 0155 00 SWIFT-Code : COBADEFF600, Registergericht: Amtsgericht Stuttgart Handelsregister: HRB Nr. 19117 Umsatzsteuer: ID-Nr. DE 147 862 777 |
- [cgal-discuss] CGAL 4.11.1 : Create convex hull - compilation errors, Riedel, Torge, 03/05/2018
- Re: [cgal-discuss] CGAL 4.11.1 : Create convex hull - compilation errors, Sebastien Loriot (GeometryFactory), 03/05/2018
- AW: [cgal-discuss] CGAL 4.11.1 : Create convex hull - compilation errors, Riedel, Torge, 03/05/2018
- Re: [cgal-discuss] CGAL 4.11.1 : Create convex hull - compilation errors, Sebastien Loriot (GeometryFactory), 03/05/2018
Archive powered by MHonArc 2.6.18.